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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]