prateekm commented on a change in pull request #1117: [SAMZA-2283] Samza Sql 
Diagnostics: make latency metrics changes backward compatible
URL: https://github.com/apache/samza/pull/1117#discussion_r307944666
 
 

 ##########
 File path: 
samza-api/src/main/java/org/apache/samza/system/IncomingMessageEnvelope.java
 ##########
 @@ -92,21 +92,55 @@ public IncomingMessageEnvelope(SystemStreamPartition 
systemStreamPartition, Stri
   }
 
   /**
-   * Getter for event time
+   * Getter for event time (Nanos)
    * @return this.eventTime
    */
-  public long getEventTime() {
+  public long getEventTimeNanos() {
     return eventTime;
   }
 
   /**
-   * Getter for arrival time
+   * Getter for arrival time (Nanos)
    * @return this.arrivalTime
    */
-  public long getArrivalTime() {
+  public long getArrivalTimeNanos() {
     return arrivalTime;
   }
 
+  /**
+   * For backward compatibility, Since arrivalTime was in Millis and 
getArrivalTime was returning
+   * arrivalTime (in Millis)
+   * @return arrivalTime in Millis
+   */
+  public long getArrivalTime() {
+    return getArrivalTimeMillis();
+  }
+
+  /**
+   * For backward compatibility, Since eventTime was in Millis and 
getEventTime was returning
+   * evenTime (in Millis)
+   * @return
+   */
+  public long getEventTime() {
+    return getEventTimeMillis();
+  }
+
+  /**
+   * Getter for event time in Millis
+   * @return this.eventTime / 10^6
+   */
+  public long getEventTimeMillis() {
+    return eventTime / MILLIS_IN_NANO;
+  }
+
+  /**
+   * Getter for arrival time in Millis
+   * @return this.arrivalTime / 10^6
+   */
+  public long getArrivalTimeMillis() {
 
 Review comment:
   I'd like to understand what we're trying to achieve here. Backwards 
compatibility is fine, but now there are 6 time related methods in this class 
which is not helpful.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to