Java Code Examples for org.apache.flink.runtime.executiongraph.ExecutionAttemptID#fromByteBuf()

The following examples show how to use org.apache.flink.runtime.executiongraph.ExecutionAttemptID#fromByteBuf() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Flink-CEPplus   File: NettyMessage.java    License: Apache License 2.0 6 votes vote down vote up
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);
}
 
Example 2
Source Project: flink   File: NettyMessage.java    License: Apache License 2.0 6 votes vote down vote up
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);
}
 
Example 3
Source Project: flink   File: NettyMessage.java    License: Apache License 2.0 6 votes vote down vote up
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);
}
 
Example 4
Source Project: Flink-CEPplus   File: NettyMessage.java    License: Apache License 2.0 5 votes vote down vote up
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);
}
 
Example 5
Source Project: Flink-CEPplus   File: NettyMessage.java    License: Apache License 2.0 5 votes vote down vote up
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);
}
 
Example 6
Source Project: flink   File: NettyMessage.java    License: Apache License 2.0 5 votes vote down vote up
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);
}
 
Example 7
Source Project: flink   File: NettyMessage.java    License: Apache License 2.0 5 votes vote down vote up
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);
}
 
Example 8
Source Project: flink   File: NettyMessage.java    License: Apache License 2.0 5 votes vote down vote up
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);
}