Explorar o código

Merge -c 1295232 from trunk to branch-0.23 to fix HDFS-3012. Exception while renewing delegation token.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23.2@1295313 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy %!s(int64=13) %!d(string=hai) anos
pai
achega
e24ffbbbba

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -72,6 +72,9 @@ Release 0.23.2 - UNRELEASED
 
     HDFS-2991. Fix case where OP_ADD would not be logged in append(). (todd)
 
+    HDFS-3012. Exception while renewing delegation token. (Bobby Evans via
+    jitendra)
+
 Release 0.23.1 - 2012-02-17 
 
   INCOMPATIBLE CHANGES

+ 6 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java

@@ -601,6 +601,12 @@ public class DFSClient implements java.io.Closeable {
   @InterfaceAudience.Private
   public static class Renewer extends TokenRenewer {
     
+    static {
+      //Ensure that HDFS Configuration files are loaded before trying to use
+      // the renewer.
+      HdfsConfiguration.init();
+    }
+    
     @Override
     public boolean handleKind(Text kind) {
       return DelegationTokenIdentifier.HDFS_DELEGATION_KIND.equals(kind);