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

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

                Author: ASF GitHub Bot
            Created on: 09/Aug/21 23:54
            Start Date: 09/Aug/21 23:54
    Worklog Time Spent: 10m 
      Work Description: Will-Lo commented on a change in pull request #3358:
URL: https://github.com/apache/gobblin/pull/3358#discussion_r685595903



##########
File path: 
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowExecutionResourceLocalHandler.java
##########
@@ -215,15 +216,18 @@ private static long 
getFlowStartTime(org.apache.gobblin.service.monitoring.FlowS
    * @param completionPercentage of the job
    * @return time left in seconds
    */
-  public static long estimateCopyTimeLeft(Long currentTime, Long startTime, 
int completionPercentage) {
+  public static String estimateCopyTimeLeft(Long currentTime, Long startTime, 
int completionPercentage) {
     if (completionPercentage == 0) {
-      return 0;
+      return "Not calculated yet";
     }
 
     Instant current = Instant.ofEpochMilli(currentTime);
     Instant start = Instant.ofEpochMilli(startTime);
     Long timeElapsed = Duration.between(start, current).getSeconds();
     Long timeLeft = (long) (timeElapsed * (100.0 / 
Double.valueOf(completionPercentage) - 1));
-    return timeLeft;
+
+    Long timeLeftInMilli = Instant.ofEpochSecond(timeLeft).toEpochMilli();

Review comment:
       I'm wondering if it makes sense to change the time to String here, or if 
we want to change it on the API level right before outputting the number to the 
user. A few minor caveats for doing it here is that strings take more space and 
that it'll be harder to run queries through the metrics with strings as opposed 
to a number for timestamps. Thoughts?
   




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


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

    Worklog Id:     (was: 636177)
    Time Spent: 1h 10m  (was: 1h)

> Fix Progress Reporting Behavior & Cleanup Logs
> ----------------------------------------------
>
>                 Key: GOBBLIN-1510
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1510
>             Project: Apache Gobblin
>          Issue Type: Improvement
>          Components: gobblin-core, gobblin-service
>            Reporter: Urmi Mustafi
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> # Currently, when a job approaches the end the progress can appear "stuck" at 
> 96-99% because the progress changes are only reported if they are larger than 
> the threshold (5%).
>  # Decrease number of logs 
>  # Format the estimated time left to be human readable "X hours Y min Z 
> seconds" rather than "40389 seconds"  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to