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)
Configurable
Request 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 Configurable
public void process(Event event)
MorphlineHandler
process
in interface MorphlineHandler
public void beginTransaction()
MorphlineHandler
beginTransaction
in interface MorphlineHandler
public void commitTransaction()
MorphlineHandler
commitTransaction
in interface MorphlineHandler
public void rollbackTransaction()
MorphlineHandler
Note 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 MorphlineHandler
public void stop()
MorphlineHandler
stop
in interface MorphlineHandler
Copyright © 2009-2016 Apache Software Foundation. All Rights Reserved.