[
https://issues.apache.org/jira/browse/HDFS-9425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15144153#comment-15144153
]
Vinayakumar B commented on HDFS-9425:
-------------------------------------
Thanks [~brahmareddy] for the update.
I have just 2 comments. After that Its good to go.
1. Move the below change down after finalzeReplica is called.
{code}+ synchronized (this) {
+ // Increment numBlocks here as this block moved without knowing to BPS
+ FsVolumeImpl volume = (FsVolumeImpl) newReplicaInfo.getVolume();
+ volume.getBlockPoolSlice(block.getBlockPoolId()).incrNumBlocks();
+ }
// Finalize the copied files
newReplicaInfo = finalizeReplica(block.getBlockPoolId(), newReplicaInfo);
{code}
2. Nit: Code formatting for {{incDfsUsedAndNumBlocks}}
Checkstyle warning can be ignored. As its accessed in the same class and
VolumeInfo is private.
[~cnauroth], Do you want to take a look?
> Expose number of blocks per volume as a metric
> ----------------------------------------------
>
> Key: HDFS-9425
> URL: https://issues.apache.org/jira/browse/HDFS-9425
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Brahma Reddy Battula
> Assignee: Brahma Reddy Battula
> Attachments: HDFS-9425-002.patch, HDFS-9425-003.patch, HDFS-9425.patch
>
>
> It will be helpful for user to know the usage in number of blocks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)