org.apache.hadoop.chukwa.analysis.salsa.fsm
Class JobHistoryTaskDataMapper

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.hadoop.chukwa.analysis.salsa.fsm.JobHistoryTaskDataMapper
All Implemented Interfaces:
Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<ChukwaRecordKey,ChukwaRecord,ChukwaRecordKey,FSMIntermedEntry>

public class JobHistoryTaskDataMapper
extends org.apache.hadoop.mapred.MapReduceBase
implements org.apache.hadoop.mapred.Mapper<ChukwaRecordKey,ChukwaRecord,ChukwaRecordKey,FSMIntermedEntry>

Pluggable mapper for FSMBuilder Supports only 0.20+ JobHistory files because of explicitly coded counter names K2 = State Name + State ID (We use ChukwaRecordKey since it would already have implemented a bunch of useful things such as Comparators etc.) V2 = TreeMap


Field Summary
protected static String FSM_CRK_ReduceType
           
protected static String SEP
           
 
Constructor Summary
JobHistoryTaskDataMapper()
           
 
Method Summary
protected  boolean expandReduceEnd(ChukwaRecordKey key, ChukwaRecord val, org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,FSMIntermedEntry> output, org.apache.hadoop.mapred.Reporter reporter, FSMIntermedEntry this_rec)
           
protected  boolean expandReduceStart(ChukwaRecordKey key, ChukwaRecord val, org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,FSMIntermedEntry> output, org.apache.hadoop.mapred.Reporter reporter, FSMIntermedEntry this_rec)
           
 void map(ChukwaRecordKey key, ChukwaRecord val, org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,FSMIntermedEntry> output, org.apache.hadoop.mapred.Reporter reporter)
           
protected  FSMIntermedEntry populateRecord_MapCounters(FSMIntermedEntry this_rec, ChukwaRecord val, ArrayList<String> fieldNamesList)
           
protected  FSMIntermedEntry populateRecord_ReduceCounters(FSMIntermedEntry this_rec, ChukwaRecord val, ArrayList<String> fieldNamesList)
           
 
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase
close, configure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.mapred.JobConfigurable
configure
 
Methods inherited from interface java.io.Closeable
close
 

Field Detail

SEP

protected static final String SEP
See Also:
Constant Field Values

FSM_CRK_ReduceType

protected static String FSM_CRK_ReduceType
Constructor Detail

JobHistoryTaskDataMapper

public JobHistoryTaskDataMapper()
Method Detail

populateRecord_MapCounters

protected FSMIntermedEntry populateRecord_MapCounters(FSMIntermedEntry this_rec,
                                                      ChukwaRecord val,
                                                      ArrayList<String> fieldNamesList)

populateRecord_ReduceCounters

protected FSMIntermedEntry populateRecord_ReduceCounters(FSMIntermedEntry this_rec,
                                                         ChukwaRecord val,
                                                         ArrayList<String> fieldNamesList)

map

public void map(ChukwaRecordKey key,
                ChukwaRecord val,
                org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,FSMIntermedEntry> output,
                org.apache.hadoop.mapred.Reporter reporter)
         throws IOException
Specified by:
map in interface org.apache.hadoop.mapred.Mapper<ChukwaRecordKey,ChukwaRecord,ChukwaRecordKey,FSMIntermedEntry>
Throws:
IOException

expandReduceStart

protected boolean expandReduceStart(ChukwaRecordKey key,
                                    ChukwaRecord val,
                                    org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,FSMIntermedEntry> output,
                                    org.apache.hadoop.mapred.Reporter reporter,
                                    FSMIntermedEntry this_rec)
                             throws IOException
Throws:
IOException

expandReduceEnd

protected boolean expandReduceEnd(ChukwaRecordKey key,
                                  ChukwaRecord val,
                                  org.apache.hadoop.mapred.OutputCollector<ChukwaRecordKey,FSMIntermedEntry> output,
                                  org.apache.hadoop.mapred.Reporter reporter,
                                  FSMIntermedEntry this_rec)
                           throws IOException
Throws:
IOException


Copyright © ${year} The Apache Software Foundation