Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-11116

Migrate Times util from SimpleDateFormat to thread-safe DateTimeFormatter class

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Came across a stack trace with SimpleDateFormatter in it which led me to investigate current practices

       

       6578 "IPC Server handler 29 on 8032" #797 daemon prio=5 os_prio=0 tid=0x00007fb6527d0000 nid=0x953b runnable [0x00007fb5ba034000]
       6579    java.lang.Thread.State: RUNNABLE
       6580     at org.apache.hadoop.yarn.util.Times.formatISO8601(Times.java:95)
       6581     at org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl.createAndGetApplicationReport(RMAppImpl.java:810)
       6582     at org.apache.hadoop.yarn.server.resourcemanager.ClientRMService.getApplicationReport(ClientRMService.java:396)
       6583     at org.apache.hadoop.yarn.api.impl.pb.service.ApplicationClientProtocolPBServiceImpl.getApplicationReport(ApplicationClientProtocolPBServiceImpl.java:224)
       6584     at org.apache.hadoop.yarn.proto.ApplicationClientProtocol$ApplicationClientProtocolService$2.callBlockingMethod(ApplicationClientProtocol.java:529)
       6585     at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:530)
       6586     at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:500)
       6587     at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1069)
       6588     at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:1003)
       6589     at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:936)
       6590     at java.security.AccessController.doPrivileged(Native Method)
       6591     at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:2135)
       6592     at org.apache.hadoop.security.UserGroupInformation.doAsPrivileged(UserGroupInformation.java:2123)
       6593     at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2875)
       6594 
      

       

      DateTimeFormatter is thread-safe meaning no need to wrap the class in Thread local as they can be reused safely across threads. In addition, the new classes are slightly more performant.

      Attachments

        1. YARN-11116.001.perftest.patch
          6 kB
          Jonathan Turner Eagles

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jeagles Jonathan Turner Eagles
            jeagles Jonathan Turner Eagles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 40m
                1h 40m

                Slack

                  Issue deployment