hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jiten...@apache.org
Subject svn commit: r1082326 - in /hadoop/hdfs/branches/HDFS-1052: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
Date Wed, 16 Mar 2011 22:22:42 GMT
Author: jitendra
Date: Wed Mar 16 22:22:41 2011
New Revision: 1082326

URL: http://svn.apache.org/viewvc?rev=1082326&view=rev
Log:
HDFS-1755. Federation: The BPOfferService must always connect to namenode as the login user.
Contributed by jitendra.

Modified:
    hadoop/hdfs/branches/HDFS-1052/CHANGES.txt
    hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java

Modified: hadoop/hdfs/branches/HDFS-1052/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/CHANGES.txt?rev=1082326&r1=1082325&r2=1082326&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/CHANGES.txt (original)
+++ hadoop/hdfs/branches/HDFS-1052/CHANGES.txt Wed Mar 16 22:22:41 2011
@@ -241,7 +241,10 @@ Trunk (unreleased changes)
     HDFS-1749. Federation: TestListCorruptFileBlocks failing in federation 
     branch. (jitendra)
 
-   HDFS-1754. Federation: testFsck fails. (boryas)
+    HDFS-1754. Federation: testFsck fails. (boryas)
+
+    HDFS-1755. Federation: The BPOfferService must always connect to namenode as 
+    the login user. (jitendra)
 
   IMPROVEMENTS
 

Modified: hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java?rev=1082326&r1=1082325&r2=1082326&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
Wed Mar 16 22:22:41 2011
@@ -270,9 +270,21 @@ public class DataNode extends Configured
       }
     }
     
-    synchronized void startAll() {
-      for (BPOfferService bpos: nameNodeThreads.values()) {
-        bpos.start();
+    synchronized void startAll() throws IOException {
+      try {
+        UserGroupInformation.getLoginUser().doAs(
+            new PrivilegedExceptionAction<Object>() {
+              public Object run() throws Exception {
+                for (BPOfferService bpos : nameNodeThreads.values()) {
+                  bpos.start();
+                }
+                return null;
+              }
+            });
+      } catch (InterruptedException ex) {
+        IOException ioe = new IOException();
+        ioe.initCause(ex.getCause());
+        throw ioe;
       }
     }
     



Mime
View raw message