org.apache.hadoop.chukwa.extraction.demux.processor.mapper
Class AbstractProcessor

java.lang.Object
  extended by org.apache.hadoop.chukwa.extraction.demux.processor.mapper.AbstractProcessor
All Implemented Interfaces:
MapProcessor
Direct Known Subclasses:
ClientTraceProcessor, DebugOutputProcessor, DefaultProcessor, Df, HadoopLogProcessor, HadoopMetricsProcessor, Iostat, JobConfProcessor, JobLog, JobLogHistoryProcessor, JPluginMapper, Log4jJobHistoryProcessor, Log4JMetricsContextProcessor, PbsNodes, Ps, Sar, SysLog, Top, Torque, TsProcessor, YWatch

public abstract class AbstractProcessor
extends Object
implements MapProcessor


Field Summary
protected  ChukwaArchiveKey archiveKey
           
protected  Chunk chunk
           
protected  ChukwaRecordKey key
           
 
Constructor Summary
AbstractProcessor()
           
 
Method Summary
protected  void buildGenericRecord(ChukwaRecord record, String body, long timestamp, String dataSource)
           
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

archiveKey

protected ChukwaArchiveKey archiveKey

key

protected ChukwaRecordKey key

chunk

protected Chunk chunk
Constructor Detail

AbstractProcessor

public AbstractProcessor()
Method Detail

parse

protected abstract void parse(String recordEntry,
                              org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,ChukwaRecord> output,
                              org.apache.hadoop.mapred.Reporter reporter)
                       throws Throwable
Throws:
Throwable

saveChunkInError

protected void saveChunkInError(Throwable throwable)

process

public void process(ChukwaArchiveKey archiveKey,
                    Chunk chunk,
                    org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,ChukwaRecord> output,
                    org.apache.hadoop.mapred.Reporter reporter)
Specified by:
process in interface MapProcessor

buildGenericRecord

protected void buildGenericRecord(ChukwaRecord record,
                                  String body,
                                  long timestamp,
                                  String dataSource)

reset

protected void reset(Chunk chunk)

hasNext

protected boolean hasNext()

nextLine

protected String nextLine()


Copyright © ${year} The Apache Software Foundation