[
https://issues.apache.org/jira/browse/HDFS-13987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16648332#comment-16648332
]
Íñigo Goiri commented on HDFS-13987:
------------------------------------
[^HDFS-13987.1.patch] looks good.
The only question I have is the log line.
When we get a null location, the previous call is the one outputting the error.
Right now, it will just say: "Cannot get namespaces for null".
There must be a better message for this by knowing the reason of loc to be null.
> Review of RandomResolver Class
> ------------------------------
>
> Key: HDFS-13987
> URL: https://issues.apache.org/jira/browse/HDFS-13987
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: federation
> Affects Versions: 3.2.0
> Reporter: BELUGA BEHR
> Assignee: BELUGA BEHR
> Priority: Minor
> Attachments: HDFS-13987.1.patch
>
>
> * Use {{ThreadLocalRandom}}
> * Do not create a list, and copy, to pick a random index
> * An early-return in the method means that the 'ERROR' logging is skipped in
> some cases
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]