hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject hadoop git commit: YARN-6263. NMTokenSecretManagerInRM.createAndGetNMToken is not thread safe. Contributed by Haibo Chen
Date Fri, 03 Mar 2017 14:24:14 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 9b949f49e -> 5eca427da


YARN-6263. NMTokenSecretManagerInRM.createAndGetNMToken is not thread safe. Contributed by
Haibo Chen

(cherry picked from commit e58fc7603053e3ac1bc2464f9622995017db5245)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5eca427d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5eca427d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5eca427d

Branch: refs/heads/branch-2
Commit: 5eca427da2bacecc124f4a85fbcb69186ad7f86c
Parents: 9b949f4
Author: Jason Lowe <jlowe@yahoo-inc.com>
Authored: Fri Mar 3 08:23:08 2017 -0600
Committer: Jason Lowe <jlowe@yahoo-inc.com>
Committed: Fri Mar 3 08:24:05 2017 -0600

----------------------------------------------------------------------
 .../resourcemanager/security/NMTokenSecretManagerInRM.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/5eca427d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/NMTokenSecretManagerInRM.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/NMTokenSecretManagerInRM.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/NMTokenSecretManagerInRM.java
index 1471f78..956391e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/NMTokenSecretManagerInRM.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/NMTokenSecretManagerInRM.java
@@ -192,7 +192,7 @@ public class NMTokenSecretManagerInRM extends BaseNMTokenSecretManager
{
   public NMToken createAndGetNMToken(String applicationSubmitter,
       ApplicationAttemptId appAttemptId, Container container) {
     try {
-      this.readLock.lock();
+      this.writeLock.lock();
       HashSet<NodeId> nodeSet = this.appAttemptToNodeKeyMap.get(appAttemptId);
       NMToken nmToken = null;
       if (nodeSet != null) {
@@ -208,7 +208,7 @@ public class NMTokenSecretManagerInRM extends BaseNMTokenSecretManager
{
       }
       return nmToken;
     } finally {
-      this.readLock.unlock();
+      this.writeLock.unlock();
     }
   }
 


---------------------------------------------------------------------
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