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

ASF GitHub Bot logged work on HDFS-16220:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Sep/21 05:15
            Start Date: 14/Sep/21 05:15
    Worklog Time Spent: 10m 
      Work Description: xinglin commented on a change in pull request #3417:
URL: https://github.com/apache/hadoop/pull/3417#discussion_r707916234



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeMap.java
##########
@@ -36,22 +38,22 @@
  * and INode.  
  */
 public class INodeMap {
-  static final int NAMESPACE_KEY_DEPTH = 2;
-  static final int NUM_RANGES_STATIC = 256;  // power of 2
+  private static int namespaceKeyDepth;
+  private static long numRangesStatic;

Review comment:
       Also, if we want to support namespaceKeyDepth other than 2, we probably 
need to modify the range Keys we insert when we create new partitions. Instead 
of inserting range key such as [0, 16385], [1, 16385], [2, 16385], I think we 
might need to insert range keys as [0,0, 16385], [1,0,16385], [2,0,16385] ... 
for depth of 3 and [0,0,0,16385], [1,0,0,16385], [2,0,0,16385]... for depth of 
4.
   
   ```
       for (int p = 0; p < numRangesStatic; p++) {
         INodeDirectory key = new INodeDirectory(INodeId.ROOT_INODE_ID,
             "range key".getBytes(StandardCharsets.UTF_8), perm, 0);
         key.setParent(new INodeDirectory((long)p, null, perm, 0));
   ```




-- 
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.

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

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

> [FGL]Configurable INodeMap#NAMESPACE_KEY_DEPTH&NUM_RANGES_STATIC
> ----------------------------------------------------------------
>
>                 Key: HDFS-16220
>                 URL: https://issues.apache.org/jira/browse/HDFS-16220
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs, namenode
>            Reporter: JiangHua Zhu
>            Assignee: JiangHua Zhu
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> In INodeMap, NAMESPACE_KEY_DEPTH and NUM_RANGES_STATIC are a fixed value, we 
> should make it configurable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to