ayushtkn commented on code in PR #341:
URL: https://github.com/apache/tez/pull/341#discussion_r1547372195
##########
tez-runtime-internals/src/main/java/org/apache/tez/common/ProtoConverters.java:
##########
@@ -135,15 +138,22 @@ public static VertexManagerEvent
convertVertexManagerEventFromProto(
if (event.getUserPayload() != null) {
builder.setUserPayload(ByteString.copyFrom(event.getUserPayload()));
}
+ if (event.getSerializedPath() != null) {
+
builder.setSerializedPath(ByteString.copyFrom(event.getSerializedPath().getBytes(Charsets.UTF_8)));
+ }
return builder.build();
}
- public static InputDataInformationEvent
- convertRootInputDataInformationEventFromProto(
+ public static InputDataInformationEvent
convertRootInputDataInformationEventFromProto(
EventProtos.RootInputDataInformationEventProto proto) {
- InputDataInformationEvent diEvent =
InputDataInformationEvent.createWithSerializedPayload(
- proto.getSourceIndex(),
- proto.hasUserPayload() ? proto.getUserPayload().asReadOnlyByteBuffer()
: null);
+ ByteBuffer payload = proto.hasUserPayload() ?
proto.getUserPayload().asReadOnlyByteBuffer() : null;
+ InputDataInformationEvent diEvent = null;
+ if (!proto.getSerializedPath().isEmpty()) {
Review Comment:
should be ok if it can never reach & there is no public method which can
reach here, else maybe we can have Preconditions or Assert to see we don't land
up having two source of truth accidentally even in future, but I am ok
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]