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 OutputType#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
deserializer
 
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.
 void close()
          Close the OutputHandler.
 OutputHandler.OutputType getOutputType()
          Get the handled OutputType.
 
Methods inherited from class org.apache.pig.impl.streaming.OutputHandler
getNext
 
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

close

public void close()
           throws IOException
Description copied from class: OutputHandler
Close the OutputHandler.

Overrides:
close in class OutputHandler
Throws:
IOException


Copyright © ${year} The Apache Software Foundation