snvijaya commented on a change in pull request #1842: HADOOP-16730 : ABFS: Add 
Authorizer Interface
URL: https://github.com/apache/hadoop/pull/1842#discussion_r384439390
 
 

 ##########
 File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
 ##########
 @@ -266,16 +295,23 @@ public AbfsRestOperation createPath(final String path, 
final boolean isFile, fin
     return op;
   }
 
-  public AbfsRestOperation renamePath(final String source, final String 
destination, final String continuation)
+  public AbfsRestOperation renamePath(String source, final String destination, 
final String continuation)
           throws AzureBlobFileSystemException {
     final List<AbfsHttpHeader> requestHeaders = createDefaultHeaders();
 
-    final String encodedRenameSource = urlEncode(FORWARD_SLASH + 
this.getFileSystem() + source);
+    final AbfsUriQueryBuilder srcQueryBuilder = new AbfsUriQueryBuilder();
+    appendSASTokenToQuery(source, SASTokenProvider.RENAME_SOURCE_OPERATION, 
srcQueryBuilder);
+    String sasToken = srcQueryBuilder.toString();
+
+    final String encodedRenameSource =
+        urlEncode(FORWARD_SLASH + this.getFileSystem() + source) + sasToken;
+    LOG.trace("Rename source queryparam added {}", encodedRenameSource);
 
 Review comment:
   Are you suggesting we move the AuthType == SAS check back to the API methods 
? It was moved to appendSASTokenToQuery() as it was a repeating code across API 
methods.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to