You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by br...@apache.org on 2018/02/12 16:48:50 UTC
[1/3] hadoop git commit: HDFS-8693. Addendum patch to execute the
command using UGI. Contributed by Brahma Reddy Battula.
Repository: hadoop
Updated Branches:
refs/heads/branch-3.0 41cf2b8e7 -> 055d5e0b8
refs/heads/branch-3.1 aad3958e5 -> fb088564a
refs/heads/trunk 3414fd124 -> 35c17351c
HDFS-8693. Addendum patch to execute the command using UGI. Contributed by Brahma Reddy Battula.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/35c17351
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/35c17351
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/35c17351
Branch: refs/heads/trunk
Commit: 35c17351cab645dcc72e0d2ae1608507aa787ffb
Parents: 3414fd1
Author: Brahma Reddy Battula <br...@apache.org>
Authored: Mon Feb 12 22:14:34 2018 +0530
Committer: Brahma Reddy Battula <br...@apache.org>
Committed: Mon Feb 12 22:14:34 2018 +0530
----------------------------------------------------------------------
.../hdfs/server/datanode/BlockPoolManager.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/35c17351/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
index f6a11c2..141550e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
@@ -253,7 +253,20 @@ class BlockPoolManager {
lifelineAddrs.add(nnIdToLifelineAddr != null ?
nnIdToLifelineAddr.get(nnId) : null);
}
- bpos.refreshNNList(addrs, lifelineAddrs);
+ try {
+ UserGroupInformation.getLoginUser()
+ .doAs(new PrivilegedExceptionAction<Object>() {
+ @Override
+ public Object run() throws Exception {
+ bpos.refreshNNList(addrs, lifelineAddrs);
+ return null;
+ }
+ });
+ } catch (InterruptedException ex) {
+ IOException ioe = new IOException();
+ ioe.initCause(ex.getCause());
+ throw ioe;
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
[3/3] hadoop git commit: HDFS-8693. Addendum patch to execute the
command using UGI. Contributed by Brahma Reddy Battula.
Posted by br...@apache.org.
HDFS-8693. Addendum patch to execute the command using UGI. Contributed by Brahma Reddy Battula.
(cherry picked from commit 35c17351cab645dcc72e0d2ae1608507aa787ffb)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/055d5e0b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/055d5e0b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/055d5e0b
Branch: refs/heads/branch-3.0
Commit: 055d5e0b851b16c0f604bd66b022338694901164
Parents: 41cf2b8
Author: Brahma Reddy Battula <br...@apache.org>
Authored: Mon Feb 12 22:14:34 2018 +0530
Committer: Brahma Reddy Battula <br...@apache.org>
Committed: Mon Feb 12 22:17:35 2018 +0530
----------------------------------------------------------------------
.../hdfs/server/datanode/BlockPoolManager.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/055d5e0b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
index f6a11c2..141550e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
@@ -253,7 +253,20 @@ class BlockPoolManager {
lifelineAddrs.add(nnIdToLifelineAddr != null ?
nnIdToLifelineAddr.get(nnId) : null);
}
- bpos.refreshNNList(addrs, lifelineAddrs);
+ try {
+ UserGroupInformation.getLoginUser()
+ .doAs(new PrivilegedExceptionAction<Object>() {
+ @Override
+ public Object run() throws Exception {
+ bpos.refreshNNList(addrs, lifelineAddrs);
+ return null;
+ }
+ });
+ } catch (InterruptedException ex) {
+ IOException ioe = new IOException();
+ ioe.initCause(ex.getCause());
+ throw ioe;
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
[2/3] hadoop git commit: HDFS-8693. Addendum patch to execute the
command using UGI. Contributed by Brahma Reddy Battula.
Posted by br...@apache.org.
HDFS-8693. Addendum patch to execute the command using UGI. Contributed by Brahma Reddy Battula.
(cherry picked from commit 35c17351cab645dcc72e0d2ae1608507aa787ffb)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/fb088564
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/fb088564
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/fb088564
Branch: refs/heads/branch-3.1
Commit: fb088564a2cb2637ab2d1644357c8faa0f4964df
Parents: aad3958
Author: Brahma Reddy Battula <br...@apache.org>
Authored: Mon Feb 12 22:14:34 2018 +0530
Committer: Brahma Reddy Battula <br...@apache.org>
Committed: Mon Feb 12 22:16:41 2018 +0530
----------------------------------------------------------------------
.../hdfs/server/datanode/BlockPoolManager.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/fb088564/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
index f6a11c2..141550e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolManager.java
@@ -253,7 +253,20 @@ class BlockPoolManager {
lifelineAddrs.add(nnIdToLifelineAddr != null ?
nnIdToLifelineAddr.get(nnId) : null);
}
- bpos.refreshNNList(addrs, lifelineAddrs);
+ try {
+ UserGroupInformation.getLoginUser()
+ .doAs(new PrivilegedExceptionAction<Object>() {
+ @Override
+ public Object run() throws Exception {
+ bpos.refreshNNList(addrs, lifelineAddrs);
+ return null;
+ }
+ });
+ } catch (InterruptedException ex) {
+ IOException ioe = new IOException();
+ ioe.initCause(ex.getCause());
+ throw ioe;
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org