[
https://issues.apache.org/jira/browse/HBASE-11617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080161#comment-14080161
]
Hadoop QA commented on HBASE-11617:
-----------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest
attachment
http://issues.apache.org/jira/secure/attachment/12658745/HBASE-11617-master-v1.patch
against trunk revision .
ATTACHMENT ID: 12658745
{color:green}+1 @author{color}. The patch does not contain any @author
tags.
{color:red}-1 tests included{color}. The patch doesn't appear to include
any new or modified tests.
Please justify why no new tests are needed for this
patch.
Also please list what manual steps were performed to
verify this patch.
{color:green}+1 javac{color}. The applied patch does not increase the
total number of javac compiler warnings.
{color:green}+1 javac{color}. The applied patch does not increase the
total number of javac compiler warnings.
{color:green}+1 javadoc{color}. The javadoc tool did not generate any
warning messages.
{color:green}+1 findbugs{color}. The patch does not introduce any new
Findbugs (version 2.0.3) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase
the total number of release audit warnings.
{color:green}+1 lineLengths{color}. The patch does not introduce lines
longer than 100
{color:green}+1 site{color}. The mvn site goal succeeds with this patch.
{color:red}-1 core tests{color}. The patch failed these unit tests:
org.apache.hadoop.hbase.TestIOFencing
org.apache.hadoop.hbase.master.TestRestartCluster
org.apache.hadoop.hbase.regionserver.TestEndToEndSplitTransaction
org.apache.hadoop.hbase.regionserver.TestRegionReplicas
org.apache.hadoop.hbase.client.TestReplicasClient
org.apache.hadoop.hbase.migration.TestNamespaceUpgrade
Test results:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//testReport/
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Console output:
https://builds.apache.org/job/PreCommit-HBASE-Build/10233//console
This message is automatically generated.
> incorrect AgeOfLastAppliedOp and AgeOfLastShippedOp in replication Metrics
> when no new replication OP
> ------------------------------------------------------------------------------------------------------
>
> Key: HBASE-11617
> URL: https://issues.apache.org/jira/browse/HBASE-11617
> Project: HBase
> Issue Type: Bug
> Components: Replication
> Affects Versions: 0.98.2
> Reporter: Demai Ni
> Assignee: Demai Ni
> Priority: Minor
> Fix For: 0.99.0, 0.98.5, 2.0.0
>
> Attachments: HBASE-11617-master-v1.patch
>
>
> AgeOfLastAppliedOp in MetricsSink.java is to indicate the time an edit sat in
> the 'replication queue' before it got replicated(aka applied)
> {code}
> /**
> * Set the age of the last applied operation
> *
> * @param timestamp The timestamp of the last operation applied.
> * @return the age that was set
> */
> public long setAgeOfLastAppliedOp(long timestamp) {
> lastTimestampForAge = timestamp;
> long age = System.currentTimeMillis() - lastTimestampForAge;
> rms.setGauge(SINK_AGE_OF_LAST_APPLIED_OP, age);
> return age;
> }
> {code}
> In the following scenario:
> 1) at 7:00am a sink op is applied, and the SINK_AGE_OF_LAST_APPLIED_OP is
> set for example 100ms;
> 2) and then NO new Sink op occur.
> 3) when a refreshAgeOfLastAppliedOp() is invoked at 8:00am. Instead of
> return the 100ms, the AgeOfLastAppliedOp become 1hour + 100ms,
> It was because that refreshAgeOfLastAppliedOp() get invoked periodically by
> getStats().
> proposed fix:
> {code}
> ---
> hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSink.java
> +++
> hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSink.java
> @@ -35,6 +35,7 @@ public class MetricsSink {
>
> private MetricsReplicationSource rms;
> private long lastTimestampForAge = System.currentTimeMillis();
> + private long age = 0;
>
> public MetricsSink() {
> rms =
> CompatibilitySingletonFactory.getInstance(MetricsReplicationSource.class);
> @@ -47,8 +48,12 @@ public class MetricsSink {
> * @return the age that was set
> */
> public long setAgeOfLastAppliedOp(long timestamp) {
> - lastTimestampForAge = timestamp;
> - long age = System.currentTimeMillis() - lastTimestampForAge;
> + if (lastTimestampForAge != timestamp) {
> + lastTimestampForAge = timestamp;
> + this.age = System.currentTimeMillis() - lastTimestampForAge;
> + } else {
> + this.age = 0;
> + }
> rms.setGauge(SINK_AGE_OF_LAST_APPLIED_OP, age);
> return age;
> }
> {code}
> detail discussion in [dev@hbase |
> http://mail-archives.apache.org/mod_mbox/hbase-dev/201407.mbox/%3CCAOEq2C5BKMXAM2Fv4LGVb_Ktek-Pm%3DhjOi33gSHX-2qHqAou6w%40mail.gmail.com%3E
> ]
--
This message was sent by Atlassian JIRA
(v6.2#6252)