This is an automated email from the ASF dual-hosted git repository.
stevel pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 84ce0f1 HADOOP-16074. WASB: Update container not found error code.
84ce0f1 is described below
commit 84ce0f1bfa89e4c8a3360a2600eceb892bfe75cd
Author: Da Zhou <[email protected]>
AuthorDate: Tue Feb 5 14:41:15 2019 +0000
HADOOP-16074. WASB: Update container not found error code.
Contributed by Da Zhou.
(cherry picked from commit ba9efe06fadb9631763f3e623d8748bbe59ff748)
---
.../java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java | 4 ++--
.../test/java/org/apache/hadoop/fs/azure/ITestContainerChecks.java | 6 ------
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git
a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java
index e16fd6e..39b7ef4 100644
---
a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java
+++
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java
@@ -70,7 +70,7 @@ import com.microsoft.azure.storage.RetryNoRetry;
import com.microsoft.azure.storage.StorageCredentials;
import com.microsoft.azure.storage.StorageCredentialsAccountAndKey;
import com.microsoft.azure.storage.StorageCredentialsSharedAccessSignature;
-import com.microsoft.azure.storage.StorageErrorCode;
+import com.microsoft.azure.storage.StorageErrorCodeStrings;
import com.microsoft.azure.storage.StorageException;
import com.microsoft.azure.storage.Constants;
import com.microsoft.azure.storage.StorageEvent;
@@ -1336,7 +1336,7 @@ public class AzureNativeFileSystemStore implements
NativeFileSystemStore {
container.downloadAttributes(getInstrumentedContext());
currentKnownContainerState = ContainerState.Unknown;
} catch (StorageException ex) {
- if (StorageErrorCode.RESOURCE_NOT_FOUND.toString()
+ if (StorageErrorCodeStrings.CONTAINER_NOT_FOUND.toString()
.equals(ex.getErrorCode())) {
currentKnownContainerState = ContainerState.DoesntExist;
} else {
diff --git
a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/ITestContainerChecks.java
b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/ITestContainerChecks.java
index 456e4b1..9d21444 100644
---
a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/ITestContainerChecks.java
+++
b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/ITestContainerChecks.java
@@ -119,9 +119,6 @@ public class ITestContainerChecks extends
AbstractWasbTestWithTimeout {
}
assertFalse(container.exists());
- // Create a container outside of the WASB FileSystem
- container.create();
-
// Write should succeed
assertTrue(fs.createNewFile(new Path("/foo")));
assertTrue(container.exists());
@@ -165,9 +162,6 @@ public class ITestContainerChecks extends
AbstractWasbTestWithTimeout {
assertFalse(fs.rename(foo, bar));
assertFalse(container.exists());
- // Create a container outside of the WASB FileSystem
- container.create();
-
// But a write should.
assertTrue(fs.createNewFile(foo));
assertTrue(container.exists());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]