[
https://issues.apache.org/jira/browse/HDFS-13736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16955911#comment-16955911
]
Xiaoqiao He commented on HDFS-13736:
------------------------------------
Thanks [~xiaodong.hu] for interesting catching. [^HDFS-13736.003.patch] almost
LGTM. Some checkstyle nit comment.
1. line length should be better less than 80 characters. such as
#BlockPlacementPolicyDefault L244, L505, L555.
2. Please following alignment code style, such as the following
segment(#BlockPlacementPolicyDefault L590-594) may be better. Please also check
TestReplicationPolicy#testChooseFromFavoredNodesWhenPreferLocalSetToFalse or
let's wait what Jenkins says.
{code:java}
protected DatanodeStorageInfo chooseLocalStorage(Node localMachine,
boolean isFavoredNode, Set<Node> excludedNodes, long blocksize,
int maxNodesPerRack, List<DatanodeStorageInfo> results,
boolean avoidStaleNodes, EnumMap<StorageType, Integer> storageTypes,
boolean fallbackToLocalRack) throws NotEnoughReplicasException {
{code}
3. It is better to add annotation for
BlockPlacementPolicyDefault#chooseLocalStorage, especially for new parameter
#isFavoredNode in order to avoid it's readability getting worse and worse.
Thanks [~xiaodong.hu] for your contributions again.
> BlockPlacementPolicyDefault can not choose favored nodes when
> 'dfs.namenode.block-placement-policy.default.prefer-local-node' set to false
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HDFS-13736
> URL: https://issues.apache.org/jira/browse/HDFS-13736
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 3.2.0
> Reporter: hu xiaodong
> Assignee: hu xiaodong
> Priority: Major
> Attachments: HDFS-13736.001.patch, HDFS-13736.002.patch,
> HDFS-13736.003.patch
>
>
> BlockPlacementPolicyDefault can not choose favored nodes when
> 'dfs.namenode.block-placement-policy.default.prefer-local-node' set to false.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]