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

Ayush Saxena commented on HDFS-14249:
-------------------------------------

Thanx [~elgoiri] for taking this up. Seems good to have such an API.

Some comments :
 * Please Add the newly added command in the documentation.
 * A comment here explaining the reason for the same should be good.The 
scenario which this seems to be handling.

{code:java}
+    } catch (Exception e) {
+      LOG.error("Cannot get create location for {}", src);
+      List<RemoteLocation> locs =
+          this.router.getRpcServer().getLocationsForPath(src, false);
+      if (locs != null && !locs.isEmpty()) {
+        loc = locs.get(0);
+      }
{code}
Barring file.txt (The first in the test) all lands in the exception area only.
 * A minor doubt, Will this work for directories too? I feel this should. If it 
is intended too then rather than sending the only one we should send all 
destinations and if it is not intended to work for directory we should add a 
check for the same to avoid giving back single result for the same, if that 
seems to be not there. If am not missing something.

> RBF: Tooling to identify the subcluster location of a file
> ----------------------------------------------------------
>
>                 Key: HDFS-14249
>                 URL: https://issues.apache.org/jira/browse/HDFS-14249
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Íñigo Goiri
>            Assignee: Íñigo Goiri
>            Priority: Major
>         Attachments: HDFS-14249-HDFS-13891.000.patch, 
> HDFS-14249-HDFS-13891.001.patch
>
>
> Mount points can spread files across multiple subclusters depennding on a 
> policy (e.g., HASH, HASH_ALL). Administrators would need a way to identify 
> the location.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to