Search in sources :

Example 1 with ClassIdPair

use of com.datatorrent.stram.codec.DefaultStatefulStreamCodec.ClassIdPair in project apex-core by apache.

the class DefaultStatefulStreamCodecTest method testVirginKryo.

@Test
public void testVirginKryo() {
    Kryo coder = new Kryo();
    Kryo decoder = new Kryo();
    ClassIdPair cip = new ClassIdPair();
    Output output = new Output(4096, Integer.MAX_VALUE);
    coder.writeClassAndObject(output, cip);
    Input input = new Input();
    input.setBuffer(output.toBytes());
    decoder.readClassAndObject(input);
}
Also used : Input(com.esotericsoftware.kryo.io.Input) Output(com.esotericsoftware.kryo.io.Output) ClassIdPair(com.datatorrent.stram.codec.DefaultStatefulStreamCodec.ClassIdPair) Kryo(com.esotericsoftware.kryo.Kryo) Test(org.junit.Test)

Aggregations

ClassIdPair (com.datatorrent.stram.codec.DefaultStatefulStreamCodec.ClassIdPair)1 Kryo (com.esotericsoftware.kryo.Kryo)1 Input (com.esotericsoftware.kryo.io.Input)1 Output (com.esotericsoftware.kryo.io.Output)1 Test (org.junit.Test)1