HADOOP-15975. ABFS: remove timeout check for DELETE and RENAME.
authorDa Zhou <da.zhou@microsoft.com>
Fri, 11 Jan 2019 11:13:41 +0000 (11:13 +0000)
committerSteve Loughran <stevel@apache.org>
Fri, 11 Jan 2019 11:13:41 +0000 (11:13 +0000)
Contributed by Da Zhou.

(cherry picked from commit 8b5fbe7a125f9d08cbb9f5e5ae28dc984e0d73d8)

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java

index 222285f..2a058c7 100644 (file)
@@ -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<String> 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);