You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2019/02/05 14:40:30 UTC
[hadoop] branch trunk updated: HADOOP-16074. WASB: Update container
not found error code.
This is an automated email from the ASF dual-hosted git repository.
stevel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new ba9efe0 HADOOP-16074. WASB: Update container not found error code.
ba9efe0 is described below
commit ba9efe06fadb9631763f3e623d8748bbe59ff748
Author: Da Zhou <da...@microsoft.com>
AuthorDate: Tue Feb 5 14:39:45 2019 +0000
HADOOP-16074. WASB: Update container not found error code.
Contributed by Da Zhou.
---
.../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: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org