org.apache.flume.sink.solr.morphline
Interface MorphlineHandler

All Superinterfaces:
Configurable
All Known Implementing Classes:
MorphlineHandlerImpl

public interface MorphlineHandler
extends Configurable

Interface to load Flume events into Solr


Method Summary
 void beginTransaction()
          Begins a transaction
 void commitTransaction()
          Sends any outstanding documents to Solr and waits for a positive or negative ack (i.e.
 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
 
Methods inherited from interface org.apache.flume.conf.Configurable
configure
 

Method Detail

beginTransaction

void beginTransaction()
Begins a transaction


process

void process(Event event)
Loads the given event into Solr


commitTransaction

void commitTransaction()
Sends any outstanding documents to Solr and waits for a positive or negative ack (i.e. exception). Depending on the outcome the caller should then commit or rollback the current flume transaction correspondingly.

Throws:
IOException - If there is a low-level I/O error.

rollbackTransaction

void rollbackTransaction()
Performs a rollback of all non-committed documents pending.

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.

Throws:
IOException - If there is a low-level I/O error.

stop

void stop()
Releases allocated resources



Copyright © 2009-2015 Apache Software Foundation. All Rights Reserved.