From dc184247237e347999ea5fb52414c4b958c31d78 Mon Sep 17 00:00:00 2001 From: Alejandro Abdelnur Date: Mon, 8 Jul 2013 23:11:03 +0000 Subject: [PATCH] HDFS-4841. FsShell commands using secure webhfds fail ClientFinalizer shutdown hook. (rkanter via tucu) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1501006 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/hadoop/fs/FileSystem.java | 3 ++- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java index 20c6e88fc2c..c484033231a 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java @@ -2469,7 +2469,8 @@ public abstract class FileSystem extends Configured implements Closeable { } // now insert the new file system into the map - if (map.isEmpty() ) { + if (map.isEmpty() + && !ShutdownHookManager.get().isShutdownInProgress()) { ShutdownHookManager.get().addShutdownHook(clientFinalizer, SHUTDOWN_HOOK_PRIORITY); } fs.key = key; diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 09fba7c1454..372eb75edba 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -965,6 +965,9 @@ Release 2.1.0-beta - 2013-07-02 HDFS-4875. Add a test for testing snapshot file length. (Arpit Agarwal via jing9) + HDFS-4841. FsShell commands using secure webhfds fail ClientFinalizer + shutdown hook. (rkanter via tucu) + Release 2.0.5-alpha - 06/06/2013 INCOMPATIBLE CHANGES