-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-17602. RBF: Fix mount point with SPACE order can not find the available namespace. #6991
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
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. |
🎊 +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. |
@KeeProMise Please review this pull request, thanks |
@wzk784533 Hi, thanks for you contribution, LGTM, @Hexiaoqiao @goiri If you have time, please help to take a look. |
@Hexiaoqiao @goiri Please review this pull request, thanks |
@KeeProMise Could you please merge this pull request, or is there anything else I shoud do please let me know |
1 similar comment
@KeeProMise Could you please merge this pull request, or is there anything else I shoud do please let me know |
Hi, @wzk784533 thanks for your contribution, LGTM, but I don't have the permission to merge the trunk branch. |
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. +1. Will commit if no more comments for two work days.
Committed to trunk. Thanks @wzk784533 and @KeeProMise . |
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.