Example usage for org.apache.hadoop.streaming PipeMapRed getClientInput

List of usage examples for org.apache.hadoop.streaming PipeMapRed getClientInput

Introduction

In this page you can find the example usage for org.apache.hadoop.streaming PipeMapRed getClientInput.

Prototype

public DataInput getClientInput() 

Source Link

Document

Returns the DataInput from which the client output is read.

Usage

From source file:fm.last.darling.hbase.HBaseJSONOutputReader.java

License:Apache License

@Override
public void initialize(PipeMapRed pipeMapRed) throws IOException {
    super.initialize(pipeMapRed);

    rowkey = new ImmutableBytesWritable();
    line = new Text();

    datainput = pipeMapRed.getClientInput();
    conf = pipeMapRed.getConfiguration();
    numKeyFields = pipeMapRed.getNumOfKeyFields();
    separator = pipeMapRed.getFieldSeparator();

    lineReader = new LineReader((InputStream) datainput, conf);
}

From source file:org.apache.cassandra.hadoop.streaming.AvroOutputReader.java

License:Apache License

@Override
public void initialize(PipeMapRed pmr) throws IOException {
    super.initialize(pmr);

    // set up decoding around the DataInput (hmm) provided by streaming
    InputStream in;//w  ww  .j a  v a2s  . com
    if (pmr.getClientInput() instanceof InputStream)
        // let's hope this is the case
        in = (InputStream) pmr.getClientInput();
    else
        // ...because this is relatively slow
        in = new FromDataInputStream(pmr.getClientInput());
    decoder = DecoderFactory.defaultFactory().createBinaryDecoder(in, null);
    reader = new SpecificDatumReader<StreamingMutation>(StreamingMutation.SCHEMA$);
}