[
https://issues.apache.org/jira/browse/HDDS-310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16565887#comment-16565887
]
Nanda kumar commented on HDDS-310:
----------------------------------
[~bharatviswa], you don't need {{saveVolumeSetUsed}} variable.
Case 1. If someone calls {{shutdown}} method first, we will be executing
{{saveVolumeSetUsed()}} used and remove the shutdownHook. In this case,
shutdown hook will never get executed.
Case 2. No one calls {{shutdown}} method, we will execute shutdown hook which
will call {{saveVolumeSetUsed()}}.
The issue was with removing shutdown hook inside a shutdown hook call, this is
avoided by the introduction of {{saveVolumeSetUsed()}} method. Even without
{{saveVolumeSetUsed}} variable, the behavior will be same.
> VolumeSet shutdown hook fails on datanode restart
> -------------------------------------------------
>
> Key: HDDS-310
> URL: https://issues.apache.org/jira/browse/HDDS-310
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: Ozone Datanode
> Affects Versions: 0.2.1
> Reporter: Mukul Kumar Singh
> Assignee: Bharat Viswanadham
> Priority: Major
> Fix For: 0.2.1
>
> Attachments: HDDS-310.00.patch
>
>
> {code}
> 2018-08-01 11:01:57,204 WARN org.apache.hadoop.fs.CachingGetSpaceUsed: Thread
> Interrupted waiting to refresh disk information: sleep interrupted
> 2018-08-01 11:01:57,204 WARN org.apache.hadoop.util.ShutdownHookManager:
> ShutdownHook 'VolumeSet$$Lambda$13/360062456' failed,
> java.util.concurrent.ExecutionException: java.lang.IllegalStateException:
> Shutdown in progress, cannot remove a shutdownHook
> java.util.concurrent.ExecutionException: java.lang.IllegalStateException:
> Shutdown in progress, cannot remove a shutdownHook
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> at java.util.concurrent.FutureTask.get(FutureTask.java:206)
> at
> org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:68)
> Caused by: java.lang.IllegalStateException: Shutdown in progress, cannot
> remove a shutdownHook
> at
> org.apache.hadoop.util.ShutdownHookManager.removeShutdownHook(ShutdownHookManager.java:247)
> at
> org.apache.hadoop.ozone.container.common.volume.VolumeSet.shutdown(VolumeSet.java:317)
> at
> org.apache.hadoop.ozone.container.common.volume.VolumeSet.lambda$initializeVolumeSet$0(VolumeSet.java:170)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]