public abstract class AbstractProcessor extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
entryCount |
protected byte[] |
key |
protected String |
primaryKeyHelper |
protected String |
sourceHelper |
Constructor and Description |
---|
AbstractProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addMeta() |
void |
addRecord(long time,
String metric,
String source,
byte[] value,
ArrayList<org.apache.hadoop.hbase.client.Put> output)
Generic metric function to add a metric to HBase with full primary key and
source computed.
|
void |
addRecord(String metric,
byte[] value)
Generic function to add a metric to HBase metric table, this function
assumes "time" and "source" have been defined and will construct primaryKey
only, without recompute time and source md5.
|
void |
addRecord(String primaryKey,
String value) |
protected abstract void |
parse(byte[] recordEntry) |
void |
process(Chunk chunk,
ArrayList<org.apache.hadoop.hbase.client.Put> output,
Reporter reporter)
Process a chunk to store in HBase.
|
protected int entryCount
protected String primaryKeyHelper
protected String sourceHelper
protected byte[] key
public AbstractProcessor() throws NoSuchAlgorithmException
NoSuchAlgorithmException
public void addRecord(long time, String metric, String source, byte[] value, ArrayList<org.apache.hadoop.hbase.client.Put> output)
time
- metric
- source
- value
- output
- public void addRecord(String metric, byte[] value)
metric
- value
- public void process(Chunk chunk, ArrayList<org.apache.hadoop.hbase.client.Put> output, Reporter reporter) throws Throwable
chunk
- output
- reporter
- Throwable
protected void addMeta()
Copyright © 2015 Apache Software Foundation. All Rights Reserved.