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

dhruba borthakur commented on HDFS-920:
---------------------------------------

I am guessing that the metric currently tracks the Namenode's internal concept 
of a transaction. For example, creating a file actually actually does two 
transactions, one for creating the name in the namespace and once when the file 
is closed and the list of blockids for that file are written out to the 
editslog. Creating a new block for a file does not result in a namenode 
transaction.

For example, if you create a file for writing and before closing the file you 
restart the namenode, you will see that the file will have no blocks associated 
with it.

> Incorrect metrics reporting of transcations metrics.  
> ------------------------------------------------------
>
>                 Key: HDFS-920
>                 URL: https://issues.apache.org/jira/browse/HDFS-920
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.20.1, 0.20.2, 0.21.0, 0.22.0
>            Reporter: Ravi Phulari
>             Fix For: 0.20.2
>
>
> Transaction metrics *transactions.getPreviousIntervalNumOps()* reported for 
> name node edit logs are reporting incorrect metrics. 
> Transaction metrics should report 3 transactions upon creating a file of 1 
> block size - ( 1 for create file + 1 for one block write + 1 for close file ) 
> which is reported correctly.
> Similarly metrics should report 12 transactions upon creating a file of 10 
> block size - ( 1 for create file + 10 for ten block writes + 1 for close file 
> ) which is reported incorrectly as 3.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to