[ 
https://issues.apache.org/jira/browse/GOBBLIN-807?focusedWorklogId=268851&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-268851
 ]

ASF GitHub Bot logged work on GOBBLIN-807:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Jun/19 21:28
            Start Date: 27/Jun/19 21:28
    Worklog Time Spent: 10m 
      Work Description: ibuenros commented on pull request #2678: [GOBBLIN-807] 
TimingEvent is now closeable, extends GobblinEventBuilder
URL: https://github.com/apache/incubator-gobblin/pull/2678#discussion_r298377208
 
 

 ##########
 File path: 
gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/event/TimingEvent.java
 ##########
 @@ -84,46 +92,107 @@
   public static final String JOB_START_TIME = "jobStartTime";
   public static final String JOB_END_TIME = "jobEndTime";
 
-  private final String name;
-  private final Long startTime;
+  @Getter
+  private Long startTime;
+  @Getter
+  private Long endTime;
+  @Getter
+  private Long duration;
   private final EventSubmitter submitter;
   private boolean stopped;
 
   public TimingEvent(EventSubmitter submitter, String name) {
+    super(name);
     this.stopped = false;
-    this.name = name;
     this.submitter = submitter;
     this.startTime = System.currentTimeMillis();
   }
 
   /**
    * Stop the timer and submit the event. If the timer was already stopped 
before, this is a no-op.
+   * @deprecated Use {@link #close()}
    */
+  @Deprecated
 
 Review comment:
   Is there a reason to mark this as deprecated?
 
----------------------------------------------------------------
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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 268851)

> TimingEvent to extend GobblinEventBuilder 
> ------------------------------------------
>
>                 Key: GOBBLIN-807
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-807
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Vikram Bohra
>            Priority: Minor
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> GobblinEventBuilder and its subclasses should be used to build 
> GobblinTrackingEvents and EventSubmitter should solely be responsible for 
> submitting events. Depreacate older roles and methods 
> appropriately.TimingEvent should extend the GobblinEventBuilder while 
> maintaining older methods for backward compatability.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to