|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.flume.sink.hbase.SimpleAsyncHbaseEventSerializer
public class SimpleAsyncHbaseEventSerializer
A simple serializer to be used with the AsyncHBaseSink that returns puts from an event, by writing the event body into it. The headers are discarded. It also updates a row in hbase which acts as an event counter. Takes optional parameters:
rowPrefix: The prefix to be used. Default: default
incrementRow The row to increment. Default: incRow
suffix: uuid/random/timestamp.Default: uuid
Mandatory parameters:
cf:Column family.
Components that have no defaults and will not be used if absent: payloadColumn: Which column to put payload in. If it is not present, event data will not be written.
incrementColumn: Which column to increment. If this is absent, it means no column is incremented.
Constructor Summary | |
---|---|
SimpleAsyncHbaseEventSerializer()
|
Method Summary | |
---|---|
void |
cleanUp()
Clean up any state. |
void |
configure(ComponentConfiguration conf)
|
void |
configure(Context context)
Request the implementing class to (re)configure itself. |
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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleAsyncHbaseEventSerializer()
Method Detail |
---|
public void initialize(byte[] table, byte[] cf)
AsyncHbaseEventSerializer
initialize
in interface AsyncHbaseEventSerializer
table
- - The table the serializer should use when creating
PutRequest
or
AtomicIncrementRequest
.cf
- - The column family to be used.public List<org.hbase.async.PutRequest> getActions()
AsyncHbaseEventSerializer
getActions
in interface AsyncHbaseEventSerializer
PutRequest
which
are written as such to HBase.public List<org.hbase.async.AtomicIncrementRequest> getIncrements()
AsyncHbaseEventSerializer
getIncrements
in interface AsyncHbaseEventSerializer
AtomicIncrementRequest
which
are written as such to HBase.public void cleanUp()
AsyncHbaseEventSerializer
cleanUp
in interface AsyncHbaseEventSerializer
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 guarrantees on when configure might be called.
configure
in interface Configurable
public void setEvent(Event event)
setEvent
in interface AsyncHbaseEventSerializer
public void configure(ComponentConfiguration conf)
configure
in interface ConfigurableComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |