use of org.apache.ignite.internal.processors.hadoop.shuffle.direct.HadoopDirectDataOutput in project ignite by apache.
the class HadoopDataStreamSelfTest method readLineByHadoopDirectDataInput.
/**
* @param val String value.
* @return List of strings are returned by readLine().
* @throws IOException On error.
*/
List<String> readLineByHadoopDirectDataInput(String val) throws IOException {
HadoopDirectDataOutput out = new HadoopDirectDataOutput(BUFF_SIZE);
out.write(val.getBytes());
byte[] inBuf = Arrays.copyOf(out.buffer(), out.position());
HadoopDirectDataInput in = new HadoopDirectDataInput(inBuf);
return readLineStrings(in);
}
use of org.apache.ignite.internal.processors.hadoop.shuffle.direct.HadoopDirectDataOutput in project ignite by apache.
the class HadoopDataStreamSelfTest method testDirectStreams.
/**
* @throws IOException If failed.
*/
public void testDirectStreams() throws IOException {
HadoopDirectDataOutput out = new HadoopDirectDataOutput(BUFF_SIZE);
write(out);
byte[] inBuf = Arrays.copyOf(out.buffer(), out.position());
HadoopDirectDataInput in = new HadoopDirectDataInput(inBuf);
checkRead(in);
}
Aggregations