[ 
https://issues.apache.org/jira/browse/HDFS-17602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17878783#comment-17878783
 ] 

ASF GitHub Bot commented on HDFS-17602:
---------------------------------------

KeeProMise commented on code in PR #6991:
URL: https://github.com/apache/hadoop/pull/6991#discussion_r1741714989


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/order/AvailableSpaceResolver.java:
##########
@@ -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) {

Review Comment:
   Hi, @wzk784533 I think this modification is good, but I want to consult 
under what circumstances this loc or loc.getDestinations() would be null.





> RBF mount point with SPACE order can not find the most available namespace, 
> it will choose an irrelevant namespace
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-17602
>                 URL: https://issues.apache.org/jira/browse/HDFS-17602
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: router
>            Reporter: Zhongkun Wu
>            Priority: Critical
>              Labels: pull-request-available
>         Attachments: image-2024-08-12-10-08-54-031.png, 
> image-2024-08-12-10-08-58-271.png, image-2024-08-12-10-12-48-428.png, 
> image-2024-08-12-10-14-20-580.png, image-2024-08-12-10-25-26-003.png, 
> image-2024-08-12-10-25-42-863.png
>
>
> !image-2024-08-12-10-08-58-271.png!
> In the 
> MultipleDestinationMountTableResolver.java we invoke 
> orderedResolver.getFirstNamespace(path, mountTableResult);
> It will then invoke this function in RouterResolver.java
> !image-2024-08-12-10-12-48-428.png!
> and now we are in 
> chooseFirstNamespace function in AvailableSpaceResolver.java 
> !image-2024-08-12-10-14-20-580.png!
>  
> The path parameter is the destination where we want to create a file
> the loc parameter is the mount point we set
>  
> this function will choose the most available namespace in all the namespace 
> we have in StateStore, which is not the same as the mount point we set for 
> our destination.
>  
> As a result we will get a namespace  irrelevant to the namespaces we set for 
> the destination path
>  
> !image-2024-08-12-10-25-42-863.png!
> in the log above:
> we get the namespace we don't set with our destination path, So the it will 
> choose the first namespace it sees and it's not really the most available 
> namespace among the namespaces we set for our destination
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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