org.apache.hadoop.tools.rumen
Class Hadoop20JHParser

java.lang.Object
  extended by org.apache.hadoop.tools.rumen.Hadoop20JHParser
All Implemented Interfaces:
Closeable, JobHistoryParser

public class Hadoop20JHParser
extends Object
implements JobHistoryParser

JobHistoryParser to parse job histories for hadoop 0.20 (META=1).


Constructor Summary
Hadoop20JHParser(InputStream input)
           
 
Method Summary
static boolean canParse(InputStream input)
          Can this parser parse the input?
 void close()
           
 org.apache.hadoop.mapreduce.jobhistory.HistoryEvent nextEvent()
          Get the next HistoryEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hadoop20JHParser

public Hadoop20JHParser(InputStream input)
                 throws IOException
Throws:
IOException
Method Detail

canParse

public static boolean canParse(InputStream input)
                        throws IOException
Can this parser parse the input?

Parameters:
input -
Returns:
Whether this parser can parse the input.
Throws:
IOException - We will deem a stream to be a good 0.20 job history stream if the first line is exactly "Meta VERSION=\"1\" ."

nextEvent

public org.apache.hadoop.mapreduce.jobhistory.HistoryEvent nextEvent()
Description copied from interface: JobHistoryParser
Get the next HistoryEvent

Specified by:
nextEvent in interface JobHistoryParser
Returns:
the next HistoryEvent. If no more events left, return null.

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2009 The Apache Software Foundation