org.apache.hadoop.streaming.io
Class TextOutputReader

java.lang.Object
  extended by org.apache.hadoop.streaming.io.OutputReader<Text,Text>
      extended by org.apache.hadoop.streaming.io.TextOutputReader

public class TextOutputReader
extends OutputReader<Text,Text>

OutputReader that reads the client's output as text.


Constructor Summary
TextOutputReader()
           
 
Method Summary
 Text getCurrentKey()
          Returns the current key.
 Text 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

TextOutputReader

public TextOutputReader()
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<Text,Text>
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<Text,Text>
Returns:
true iff a key/value pair was read
Throws:
IOException

getCurrentKey

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

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

getCurrentValue

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

Specified by:
getCurrentValue in class OutputReader<Text,Text>
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<Text,Text>


Copyright © 2009 The Apache Software Foundation