[ 
https://issues.apache.org/jira/browse/DRILL-5230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15857207#comment-15857207
 ] 

ASF GitHub Bot commented on DRILL-5230:
---------------------------------------

Github user kkhatua commented on a diff in the pull request:

    https://github.com/apache/drill/pull/739#discussion_r99975170
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileResources.java
 ---
    @@ -352,16 +369,26 @@ public String cancelQuery(@PathParam("queryid") 
String queryId) {
       private void checkOrThrowProfileViewAuthorization(final QueryProfile 
profile) {
         if (!principal.canManageProfileOf(profile.getUser())) {
           throw UserException.permissionError()
    -          .message("Not authorized to view the profile of query '%s'", 
profile.getId())
    -          .build(logger);
    +      .message("Not authorized to view the profile of query '%s'", 
profile.getId())
    +      .build(logger);
         }
       }
     
       private void checkOrThrowQueryCancelAuthorization(final String 
queryUser, final String queryId) {
         if (!principal.canManageQueryOf(queryUser)) {
           throw UserException.permissionError()
    -          .message("Not authorized to cancel the query '%s'", queryId)
    -          .build(logger);
    +      .message("Not authorized to cancel the query '%s'", queryId)
    +      .build(logger);
         }
       }
    +
    +  /**
    +   * Duration format definition
    +   * @author kkhatua
    --- End diff --
    
    My bad. Will fix that.


> Translation of millisecond duration into hours is incorrect
> -----------------------------------------------------------
>
>                 Key: DRILL-5230
>                 URL: https://issues.apache.org/jira/browse/DRILL-5230
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Web Server
>    Affects Versions: 1.9.0
>            Reporter: Kunal Khatua
>              Labels: easyfix
>             Fix For: 1.10.0
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The method 
> {code:JAVA}org.apache.drill.exec.server.rest.profile.TableBuilder.appendMillis(long,
>  String){code}
> has a bug where the human readable translation of a 1+ hr duration in 
> milliseconds is reported incorrectly. 
> This has to do with the {code:JAVA}SimpleDateFormat.format() {code} method 
> incorectly translating it. 
> For e.g.
> {code:JAVA}
> long x = 4545342L; //1 hour 15 min 45.342 sec
> public void appendMillis(x, null);
> {code}
> This formats the value as {noformat}17h15m{noformat} instead of 
> {noformat}1h15m{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to