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 xy...@apache.org on 2018/06/08 17:12:47 UTC
[26/50] hadoop git commit: HADOOP-15506. Upgrade Azure Storage Sdk
version to 7.0.0 and update corresponding code blocks. Contributed by
Esfandiar Manii.
HADOOP-15506. Upgrade Azure Storage Sdk version to 7.0.0 and update corresponding code blocks.
Contributed by Esfandiar Manii.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d901be67
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d901be67
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d901be67
Branch: refs/heads/HDDS-4
Commit: d901be679554eb6b323f3bc6e8de267d85dd2e06
Parents: 30f0582
Author: Steve Loughran <st...@apache.org>
Authored: Wed Jun 6 18:28:14 2018 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Wed Jun 6 18:28:14 2018 +0100
----------------------------------------------------------------------
hadoop-project/pom.xml | 2 +-
.../apache/hadoop/fs/azure/NativeAzureFileSystemHelper.java | 4 +++-
.../org/apache/hadoop/fs/azure/ITestContainerChecks.java | 9 ++++++---
3 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/d901be67/hadoop-project/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml
index 12897a7..8edfd76 100644
--- a/hadoop-project/pom.xml
+++ b/hadoop-project/pom.xml
@@ -1333,7 +1333,7 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage</artifactId>
- <version>5.4.0</version>
+ <version>7.0.0</version>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/hadoop/blob/d901be67/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystemHelper.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystemHelper.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystemHelper.java
index 754f343..e4ad70c 100644
--- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystemHelper.java
+++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystemHelper.java
@@ -87,8 +87,10 @@ final class NativeAzureFileSystemHelper {
if (errorCode != null
&& (errorCode.equals(StorageErrorCodeStrings.BLOB_NOT_FOUND)
|| errorCode.equals(StorageErrorCodeStrings.RESOURCE_NOT_FOUND)
+ || errorCode.equals(StorageErrorCodeStrings.CONTAINER_NOT_FOUND)
|| errorCode.equals(StorageErrorCode.BLOB_NOT_FOUND.toString())
- || errorCode.equals(StorageErrorCode.RESOURCE_NOT_FOUND.toString()))) {
+ || errorCode.equals(StorageErrorCode.RESOURCE_NOT_FOUND.toString())
+ || errorCode.equals(StorageErrorCode.CONTAINER_NOT_FOUND.toString()))) {
return true;
}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/d901be67/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/ITestContainerChecks.java
----------------------------------------------------------------------
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 cc3baf5..456e4b1 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
@@ -75,7 +75,7 @@ public class ITestContainerChecks extends AbstractWasbTestWithTimeout {
assertTrue("Should've thrown.", false);
} catch (FileNotFoundException ex) {
assertTrue("Unexpected exception: " + ex,
- ex.getMessage().contains("does not exist."));
+ ex.getMessage().contains("is not found"));
}
assertFalse(container.exists());
@@ -115,7 +115,7 @@ public class ITestContainerChecks extends AbstractWasbTestWithTimeout {
assertTrue("Should've thrown.", false);
} catch (FileNotFoundException ex) {
assertTrue("Unexpected exception: " + ex,
- ex.getMessage().contains("does not exist."));
+ ex.getMessage().contains("is not found"));
}
assertFalse(container.exists());
@@ -143,7 +143,7 @@ public class ITestContainerChecks extends AbstractWasbTestWithTimeout {
assertTrue("Should've thrown.", false);
} catch (FileNotFoundException ex) {
assertTrue("Unexpected exception: " + ex,
- ex.getMessage().contains("does not exist."));
+ ex.getMessage().contains("is not found"));
}
assertFalse(container.exists());
@@ -165,6 +165,9 @@ 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