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


##########
tez-api/src/main/java/org/apache/tez/runtime/api/events/InputDataInformationEvent.java:
##########
@@ -103,6 +113,7 @@ public Object getDeserializedUserPayload() {
   public String toString() {
     return "InputDataInformationEvent [sourceIndex=" + sourceIndex + ", 
targetIndex="
         + targetIndex + ", serializedUserPayloadExists=" + (userPayload != 
null)
-        + ", deserializedUserPayloadExists=" + (userPayloadObject != null) + 
"]";
-  } 
+        + ", deserializedUserPayloadExists=" + (userPayloadObject != null)
+        + ", serializedPath=" + serializedPath + "]";

Review Comment:
   If serializedPath is null then it would look a bit odd. I like to handle 
this type of scenario. But this is just styling :) 



##########
tez-api/src/main/java/org/apache/tez/runtime/api/events/InputDataInformationEvent.java:
##########
@@ -79,6 +79,12 @@ public static InputDataInformationEvent 
createWithObjectPayload(int srcIndex,
     return new InputDataInformationEvent(srcIndex, userPayloadDeserialized, 
null);
   }
 
+  public static InputDataInformationEvent createWithSerializedPath(int 
srcIndex, String serializedPath) {
+    InputDataInformationEvent event = new InputDataInformationEvent(srcIndex, 
null);
+    event.serializedPath = serializedPath;

Review Comment:
   Won't just be easier to add a 3rd constructor for the 
InputDataInformationEvent? To set a property is fine, just not fail safe.



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