You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Jonathan Turner Eagles (Jira)" <ji...@apache.org> on 2022/04/27 22:11:00 UTC

[jira] [Created] (YARN-11116) Migrate Times util from SimpleDateFormat to thread-safe DateTimeFormatter class

Jonathan Turner Eagles created YARN-11116:
---------------------------------------------

             Summary: Migrate Times util from SimpleDateFormat to thread-safe DateTimeFormatter class
                 Key: YARN-11116
                 URL: https://issues.apache.org/jira/browse/YARN-11116
             Project: Hadoop YARN
          Issue Type: Bug
            Reporter: Jonathan Turner Eagles
            Assignee: Jonathan Turner Eagles


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

 

{noformat}

 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 
{noformat}

 

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.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org