Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.4.0, 3.3.5
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
Attachments
Issue Links
- links to