public class SimpleAsyncHbaseEventSerializer extends Object implements AsyncHbaseEventSerializer
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 and Description |
---|
SimpleAsyncHbaseEventSerializer() |
Modifier and Type | Method and Description |
---|---|
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) |
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 guarantees on when configure might be called.
configure
in interface Configurable
public void setEvent(Event event)
setEvent
in interface AsyncHbaseEventSerializer
event
- Event to be written to HBasepublic void configure(ComponentConfiguration conf)
configure
in interface ConfigurableComponent
Copyright © 2009-2016 Apache Software Foundation. All Rights Reserved.