[ https://issues.apache.org/jira/browse/HDFS-4885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13783163#comment-13783163 ]
Luke Lu commented on HDFS-4885: ------------------------------- {{BlockPlacementStatus}} impls should just override toString, so that fsck can just print the string without knowing {{BlockPlacementPolicy}} internal details. e.g. {{BlockPlacementStatusWithNodeGroup#toString}} can return "block should be replicated on 1 more node group and 1 more rack" for replication=2 after data VM movement. To help thinking more generally, one usecase the API should be able cover is group (anti-)affinity of blocks, useful for efficient fail-over of HBase regions, where we'd prefer one replica of blocks belong to the same group (region) being replaced on the same node (affinity), while the other replicas of the group should belong to different fault domains (anti-affinity). > Update verifyBlockPlacement() API in BlockPlacementPolicy > --------------------------------------------------------- > > Key: HDFS-4885 > URL: https://issues.apache.org/jira/browse/HDFS-4885 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: Junping Du > Assignee: Junping Du > Labels: BlockPlacementPolicy > Attachments: HDFS-4885.patch, HDFS-4885-v2.patch > > > verifyBlockPlacement() has unused parameter -srcPath as its responsibility > just verify single block rather than files under a specific path. Also the > return value (int) does not make sense as the violation of block placement > has other case than number of racks, so boolean value should be better. -- This message was sent by Atlassian JIRA (v6.1#6144)