You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "terry zhang (JIRA)" <ji...@apache.org> on 2012/08/21 07:14:37 UTC

[jira] [Commented] (HBASE-6623) [replication] replication metrics value AgeOfLastShippedOp is not set correctly

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

terry zhang commented on HBASE-6623:
------------------------------------

we can use currentNbEntries instead of this.entriesArray.length
                
> [replication] replication metrics value AgeOfLastShippedOp is not set correctly
> -------------------------------------------------------------------------------
>
>                 Key: HBASE-6623
>                 URL: https://issues.apache.org/jira/browse/HBASE-6623
>             Project: HBase
>          Issue Type: Bug
>          Components: replication
>    Affects Versions: 0.94.1
>            Reporter: terry zhang
>            Assignee: terry zhang
>            Priority: Minor
>
> From code below we can see AgeOfLastShippedOp is not set correctly
> {code:title=ReplicationSource.java|borderStyle=solid}
> // entriesArray init
>   public void init(){
>     this.entriesArray = new HLog.Entry[this.replicationQueueNbCapacity];
>     for (int i = 0; i < this.replicationQueueNbCapacity; i++) {
>       this.entriesArray[i] = new HLog.Entry();
>     }
> }
> //set the metrics value should not get the array length
> protected void shipEdits() {
> ...
>         this.metrics.setAgeOfLastShippedOp(
>             this.entriesArray[this.entriesArray.length-1].getKey().getWriteTime());
> ...
> }
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira