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

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_r284610750
 
 

 ##########
 File path: 
hadoop-ozone/ozonefs/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java
 ##########
 @@ -219,6 +222,32 @@ public void testListStatusOnRoot() throws Exception {
     assertFalse(fileStatus2.equals(dir12.toString()));
   }
 
+  /**
+   * Tests listStatus operation on root directory.
+   */
+  @Test
+  public void testListStatusOnLargeDirectory() throws Exception {
+    Path root = new Path("/");
+    Set<String> paths = new TreeSet<>();
+    int numDirs = 5111;
+    for(int i = 0; i < numDirs; i++) {
+      Path p = new Path(root, String.valueOf(i));
+      fs.mkdirs(p);
+      paths.add(p.getName());
+    }
+
+    // ListStatus on root should return dir1 (even though /dir1 key does not
 
 Review comment:
   The comments here do not match with the assert in the next line. Can you 
please have a look.
 
----------------------------------------------------------------
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: 243206)
    Time Spent: 1h 10m  (was: 1h)

> 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 10m
>  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