org.apache.hadoop.streaming.io
Class TypedBytesOutputReader

java.lang.Object
  extended by org.apache.hadoop.streaming.io.OutputReader<TypedBytesWritable,TypedBytesWritable>
      extended by org.apache.hadoop.streaming.io.TypedBytesOutputReader

public class TypedBytesOutputReader
extends OutputReader<TypedBytesWritable,TypedBytesWritable>

OutputReader that reads the client's output as typed bytes.


Constructor Summary
TypedBytesOutputReader()
           
 
Method Summary
 TypedBytesWritable getCurrentKey()
          Returns the current key.
 TypedBytesWritable getCurrentValue()
          Returns the current value.
 String getLastOutput()
          Returns the last output from the client as a String.
 void initialize(PipeMapRed pipeMapRed)
          Initializes the OutputReader.
 boolean readKeyValue()
          Read the next key/value pair outputted by the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedBytesOutputReader

public TypedBytesOutputReader()
Method Detail

initialize

public void initialize(PipeMapRed pipeMapRed)
                throws IOException
Description copied from class: OutputReader
Initializes the OutputReader. This method has to be called before calling any of the other methods.

Overrides:
initialize in class OutputReader<TypedBytesWritable,TypedBytesWritable>
Throws:
IOException

readKeyValue

public boolean readKeyValue()
                     throws IOException
Description copied from class: OutputReader
Read the next key/value pair outputted by the client.

Specified by:
readKeyValue in class OutputReader<TypedBytesWritable,TypedBytesWritable>
Returns:
true iff a key/value pair was read
Throws:
IOException

getCurrentKey

public TypedBytesWritable getCurrentKey()
                                 throws IOException
Description copied from class: OutputReader
Returns the current key.

Specified by:
getCurrentKey in class OutputReader<TypedBytesWritable,TypedBytesWritable>
Throws:
IOException

getCurrentValue

public TypedBytesWritable getCurrentValue()
                                   throws IOException
Description copied from class: OutputReader
Returns the current value.

Specified by:
getCurrentValue in class OutputReader<TypedBytesWritable,TypedBytesWritable>
Throws:
IOException

getLastOutput

public String getLastOutput()
Description copied from class: OutputReader
Returns the last output from the client as a String.

Specified by:
getLastOutput in class OutputReader<TypedBytesWritable,TypedBytesWritable>


Copyright © 2009 The Apache Software Foundation