@Override public void readFrom(ByteBuf buffer) throws IOException { // TODO Directly deserialize fromNetty's buffer int length = buffer.readInt(); ByteBuffer serializedEvent = ByteBuffer.allocate(length); buffer.readBytes(serializedEvent); serializedEvent.flip(); event = (TaskEvent) EventSerializer.fromSerializedEvent(serializedEvent, getClass().getClassLoader()); partitionId = new ResultPartitionID(IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); receiverId = InputChannelID.fromByteBuf(buffer); } }
@Override public void readFrom(ByteBuf buffer) { partitionId = new ResultPartitionID(IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); queueIndex = buffer.readInt(); receiverId = InputChannelID.fromByteBuf(buffer); }
static AddCredit readFrom(ByteBuf buffer) { ResultPartitionID partitionId = new ResultPartitionID( IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); int credit = buffer.readInt(); InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); return new AddCredit(partitionId, credit, receiverId); }
static AddCredit readFrom(ByteBuf buffer) { ResultPartitionID partitionId = new ResultPartitionID( IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); int credit = buffer.readInt(); InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); return new AddCredit(partitionId, credit, receiverId); }
static AddCredit readFrom(ByteBuf buffer) { ResultPartitionID partitionId = new ResultPartitionID( IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); int credit = buffer.readInt(); InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); return new AddCredit(partitionId, credit, receiverId); }
static PartitionRequest readFrom(ByteBuf buffer) { ResultPartitionID partitionId = new ResultPartitionID( IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); int queueIndex = buffer.readInt(); InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); int credit = buffer.readInt(); return new PartitionRequest(partitionId, queueIndex, receiverId, credit); }
static PartitionRequest readFrom(ByteBuf buffer) { ResultPartitionID partitionId = new ResultPartitionID( IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); int queueIndex = buffer.readInt(); InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); int credit = buffer.readInt(); return new PartitionRequest(partitionId, queueIndex, receiverId, credit); }
static PartitionRequest readFrom(ByteBuf buffer) { ResultPartitionID partitionId = new ResultPartitionID( IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); int queueIndex = buffer.readInt(); InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); int credit = buffer.readInt(); return new PartitionRequest(partitionId, queueIndex, receiverId, credit); }
static TaskEventRequest readFrom(ByteBuf buffer, ClassLoader classLoader) throws IOException { // directly deserialize fromNetty's buffer int length = buffer.readInt(); ByteBuffer serializedEvent = buffer.nioBuffer(buffer.readerIndex(), length); // assume this event's content is read from the ByteBuf (positions are not shared!) buffer.readerIndex(buffer.readerIndex() + length); TaskEvent event = (TaskEvent) EventSerializer.fromSerializedEvent(serializedEvent, classLoader); ResultPartitionID partitionId = new ResultPartitionID( IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); return new TaskEventRequest(event, partitionId, receiverId); } }
static TaskEventRequest readFrom(ByteBuf buffer, ClassLoader classLoader) throws IOException { // directly deserialize fromNetty's buffer int length = buffer.readInt(); ByteBuffer serializedEvent = buffer.nioBuffer(buffer.readerIndex(), length); // assume this event's content is read from the ByteBuf (positions are not shared!) buffer.readerIndex(buffer.readerIndex() + length); TaskEvent event = (TaskEvent) EventSerializer.fromSerializedEvent(serializedEvent, classLoader); ResultPartitionID partitionId = new ResultPartitionID( IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); return new TaskEventRequest(event, partitionId, receiverId); } }
static TaskEventRequest readFrom(ByteBuf buffer, ClassLoader classLoader) throws IOException { // directly deserialize fromNetty's buffer int length = buffer.readInt(); ByteBuffer serializedEvent = buffer.nioBuffer(buffer.readerIndex(), length); // assume this event's content is read from the ByteBuf (positions are not shared!) buffer.readerIndex(buffer.readerIndex() + length); TaskEvent event = (TaskEvent) EventSerializer.fromSerializedEvent(serializedEvent, classLoader); ResultPartitionID partitionId = new ResultPartitionID( IntermediateResultPartitionID.fromByteBuf(buffer), ExecutionAttemptID.fromByteBuf(buffer)); InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); return new TaskEventRequest(event, partitionId, receiverId); } }