Package org.apache.flink.runtime.io.network.serialization

Examples of org.apache.flink.runtime.io.network.serialization.DataInputDeserializer


    if (this.serializedEventList == null) {
      return Collections.emptyList();
    }

    try {
      DataInputDeserializer deserializer = new DataInputDeserializer(this.serializedEventList);

      int numEvents = deserializer.readInt();
      ArrayList<AbstractEvent> events = new ArrayList<AbstractEvent>(numEvents);

      for (int i = 0; i < numEvents; i++) {
        String className = deserializer.readUTF();
        Class<? extends AbstractEvent> clazz;
        try {
          clazz = Class.forName(className).asSubclass(AbstractEvent.class);
        } catch (ClassNotFoundException e) {
          throw new RuntimeException("Could not load event class '" + className + "'.", e);
View Full Code Here


        e.printStackTrace();
        Assert.fail("Test encountered an unexpected exception.");
      }
    }

    DataInputDeserializer deserializer = new DataInputDeserializer(serializer.wrapAsByteBuffer());

    for (SerializationTestType expected : reference) {
      try {
        SerializationTestType actual = expected.getClass().newInstance();
        actual.read(deserializer);
View Full Code Here

    id.write(out);

    ByteBuffer buff = out.wrapAsByteBuffer();

   
    DataInputDeserializer in = new DataInputDeserializer(buff);
   
    UID id2 = new UID();
    id2.read(in);

    assertEquals(id.getChannelId(), id2.getChannelId());
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.io.network.serialization.DataInputDeserializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.