org.apache.hadoop.tools.rumen
Class JobTraceReader

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

public class JobTraceReader
extends Object

Reading JSON-encoded job traces and produce LoggedJob instances.


Constructor Summary
JobTraceReader(InputStream input)
          Constructor.
JobTraceReader(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
          Constructor.
 
Method Summary
 void close()
           
 T getNext()
          Get the next object from the trace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobTraceReader

public JobTraceReader(org.apache.hadoop.fs.Path path,
                      org.apache.hadoop.conf.Configuration conf)
               throws IOException
Constructor.

Parameters:
path - Path to the JSON trace file, possibly compressed.
conf -
Throws:
IOException

JobTraceReader

public JobTraceReader(InputStream input)
               throws IOException
Constructor.

Parameters:
input - The input stream for the JSON trace.
Throws:
IOException
Method Detail

getNext

public T getNext()
          throws IOException
Get the next object from the trace.

Returns:
The next instance of the object. Or null if we reach the end of stream.
Throws:
IOException

close

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


Copyright © 2009 The Apache Software Foundation