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 "Akira Ajisaka (Jira)" <ji...@apache.org> on 2022/05/02 18:19:00 UTC
[jira] [Resolved] (YARN-11116) Migrate Times util from SimpleDateFormat to thread-safe DateTimeFormatter class
[ https://issues.apache.org/jira/browse/YARN-11116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Akira Ajisaka resolved YARN-11116.
----------------------------------
Fix Version/s: 3.4.0
3.2.4
3.3.4
Resolution: Fixed
Committed to trunk, branch-3.3, and branch-3.2. Thank you [~jeagles] for your contribution!
> 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: Improvement
> Reporter: Jonathan Turner Eagles
> Assignee: Jonathan Turner Eagles
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.4.0, 3.2.4, 3.3.4
>
> Attachments: YARN-11116.001.perftest.patch
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> 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