hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1136608 - in /hadoop/common/trunk/hdfs: CHANGES.txt src/java/org/apache/hadoop/hdfs/HftpFileSystem.java
Date Thu, 16 Jun 2011 19:04:26 GMT
Author: mattf
Date: Thu Jun 16 19:04:26 2011
New Revision: 1136608

URL: http://svn.apache.org/viewvc?rev=1136608&view=rev
Log:
HDFS-1656. Fixes an issue to do with fetching of delegation tokens in HftpFileSystem. Contributed
by Kan Zhang.

Modified:
    hadoop/common/trunk/hdfs/CHANGES.txt
    hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/HftpFileSystem.java

Modified: hadoop/common/trunk/hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hdfs/CHANGES.txt?rev=1136608&r1=1136607&r2=1136608&view=diff
==============================================================================
--- hadoop/common/trunk/hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hdfs/CHANGES.txt Thu Jun 16 19:04:26 2011
@@ -746,6 +746,9 @@ Trunk (unreleased changes)
     HDFS-1942. Datanode must exist when all the block pool service threads
     exit. (Bharath Mundlapudi via suresh)
 
+    HDFS-1656. Fixes an issue to do with fetching of delegation tokens in
+    HftpFileSystem. Contributed by Kan Zhang.
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/HftpFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/HftpFileSystem.java?rev=1136608&r1=1136607&r2=1136608&view=diff
==============================================================================
--- hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/HftpFileSystem.java (original)
+++ hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/HftpFileSystem.java Thu Jun 16
19:04:26 2011
@@ -190,9 +190,6 @@ public class HftpFileSystem extends File
         }
       }
       
-      //Renew TGT if needed
-      ugi.reloginFromKeytab();
-      
       //since we don't already have a token, go get one over https
       if (delegationToken == null) {
         delegationToken = 
@@ -204,8 +201,10 @@ public class HftpFileSystem extends File
   
 
   @Override
-  public Token<?> getDelegationToken(final String renewer) throws IOException {
+  public synchronized Token<?> getDelegationToken(final String renewer) throws IOException
{
     try {
+      //Renew TGT if needed
+      ugi.reloginFromKeytab();
       return ugi.doAs(new PrivilegedExceptionAction<Token<?>>() {
         public Token<?> run() throws IOException {
           Credentials c;



Mime
View raw message