org.apache.pig.impl.streaming
Class FileOutputHandler

java.lang.Object
  extended by org.apache.pig.impl.streaming.OutputHandler
      extended by org.apache.pig.impl.streaming.FileOutputHandler

public class FileOutputHandler
extends OutputHandler

FileOutputHandler handles the output from the Pig-Streaming executable in an asynchronous manner by reading it from an external file specified by the user.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.impl.streaming.OutputHandler
OutputHandler.OutputType
 
Field Summary
 
Fields inherited from class org.apache.pig.impl.streaming.OutputHandler
alreadyClosed, deserializer, END_OF_OUTPUT, in
 
Constructor Summary
FileOutputHandler(StreamingCommand.HandleSpec handleSpec)
           
 
Method Summary
 void bindTo(String fileName, BufferedPositionedInputStream is, long offset, long end)
          Bind the OutputHandler to the InputStream from which to read the output data of the managed process.
 OutputHandler.OutputType getOutputType()
          Get the handled OutputType.
 
Methods inherited from class org.apache.pig.impl.streaming.OutputHandler
close, getNext, getRecordDelimiter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileOutputHandler

public FileOutputHandler(StreamingCommand.HandleSpec handleSpec)
                  throws ExecException
Throws:
ExecException
Method Detail

getOutputType

public OutputHandler.OutputType getOutputType()
Description copied from class: OutputHandler
Get the handled OutputType.

Specified by:
getOutputType in class OutputHandler
Returns:
the handled OutputType

bindTo

public void bindTo(String fileName,
                   BufferedPositionedInputStream is,
                   long offset,
                   long end)
            throws IOException
Description copied from class: OutputHandler
Bind the OutputHandler to the InputStream from which to read the output data of the managed process.

Overrides:
bindTo in class OutputHandler
is - InputStream from which to read the output data of the managed process
Throws:
IOException


Copyright © 2007-2012 The Apache Software Foundation