|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.flume.sink.hbase.RegexHbaseEventSerializer
public class RegexHbaseEventSerializer
An HbaseEventSerializer
which parses columns based on a supplied
regular expression and column name list.
Note that if the regular expression does not return the correct number of
groups for a particular event, or it does not correctly match an event,
the event is silently dropped.
Row keys for each event consist of a timestamp concatenated with an
identifier which enforces uniqueness of keys across flume agents.
See static constant variables for configuration options.
Field Summary | |
---|---|
protected byte[] |
cf
|
static String |
COL_NAME_CONFIG
Comma separated list of column names to place matching groups in. |
static String |
COLUMN_NAME_DEFAULT
|
static String |
IGNORE_CASE_CONFIG
Whether to ignore case when performing regex matches. |
static boolean |
INGORE_CASE_DEFAULT
|
protected static AtomicInteger |
nonce
|
protected static String |
randomKey
|
static String |
REGEX_CONFIG
Regular expression used to parse groups from event data. |
static String |
REGEX_DEFAULT
|
Constructor Summary | |
---|---|
RegexHbaseEventSerializer()
|
Method Summary | |
---|---|
void |
close()
|
void |
configure(ComponentConfiguration conf)
|
void |
configure(Context context)
Request the implementing class to (re)configure itself. |
List<org.apache.hadoop.hbase.client.Row> |
getActions()
Get the actions that should be written out to hbase as a result of this event. |
List<org.apache.hadoop.hbase.client.Increment> |
getIncrements()
|
protected byte[] |
getRowKey()
|
protected byte[] |
getRowKey(Calendar cal)
Returns a row-key with the following format: [time in millis]-[random key]-[nonce] |
void |
initialize(Event event,
byte[] columnFamily)
Initialize the event serializer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REGEX_CONFIG
public static final String REGEX_DEFAULT
public static final String IGNORE_CASE_CONFIG
public static final boolean INGORE_CASE_DEFAULT
public static final String COL_NAME_CONFIG
public static final String COLUMN_NAME_DEFAULT
protected static final AtomicInteger nonce
protected static String randomKey
protected byte[] cf
Constructor Detail |
---|
public RegexHbaseEventSerializer()
Method Detail |
---|
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 configure(ComponentConfiguration conf)
configure
in interface ConfigurableComponent
public void initialize(Event event, byte[] columnFamily)
HbaseEventSerializer
initialize
in interface HbaseEventSerializer
protected byte[] getRowKey(Calendar cal)
protected byte[] getRowKey()
public List<org.apache.hadoop.hbase.client.Row> getActions() throws FlumeException
HbaseEventSerializer
getActions
in interface HbaseEventSerializer
Row
which
are written as such to HBase.
0.92 increments do not implement Row, so this is not generic.
FlumeException
public List<org.apache.hadoop.hbase.client.Increment> getIncrements()
getIncrements
in interface HbaseEventSerializer
public void close()
close
in interface HbaseEventSerializer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |