Search in sources :

Example 1 with HadoopDirectDataOutput

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);
}
Also used : HadoopDirectDataOutput(org.apache.ignite.internal.processors.hadoop.shuffle.direct.HadoopDirectDataOutput) HadoopDirectDataInput(org.apache.ignite.internal.processors.hadoop.shuffle.direct.HadoopDirectDataInput)

Example 2 with HadoopDirectDataOutput

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);
}
Also used : HadoopDirectDataOutput(org.apache.ignite.internal.processors.hadoop.shuffle.direct.HadoopDirectDataOutput) HadoopDirectDataInput(org.apache.ignite.internal.processors.hadoop.shuffle.direct.HadoopDirectDataInput)

Aggregations

HadoopDirectDataInput (org.apache.ignite.internal.processors.hadoop.shuffle.direct.HadoopDirectDataInput)2 HadoopDirectDataOutput (org.apache.ignite.internal.processors.hadoop.shuffle.direct.HadoopDirectDataOutput)2