HADOOP-12239. StorageException complaining " no lease ID" when updating FolderLastModifiedTime in WASB. Contributed by Duo Xu.

This commit is contained in:
cnauroth 2015-07-22 11:16:49 -07:00
parent 4025326288
commit efa97243ec
2 changed files with 9 additions and 2 deletions

View File

@ -995,6 +995,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-12017. Hadoop archives command should use configurable replication
factor when closing (Bibin A Chundatt via vinayakumarb)
HADOOP-12239. StorageException complaining " no lease ID" when updating
FolderLastModifiedTime in WASB. (Duo Xu via cnauroth)
Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -1360,8 +1360,12 @@ private FSDataOutputStream create(Path f, FsPermission permission,
String parentKey = pathToKey(parentFolder);
FileMetadata parentMetadata = store.retrieveMetadata(parentKey);
if (parentMetadata != null && parentMetadata.isDir() &&
parentMetadata.getBlobMaterialization() == BlobMaterialization.Explicit) {
store.updateFolderLastModifiedTime(parentKey, parentFolderLease);
parentMetadata.getBlobMaterialization() == BlobMaterialization.Explicit) {
if (parentFolderLease != null) {
store.updateFolderLastModifiedTime(parentKey, parentFolderLease);
} else {
updateParentFolderLastModifiedTime(key);
}
} else {
// Make sure that the parent folder exists.
// Create it using inherited permissions from the first existing directory going up the path