org.apache.flume.sink.hbase
Interface AsyncHbaseEventSerializer

All Superinterfaces:
Configurable, ConfigurableComponent
All Known Implementing Classes:
SimpleAsyncHbaseEventSerializer

public interface AsyncHbaseEventSerializer
extends Configurable, ConfigurableComponent

Interface for an event serializer which serializes the headers and body of an event to write them to hbase. This is configurable, so any config params required should be taken through this. The table should be valid on the column family. An implementation of this interface is expected by the AsyncHBaseSink to serialize the events.


Method Summary
 void cleanUp()
          Clean up any state.
 List<org.hbase.async.PutRequest> getActions()
          Get the actions that should be written out to hbase as a result of this event.
 List<org.hbase.async.AtomicIncrementRequest> getIncrements()
          Get the increments that should be made in hbase as a result of this event.
 void initialize(byte[] table, byte[] cf)
          Initialize the event serializer.
 void setEvent(Event event)
           
 
Methods inherited from interface org.apache.flume.conf.Configurable
configure
 
Methods inherited from interface org.apache.flume.conf.ConfigurableComponent
configure
 

Method Detail

initialize

void initialize(byte[] table,
                byte[] cf)
Initialize the event serializer.

Parameters:
table - - The table the serializer should use when creating PutRequest or AtomicIncrementRequest.
cf - - The column family to be used.

setEvent

void setEvent(Event event)
Parameters:
Event - to be written to HBase.

getActions

List<org.hbase.async.PutRequest> getActions()
Get the actions that should be written out to hbase as a result of this event. This list is written to hbase.

Returns:
List of PutRequest which are written as such to HBase.

getIncrements

List<org.hbase.async.AtomicIncrementRequest> getIncrements()
Get the increments that should be made in hbase as a result of this event. This list is written to hbase.

Returns:
List of AtomicIncrementRequest which are written as such to HBase.

cleanUp

void cleanUp()
Clean up any state. This will be called when the sink is being stopped.



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