Package eu.stratosphere.runtime.io.serialization

Examples of eu.stratosphere.runtime.io.serialization.DataOutputSerializer.wrapAsByteBuffer()


      for (AbstractEvent evt : events) {
        serializer.writeUTF(evt.getClass().getName());
        evt.write(serializer);
      }

      return serializer.wrapAsByteBuffer();
    }
    catch (IOException e) {
      throw new RuntimeException("Error while serializing the task events.", e);
    }
  }
View Full Code Here


      // Write out the ConnectionHeader
      DataOutputSerializer buf = new DataOutputSerializer(4 + header.getProtocol().getBytes().length + 1);
      header.write(buf);

      // Write out the payload length
      ByteBuffer wrapper = buf.wrapAsByteBuffer();
      int bufLen = wrapper.limit();
      out.writeInt(bufLen);
      out.write(wrapper.array(), 0, bufLen);
    }
View Full Code Here

          // First, write call id to buffer d
          d.writeInt(call.id);
          // Then write RPC data (the actual call) to buffer d
          call.param.write(d);

          ByteBuffer wrapper = d.wrapAsByteBuffer();
          byte[] data = wrapper.array();
          int dataLength = wrapper.limit();
          out.writeInt(dataLength); // first put the data length
          out.write(data, 0, dataLength);// write the data
          out.flush();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.