From 399df10c583933c475a11d80fe416ec85fe17a6c Mon Sep 17 00:00:00 2001 From: cnauroth Date: Mon, 29 Jun 2015 13:48:02 -0700 Subject: [PATCH] HADOOP-12089. StorageException complaining " no lease ID" when updating FolderLastModifiedTime in WASB. Contributed by Duo Xu. (cherry picked from commit 460e98f7b3ec84f3c5afcb2aad4f4e7031d16e3a) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../org/apache/hadoop/fs/azure/NativeAzureFileSystem.java | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index cb324be2e62..6c10a65a611 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -404,6 +404,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12119. hadoop fs -expunge does not work for federated namespace (J.Andreina via vinayakumarb) + HADOOP-12089. StorageException complaining " no lease ID" when updating + FolderLastModifiedTime in WASB. (Duo Xu via cnauroth) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java index 623645a414d..a567b331a05 100644 --- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java +++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java @@ -1500,7 +1500,7 @@ public class NativeAzureFileSystem extends FileSystem { createPermissionStatus(FsPermission.getDefault())); } else { if (!skipParentFolderLastModifidedTimeUpdate) { - store.updateFolderLastModifiedTime(parentKey, null); + updateParentFolderLastModifiedTime(key); } } } @@ -1561,9 +1561,8 @@ public class NativeAzureFileSystem extends FileSystem { // Update parent directory last modified time Path parent = absolutePath.getParent(); if (parent != null && parent.getParent() != null) { // not root - String parentKey = pathToKey(parent); if (!skipParentFolderLastModifidedTimeUpdate) { - store.updateFolderLastModifiedTime(parentKey, null); + updateParentFolderLastModifiedTime(key); } } instrumentation.directoryDeleted();