public abstract class AbstractProcessor extends Object
Constructor and Description |
---|
AbstractProcessor() |
Modifier and Type | Method and Description |
---|---|
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) |
void |
process(Chunk chunk,
ArrayList<org.apache.hadoop.hbase.client.Put> output,
Reporter reporter)
Process a chunk to store in HBase.
|
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
- is timestamp in epochmetric
- is metric namesource
- is data source namevalue
- is metric value in bytesoutput
- is an array list of Put operationspublic void addRecord(String metric, byte[] value)
metric
- is metric namevalue
- is metric value in bytespublic void process(Chunk chunk, ArrayList<org.apache.hadoop.hbase.client.Put> output, Reporter reporter) throws Throwable
chunk
- is a Chukwa chunkoutput
- is an array of Put operationsreporter
- is a reporter to track progressThrowable
- if there is problem parsing dataCopyright © 2016 Apache Software Foundation. All Rights Reserved.