-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-17602. RBF mount point with SPACE order can not find the most available namespace, it will choose an irrelevant namespace #6991
base: trunk
Are you sure you want to change the base?
Conversation
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@@ -118,6 +121,20 @@ protected String chooseFirstNamespace(String path, PathLocation loc) { | |||
getSubclusterMapping(); | |||
List<SubclusterAvailableSpace> subclusterList = new LinkedList<>( | |||
subclusterInfo.values()); | |||
|
|||
if (loc != null && loc.getDestinations() != null) { |
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.
Hi, @wzk784533 I think this modification is good, but I want to consult under what circumstances this loc or loc.getDestinations() would be null.
Set<String> locSet = new HashSet<String>(); | ||
for (RemoteLocation dest : loc.getDestinations()) { | ||
locSet.add(dest.getNameserviceId()); | ||
} | ||
List<SubclusterAvailableSpace> filteredSubclusterList = new LinkedList<>(); | ||
for (SubclusterAvailableSpace cluster : subclusterList) { | ||
if (locSet.contains(cluster.getNameserviceId())) { | ||
filteredSubclusterList.add(cluster); | ||
} | ||
} | ||
subclusterList = filteredSubclusterList; |
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.
You can change the code indentation.
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.
Ok, I will fix it later
Hi, @wzk784533 For the failure of test4tests, you need to add a UT |
💔 -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. |
…ailable namespace, it will choose an irrelevant namespace
💔 -1 overall
This message was automatically generated. |
HDFS-17602. RBF mount point with SPACE order can not find the most available namespace, it will choose an irrelevant namespace
How was this patch tested?
I have it test in our own clusters
For code changes:
I compare the namespaces in the StateStore and the mount point, and choose only the namespaces which are set in the mount point.