atoomula commented on a change in pull request #932: [SAMZA-2114] Samza-Sql 
Diagnostics: SamzaSqlInputTransformer to check presence of event and arrival 
time in ime
URL: https://github.com/apache/samza/pull/932#discussion_r260110544
 
 

 ##########
 File path: 
samza-sql/src/main/java/org/apache/samza/sql/SamzaSqlInputTransformer.java
 ##########
 @@ -40,8 +40,9 @@
   public Object apply(IncomingMessageEnvelope ime) {
     Assert.notNull(ime, "ime is null");
     KV<Object, Object> keyAndMessageKV = KV.of(ime.getKey(), ime.getMessage());
-    SamzaSqlRelMsgMetadata metadata = new 
SamzaSqlRelMsgMetadata(Instant.ofEpochMilli(ime.getEventTime()).toString(),
-        Instant.ofEpochMilli(ime.getArrivalTime()).toString(), null);
+    SamzaSqlRelMsgMetadata metadata = new SamzaSqlRelMsgMetadata(
+        (ime.getEventTime() == 0) ? "" : 
Instant.ofEpochMilli(ime.getEventTime()).toString(),
+        (ime.getArrivalTime() == 0) ? "" 
:Instant.ofEpochMilli(ime.getArrivalTime()).toString(), null);
 
 Review comment:
   space betweeb ": Instant"

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to