Browse Source

HADOOP-14361. Azure: NativeAzureFileSystem.getDelegationToken() call fails sometimes when invoked concurrently. Contributed by Santhosh G Nayak

(cherry picked from commit eed731496f63537350206274af09d2118b116a17)
Mingliang Liu 8 years ago
parent
commit
586126956b

+ 1 - 1
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java

@@ -2978,7 +2978,7 @@ public class NativeAzureFileSystem extends FileSystem {
    * @throws IOException thrown when getting the current user.
    */
   @Override
-  public Token<?> getDelegationToken(final String renewer) throws IOException {
+  public synchronized Token<?> getDelegationToken(final String renewer) throws IOException {
     if (kerberosSupportEnabled) {
       try {
         final UserGroupInformation ugi = UserGroupInformation.getCurrentUser();