You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/02/25 19:23:45 UTC

[GitHub] [hadoop-ozone] hanishakoneru commented on a change in pull request #584: HDDS-3054. OzoneFileStatus#getModificationTime should return actual directory modification time when its OmKeyInfo is available

hanishakoneru commented on a change in pull request #584: HDDS-3054. OzoneFileStatus#getModificationTime should return actual directory modification time when its OmKeyInfo is available
URL: https://github.com/apache/hadoop-ozone/pull/584#discussion_r384034908
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
 ##########
 @@ -2005,15 +2016,21 @@ public OmKeyInfo lookupFile(OmKeyArgs args, String clientAddress)
               if (isFile) {
                 if (!deletedKeySet.contains(entryInDb)) {
                   cacheKeyMap.put(entryInDb,
-                      new OzoneFileStatus(value, scmBlockSize, !isFile));
+                      new OzoneFileStatus(omKeyInfo, scmBlockSize, !isFile));
                   countEntries++;
                 }
                 iterator.next();
               } else {
                 // if entry is a directory
                 if (!deletedKeySet.contains(entryInDb)) {
-                  cacheKeyMap.put(entryInDb,
-                      new OzoneFileStatus(immediateChild));
+                  if (!entryKeyName.equals(immediateChild)) {
+                    cacheKeyMap.put(entryInDb,
+                        new OzoneFileStatus(immediateChild));
+                  } else {
+                    // If entryKeyName matches dir name, we have the info
+                    cacheKeyMap.put(entryInDb,
+                        new OzoneFileStatus(omKeyInfo, 0, true));
 
 Review comment:
   Could you please explain this change.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org