From 8b5fbe7a125f9d08cbb9f5e5ae28dc984e0d73d8 Mon Sep 17 00:00:00 2001 From: Da Zhou Date: Fri, 11 Jan 2019 11:12:39 +0000 Subject: [PATCH] HADOOP-15975. ABFS: remove timeout check for DELETE and RENAME. Contributed by Da Zhou. --- .../fs/azurebfs/AzureBlobFileSystemStore.java | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java index 222285fa23f..2a058c78179 100644 --- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java +++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java @@ -62,7 +62,6 @@ import org.apache.hadoop.fs.azurebfs.contracts.exceptions.InvalidAbfsRestOperati import org.apache.hadoop.fs.azurebfs.contracts.exceptions.InvalidFileSystemPropertyException; import org.apache.hadoop.fs.azurebfs.contracts.exceptions.InvalidUriAuthorityException; import org.apache.hadoop.fs.azurebfs.contracts.exceptions.InvalidUriException; -import org.apache.hadoop.fs.azurebfs.contracts.exceptions.TimeoutException; import org.apache.hadoop.fs.azurebfs.contracts.services.AzureServiceErrorCode; import org.apache.hadoop.fs.azurebfs.contracts.services.ListResultEntrySchema; import org.apache.hadoop.fs.azurebfs.contracts.services.ListResultSchema; @@ -90,7 +89,6 @@ import org.slf4j.LoggerFactory; import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.SUPER_USER; import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.AZURE_ABFS_ENDPOINT; -import static org.apache.hadoop.util.Time.now; /** * Provides the bridging logic between Hadoop's abstract filesystem and Azure Storage. @@ -108,8 +106,6 @@ public class AzureBlobFileSystemStore { private static final String DATE_TIME_PATTERN = "E, dd MMM yyyy HH:mm:ss 'GMT'"; private static final String XMS_PROPERTIES_ENCODING = "ISO-8859-1"; private static final int LIST_MAX_RESULTS = 500; - private static final int DELETE_DIRECTORY_TIMEOUT_MILISECONDS = 180000; - private static final int RENAME_TIMEOUT_MILISECONDS = 180000; private final AbfsConfiguration abfsConfiguration; private final Set azureAtomicRenameDirSet; @@ -422,17 +418,8 @@ public class AzureBlobFileSystemStore { destination); String continuation = null; - long deadline = now() + RENAME_TIMEOUT_MILISECONDS; do { - if (now() > deadline) { - LOG.debug("Rename {} to {} timed out.", - source, - destination); - - throw new TimeoutException("Rename timed out."); - } - AbfsRestOperation op = client.renamePath(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(source), AbfsHttpConstants.FORWARD_SLASH + getRelativePath(destination), continuation); continuation = op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_CONTINUATION); @@ -448,15 +435,8 @@ public class AzureBlobFileSystemStore { String.valueOf(recursive)); String continuation = null; - long deadline = now() + DELETE_DIRECTORY_TIMEOUT_MILISECONDS; do { - if (now() > deadline) { - LOG.debug("Delete directory {} timed out.", path); - - throw new TimeoutException("Delete directory timed out."); - } - AbfsRestOperation op = client.deletePath( AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path), recursive, continuation); continuation = op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_CONTINUATION);