List of usage examples for org.apache.hadoop.streaming PipeMapRed getClientInput
public DataInput getClientInput()
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$); }