surendralilhore commented on a change in pull request #2972:
URL: https://github.com/apache/hadoop/pull/2972#discussion_r644756616



##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java
##########
@@ -1698,19 +1721,32 @@ private static void storeLinkAttribute(CloudBlobWrapper 
blob,
         OLD_LINK_BACK_TO_UPLOAD_IN_PROGRESS_METADATA_KEY);
   }
 
-  private static String getLinkAttributeValue(CloudBlobWrapper blob)
+  private String getLinkAttributeValue(CloudBlobWrapper blob)
       throws UnsupportedEncodingException {
-    String encodedLinkTarget = getMetadataAttribute(blob,
+    String encodedLinkTarget = getMetadataAttribute(blob.getMetadata(),
         LINK_BACK_TO_UPLOAD_IN_PROGRESS_METADATA_KEY,
         OLD_LINK_BACK_TO_UPLOAD_IN_PROGRESS_METADATA_KEY);
     return decodeMetadataAttribute(encodedLinkTarget);
   }
 
-  private static boolean retrieveFolderAttribute(CloudBlobWrapper blob) {
+  private boolean retrieveFolderAttribute(CloudBlobWrapper blob) {
     HashMap<String, String> metadata = blob.getMetadata();
-    return null != metadata
-        && (metadata.containsKey(IS_FOLDER_METADATA_KEY) || metadata
-            .containsKey(OLD_IS_FOLDER_METADATA_KEY));
+    if (null != metadata) {

Review comment:
       Can we reuse **getMetadataAttribute()** API here ?
   
   Something like this :
   
   return null!=getMetadataAttribute(metadata, IS_FOLDER_METADATA_KEY, 
OLD_IS_FOLDER_METADATA_KEY);




-- 
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:
[email protected]



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

Reply via email to