[
https://issues.apache.org/jira/browse/HDFS-13987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16650323#comment-16650323
]
BELUGA BEHR commented on HDFS-13987:
------------------------------------
[~elgoiri] So, the 'null' value was altogether ignored before. It will now be
captured in the logging.
However, looking at the calling code I see:
{code}
PathLocation mountTableResult = super.getDestinationForPath(path);
if (mountTableResult == null) {
LOG.error("The {} cannot find a location for {}",
super.getClass().getSimpleName(), path);
}
...
String firstNamespace =
orderedResolver.getFirstNamespace(path, mountTableResult);
{code}
... so really, the {{mountTableResult}} method argument should never be null,
and the current ERROR logging will never be triggered. You also get a nice
error message. I would leave the patch as is and if an operator gets that
'null' error message, they'll can report it here and it will require some
investigation.
> 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]