hadoop-yetus commented on a change in pull request #940: HADOOP-16341.
ShutDownHookManager: Regressed performance on Hook remo…
URL: https://github.com/apache/hadoop/pull/940#discussion_r293165689
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ShutdownHookManager.java
##########
@@ -354,7 +356,9 @@ public boolean removeShutdownHook(Runnable shutdownHook) {
@InterfaceAudience.Public
@InterfaceStability.Stable
public boolean hasShutdownHook(Runnable shutdownHook) {
- return hooks.contains(new HookEntry(shutdownHook, 0));
+ // hooks are only == by runnable
+ return hooks.remove(new HookEntry(shutdownHook, 0, TIMEOUT_MINIMUM,
+ TIME_UNIT_DEFAULT));
Review comment:
whitespace:tabs in line
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]