HADOOP-15975. ABFS: remove timeout check for DELETE and RENAME.
Contributed by Da Zhou.
This commit is contained in:
parent
5d2d0e74d5
commit
8b5fbe7a12
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue