abstractdog commented on code in PR #341:
URL: https://github.com/apache/tez/pull/341#discussion_r1547349710


##########
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:
   idea was: if there is serializedPath, we just use it and don't care about 
payload, we should have one or another, not both
   I think the static InputDataInformationEvent creator methods take care of 
not having both
   is it fine?



-- 
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]

Reply via email to