hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinayakumar B (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9425) Expose number of blocks per volume as a metric
Date Thu, 04 Feb 2016 06:17:39 GMT

    [ https://issues.apache.org/jira/browse/HDFS-9425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15131804#comment-15131804
] 

Vinayakumar B commented on HDFS-9425:
-------------------------------------

{code}   void incDfsUsedAndNumBlocks(String bpid, long value,
                              boolean blockFileDeleted) {
    synchronized (dataset) {
      BlockPoolSlice bp = bpSlices.get(bpid);
      if (bp != null) {
        incDfsUsed(bpid, value);
        bp.incrNumBlocks();
        if (blockFileDeleted) {
          bp.decrNumBlocks();
        }
      }
    }
  }{code}
Here {{boolean blockFileDeleted}} is not required.
Instead of {{incDfsUsed(bpid, value);}} can directly call {{bp.incDfsUsed(value);}}


> 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.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)

Mime
View raw message