-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-16220.[FGL]Configurable INodeMap#NAMESPACE_KEY_DEPTH&NUM_RANGES_STATIC. #3417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: fgl
Are you sure you want to change the base?
Conversation
|
💔 -1 overall
This message was automatically generated. |
6b98ab9 to
0501b87
Compare
|
💔 -1 overall
This message was automatically generated. |
0501b87 to
ba8541f
Compare
|
💔 -1 overall
This message was automatically generated. |
xinglin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good overall. Thanks for working on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is definitely one way to do it but is there a way we can make numSpaceKeyDepth/numRangesStatic a non-static variable?
numspaceKeyDepth -> numSpaceKeyDepth
numRangesStatic -> numRanges
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @xinglin for the comment.
I will update it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @xinglin for the comment.
I agree with you and I will update it later.
8dae87f to
76553d1
Compare
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
76553d1 to
728ef52
Compare
|
💔 -1 overall
This message was automatically generated. |
|
@xinglin, can you help review? Here are some phenomena in the debugging process. When numSpaceKeyDepth=4, numRanges=10 |
xinglin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a check here to make sure numRanges is power of 2? thanks,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @xinglin for the comment.
I will update it later.
728ef52 to
40d3186
Compare
|
💔 -1 overall
This message was automatically generated. |
|
@shvachko Could you please review this PR. Thanks. |
Description of PR
INodeMap#NAMESPACE_KEY_DEPTH&NUM_RANGES_STATIC is configurable.
How was this patch tested?
INodeMap#NAMESPACE_KEY_DEPTH and NUM_RANGES_STATIC can be successfully obtained after changing the values of INodeMap#NAMESPACE_KEY_DEPTH and NUM_RANGES_STATIC in the Configuration.
jira:HDFS-16220