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 cfaf21a  HADOOP-16169. ABFS: Bug fix for getPathProperties.
cfaf21a is described below

commit cfaf21a4ba624330224a4f8519d2e9ea73814505
Author: Da Zhou <[email protected]>
AuthorDate: Fri Mar 8 13:53:44 2019 +0000

    HADOOP-16169. ABFS: Bug fix for getPathProperties.
    
    Author:    Da Zhou <[email protected]>
    (cherry picked from commit e0260417ade5568ae37dcc3753aea0d1e0fd701b)
---
 .../apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java  | 12 ++++++------
 .../org/apache/hadoop/fs/azurebfs/services/AbfsClient.java   |  4 ++--
 .../apache/hadoop/fs/azurebfs/ITestFileSystemProperties.java |  4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git 
a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
 
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
index dbf78ec..f1ece36 100644
--- 
a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
+++ 
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
@@ -276,13 +276,13 @@ public class AzureBlobFileSystemStore {
     client.setFilesystemProperties(commaSeparatedProperties);
   }
 
-  public Hashtable<String, String> getPathProperties(final Path path) throws 
AzureBlobFileSystemException {
-    LOG.debug("getPathProperties for filesystem: {} path: {}",
+  public Hashtable<String, String> getPathStatus(final Path path) throws 
AzureBlobFileSystemException {
+    LOG.debug("getPathStatus for filesystem: {} path: {}",
             client.getFileSystem(),
            path);
 
     final Hashtable<String, String> parsedXmsProperties;
-    final AbfsRestOperation op = 
client.getPathProperties(AbfsHttpConstants.FORWARD_SLASH + 
getRelativePath(path), isNamespaceEnabled);
+    final AbfsRestOperation op = 
client.getPathStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path));
 
     final String xMsProperties = 
op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_PROPERTIES);
 
@@ -364,7 +364,7 @@ public class AzureBlobFileSystemStore {
             client.getFileSystem(),
             path);
 
-    final AbfsRestOperation op = 
client.getPathProperties(AbfsHttpConstants.FORWARD_SLASH + 
getRelativePath(path), isNamespaceEnabled);
+    final AbfsRestOperation op = 
client.getPathStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path));
 
     final String resourceType = 
op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_RESOURCE_TYPE);
     final long contentLength = 
Long.parseLong(op.getResult().getResponseHeader(HttpHeaderConfigurations.CONTENT_LENGTH));
@@ -392,7 +392,7 @@ public class AzureBlobFileSystemStore {
             path,
             overwrite);
 
-    final AbfsRestOperation op = 
client.getPathProperties(AbfsHttpConstants.FORWARD_SLASH + 
getRelativePath(path), isNamespaceEnabled);
+    final AbfsRestOperation op = 
client.getPathStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path));
 
     final String resourceType = 
op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_RESOURCE_TYPE);
     final Long contentLength = 
Long.valueOf(op.getResult().getResponseHeader(HttpHeaderConfigurations.CONTENT_LENGTH));
@@ -468,7 +468,7 @@ public class AzureBlobFileSystemStore {
               ? client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + 
AbfsHttpConstants.ROOT_PATH)
               : client.getFilesystemProperties();
     } else {
-      op = client.getPathProperties(AbfsHttpConstants.FORWARD_SLASH + 
getRelativePath(path), isNamespaceEnabled);
+      op = client.getPathStatus(AbfsHttpConstants.FORWARD_SLASH + 
getRelativePath(path));
     }
 
     final long blockSize = abfsConfiguration.getAzureBlockSize();
diff --git 
a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
 
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
index 180870c..863ff54 100644
--- 
a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
+++ 
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
@@ -338,7 +338,7 @@ public class AbfsClient {
     return op;
   }
 
-  public AbfsRestOperation getPathProperties(final String path, boolean 
isNameSpaceEnabled) throws AzureBlobFileSystemException {
+  public AbfsRestOperation getPathStatus(final String path) throws 
AzureBlobFileSystemException {
     final List<AbfsHttpHeader> requestHeaders = createDefaultHeaders();
 
     final AbfsUriQueryBuilder abfsUriQueryBuilder = 
createDefaultUriQueryBuilder();
@@ -346,7 +346,7 @@ public class AbfsClient {
 
     final URL url = createRequestUrl(path, abfsUriQueryBuilder.toString());
     final AbfsRestOperation op = new AbfsRestOperation(
-            isNameSpaceEnabled ? AbfsRestOperationType.GetPathProperties : 
AbfsRestOperationType.GetPathStatus,
+            AbfsRestOperationType.GetPathStatus,
             this,
             HTTP_METHOD_HEAD,
             url,
diff --git 
a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestFileSystemProperties.java
 
b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestFileSystemProperties.java
index e6b45c8..ba9b639 100644
--- 
a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestFileSystemProperties.java
+++ 
b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestFileSystemProperties.java
@@ -78,7 +78,7 @@ public class ITestFileSystemProperties extends 
AbstractAbfsIntegrationTest {
     touch(TEST_PATH);
     fs.getAbfsStore().setPathProperties(TEST_PATH, properties);
     Hashtable<String, String> fetchedProperties =
-            fs.getAbfsStore().getPathProperties(TEST_PATH);
+            fs.getAbfsStore().getPathStatus(TEST_PATH);
 
     assertEquals(properties, fetchedProperties);
   }
@@ -101,7 +101,7 @@ public class ITestFileSystemProperties extends 
AbstractAbfsIntegrationTest {
     properties.put("key", "{ value: valueTestå…© }");
     touch(TEST_PATH);
     fs.getAbfsStore().setPathProperties(TEST_PATH, properties);
-    Hashtable<String, String> fetchedProperties = 
fs.getAbfsStore().getPathProperties(TEST_PATH);
+    Hashtable<String, String> fetchedProperties = 
fs.getAbfsStore().getPathStatus(TEST_PATH);
 
     assertEquals(properties, fetchedProperties);
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to