public abstract class AbstractProcessor extends Object implements MapProcessor
Modifier and Type | Field and Description |
---|---|
protected ChukwaArchiveKey |
archiveKey |
protected Chunk |
chunk |
protected int |
currentPos |
protected ChukwaRecordKey |
key |
protected int |
startOffset |
Constructor and Description |
---|
AbstractProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildGenericRecord(ChukwaRecord record,
String body,
long timestamp,
String dataSource) |
int |
getCurrentPos() |
int |
getStartOffset() |
protected boolean |
hasNext() |
protected String |
nextLine() |
protected abstract void |
parse(String recordEntry,
org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,ChukwaRecord> output,
org.apache.hadoop.mapred.Reporter reporter) |
void |
process(ChukwaArchiveKey archiveKey,
Chunk chunk,
org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,ChukwaRecord> output,
org.apache.hadoop.mapred.Reporter reporter) |
protected void |
reset(Chunk chunk) |
protected void |
saveChunkInError(Throwable throwable) |
void |
setCurrentPos(int currentPos) |
void |
setStartOffset(int startOffset) |
protected int currentPos
protected int startOffset
protected ChukwaArchiveKey archiveKey
protected ChukwaRecordKey key
protected Chunk chunk
protected abstract void parse(String recordEntry, org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,ChukwaRecord> output, org.apache.hadoop.mapred.Reporter reporter) throws Throwable
Throwable
protected void saveChunkInError(Throwable throwable)
public void process(ChukwaArchiveKey archiveKey, Chunk chunk, org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,ChukwaRecord> output, org.apache.hadoop.mapred.Reporter reporter)
process
in interface MapProcessor
protected void buildGenericRecord(ChukwaRecord record, String body, long timestamp, String dataSource)
protected void reset(Chunk chunk)
protected boolean hasNext()
protected String nextLine()
public int getCurrentPos()
public void setCurrentPos(int currentPos)
public int getStartOffset()
public void setStartOffset(int startOffset)
Copyright © 2015 Apache Software Foundation. All Rights Reserved.