[ 
https://issues.apache.org/jira/browse/HDDS-1461?focusedWorklogId=243207&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-243207
 ]

ASF GitHub Bot logged work on HDDS-1461:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/May/19 09:15
            Start Date: 16/May/19 09:15
    Worklog Time Spent: 10m 
      Work Description: mukul1987 commented on pull request #782: HDDS-1461. 
Optimize listStatus api in OzoneFileSystem
URL: https://github.com/apache/hadoop/pull/782#discussion_r283858738
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
 ##########
 @@ -1416,44 +1421,47 @@ public void createDirectory(OmKeyArgs args) throws 
IOException {
     try {
       metadataManager.getLock().acquireBucketLock(volumeName, bucketName);
 
-      // verify bucket exists
-      OmBucketInfo bucketInfo = getBucketInfo(volumeName, bucketName);
-
       // Check if this is the root of the filesystem.
       if (keyName.length() == 0) {
         return;
       }
 
-      verifyNoFilesInPath(volumeName, bucketName, Paths.get(keyName), false);
-      String dir = addTrailingSlashIfNeeded(keyName);
-      String dirDbKey =
-          metadataManager.getOzoneKey(volumeName, bucketName, dir);
-      FileEncryptionInfo encInfo = getFileEncryptionInfo(bucketInfo);
+      Path keyPath = Paths.get(keyName);
+      OzoneFileStatus status =
+          verifyNoFilesInPath(volumeName, bucketName, keyPath, false);
+      if (status != null && OzoneFSUtils.pathToKey(status.getPath())
+          .equals(keyPath.toString())) {
 
 Review comment:
   keyName can be used here, as keyPath was derived from that.
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 243207)
    Time Spent: 1h 20m  (was: 1h 10m)

> Optimize listStatus api in OzoneFileSystem
> ------------------------------------------
>
>                 Key: HDDS-1461
>                 URL: https://issues.apache.org/jira/browse/HDDS-1461
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>          Components: Ozone Filesystem, Ozone Manager
>            Reporter: Lokesh Jain
>            Assignee: Lokesh Jain
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Currently in listStatus we make multiple getFileStatus calls. This can be 
> optimized by converting to a single rpc call for listStatus.
> Also currently listStatus has to traverse a directory recursively in order to 
> list its immediate children. This happens because in OzoneManager all the 
> metadata is stored in rocksdb sorted on keynames. The Jira also aims to fix 
> this by using seek api provided by rocksdb.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to