FileSystem adds a JVM shutdown hook when a filesystem instance is cached.
MRAppMaster also uses a JVM shutdown hook, among other things, the MRAppMaster JVM shutdown hook is used to ensure state are written to HDFS.
This creates a race condition because each JVM shutdown hook is a separate thread and if there are multiple JVM shutdown hooks there is not assurance of order of execution, they could even run in parallel.
|Field||Original Value||New Value|
|Summary||remove FileSystem JVM shutdown hook that does closeAll()||Add a ShutdownHookManager to be used by different components instead of the JVM shutdownhook|
|Status||Patch Available [ 10002 ]||Resolved [ 5 ]|
|Hadoop Flags||Reviewed [ 10343 ]|
|Resolution||Fixed [ 1 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Fix Version/s||0.23.3 [ 12320059 ]|
|Fix Version/s||2.0.0-alpha [ 12320352 ]|
|Fix Version/s||2.0.2-alpha [ 12322473 ]|