public class MorphlineHandlerImpl extends Object implements MorphlineHandler
MorphlineHandler that processes it's events using a morphline Command chain.| Modifier and Type | Field and Description |
|---|---|
static String |
MORPHLINE_FILE_PARAM |
static String |
MORPHLINE_ID_PARAM |
static String |
MORPHLINE_VARIABLE_PARAM
Morphline variables can be passed from flume.conf to the morphline, e.g.:
agent.sinks.solrSink.morphlineVariable.zkHost=127.0.0.1:2181/solr
|
| Constructor and Description |
|---|
MorphlineHandlerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction()
Begins a transaction
|
void |
commitTransaction()
Sends any outstanding documents to Solr and waits for a positive
or negative ack (i.e.
|
void |
configure(Context context)
Request the implementing class to (re)configure itself.
|
void |
process(Event event)
Loads the given event into Solr
|
void |
rollbackTransaction()
Performs a rollback of all non-committed documents pending.
|
void |
stop()
Releases allocated resources
|
public static final String MORPHLINE_FILE_PARAM
public static final String MORPHLINE_ID_PARAM
public static final String MORPHLINE_VARIABLE_PARAM
public void configure(Context context)
ConfigurableRequest the implementing class to (re)configure itself.
When configuration parameters are changed, they must be reflected by the component asap.
There are no thread safety guarantees on when configure might be called.
configure in interface Configurablepublic void process(Event event)
MorphlineHandlerprocess in interface MorphlineHandlerpublic void beginTransaction()
MorphlineHandlerbeginTransaction in interface MorphlineHandlerpublic void commitTransaction()
MorphlineHandlercommitTransaction in interface MorphlineHandlerpublic void rollbackTransaction()
MorphlineHandlerNote that this is not a true rollback as in databases. Content you have previously added to Solr may have already been committed due to autoCommit, buffer full, other client performing a commit etc. So this is only a best-effort rollback.
rollbackTransaction in interface MorphlineHandlerpublic void stop()
MorphlineHandlerstop in interface MorphlineHandlerCopyright © 2009-2022 Apache Software Foundation. All Rights Reserved.