org.apache.hadoop.tools.rumen
Interface InputDemuxer

All Superinterfaces:
Closeable
All Known Implementing Classes:
DefaultInputDemuxer

public interface InputDemuxer
extends Closeable

InputDemuxer dem-ultiplexes the input files into individual input streams.


Method Summary
 void bindTo(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
          Bind the InputDemuxer to a particular file.
 org.apache.hadoop.tools.rumen.Pair<String,InputStream> getNext()
          Get the next pair.
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

bindTo

void bindTo(org.apache.hadoop.fs.Path path,
            org.apache.hadoop.conf.Configuration conf)
            throws IOException
Bind the InputDemuxer to a particular file.

Parameters:
path - The path to the file it should bind to.
conf - Configuration
Throws:
IOException - Returns true when the binding succeeds. If the file can be read but is in the wrong format, returns false. IOException is reserved for read errors.

getNext

org.apache.hadoop.tools.rumen.Pair<String,InputStream> getNext()
                                                               throws IOException
Get the next pair. The name should preserve the original job history file or job conf file name. The input object should be closed before calling getNext() again. The old input object would be invalid after calling getNext() again.

Returns:
the next pair.
Throws:
IOException


Copyright © 2009 The Apache Software Foundation