hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weic...@apache.org
Subject [hadoop] branch branch-3.1 updated: HADOOP-16461. Regression: FileSystem cache lock parses XML within the lock.
Date Tue, 01 Oct 2019 00:05:11 GMT
This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new b9dc2c1  HADOOP-16461. Regression: FileSystem cache lock parses XML within the lock.
b9dc2c1 is described below

commit b9dc2c17de54c1f93cbb7fdb52533071c2918346
Author: Gopal V <gopal@cloudera.com>
AuthorDate: Fri Jul 26 11:32:13 2019 +0100

    HADOOP-16461. Regression: FileSystem cache lock parses XML within the lock.
    
    Contributed by Gopal V.
    
    Change-Id: If6654f850e9c24ee0d9519a46fd6269b18e1a7a4
    (cherry picked from commit aebac6d2d2e612e400a7d73be67dafb47e239211)
---
 .../src/main/java/org/apache/hadoop/fs/FileSystem.java             | 7 ++++++-
 1 file changed, 6 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 043d36b..ad53acb 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
@@ -3350,6 +3350,9 @@ public abstract class FileSystem extends Configured
       }
 
       fs = createFileSystem(uri, conf);
+      final long timeout = conf.getTimeDuration(SERVICE_SHUTDOWN_TIMEOUT,
+          SERVICE_SHUTDOWN_TIMEOUT_DEFAULT,
+          ShutdownHookManager.TIME_UNIT_DEFAULT);
       synchronized (this) { // refetch the lock again
         FileSystem oldfs = map.get(key);
         if (oldfs != null) { // a file system is created while lock is releasing
@@ -3360,7 +3363,9 @@ public abstract class FileSystem extends Configured
         // now insert the new file system into the map
         if (map.isEmpty()
                 && !ShutdownHookManager.get().isShutdownInProgress()) {
-          ShutdownHookManager.get().addShutdownHook(clientFinalizer, SHUTDOWN_HOOK_PRIORITY);
+          ShutdownHookManager.get().addShutdownHook(clientFinalizer,
+              SHUTDOWN_HOOK_PRIORITY, timeout,
+              ShutdownHookManager.TIME_UNIT_DEFAULT);
         }
         fs.key = key;
         map.put(key, fs);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message