aplex commented on a change in pull request #3358:
URL: https://github.com/apache/gobblin/pull/3358#discussion_r687232635
##########
File path:
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-api/src/main/pegasus/org/apache/gobblin/service/JobStatistics.pdl
##########
@@ -27,6 +27,7 @@ record JobStatistics {
/**
* estimate of time left until job completion
+ * "X hours Y minutes Z seconds"
*/
- estimatedSecondsToCompletion: long
+ estimatedTimeToCompletion: string
Review comment:
Rest APIs can be consumed by applications written in any language. Java
has DurationFormatUtils.formatDurationWords, but I guess there is no
counterpart in Python/Javascript that will be able to convert that string back
to internal duration format.
So, for API fields we should stick to formats that any programming language
can handle. To make the progress reporting more nice, we can convert those
seconds to human readable-message in the client app.
For dates, there is actually an ISO standard
https://en.wikipedia.org/wiki/ISO_8601 that is both human- and machine-
readable. Unfortunately, the current rest of the API uses milliseconds to
represent dates, and it's important to keep the API surface consistent. So, I
don't think we should migrate to it at this point, but we can do in the next
major API version. It also has a standard for duration, but it looks pretty
wired and I haven't seen it in other Rest APIs.
--
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]