public class ShutdownHook extends Object
|Modifier and Type||Field and Description|
Key for a long configuration on how much time to wait on the fs shutdown hook.
Key for boolean configuration whose default is true.
|Constructor and Description|
|Modifier and Type||Method and Description|
Install a shutdown hook that calls stop on the passed Stoppable and then thread joins against the passed
Main to test basic functionality.
public static final String RUN_SHUTDOWN_HOOK
public static void install(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, Stoppable stop, Thread threadToJoin)
threadToJoin. When this thread completes, it then runs the hdfs thread (This install removes the hdfs shutdown hook keeping a handle on it to run it after
To suppress all shutdown hook handling -- both the running of the
regionserver hook and of the hdfs hook code -- set
This configuration value is checked when the hook code runs.
fs- Instance of Filesystem used by the RegionServer
stop- Installed shutdown hook will call stop against this passed
threadToJoin- After calling stop on
stopwill then join this thread.
public static void main(String args) throws IOException
Copyright © 2015 The Apache Software Foundation. All rights reserved.