[
https://issues.apache.org/jira/browse/HBASE-13549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14538461#comment-14538461
]
Andrew Purtell commented on HBASE-13549:
----------------------------------------
Changes to any branch need to go through master. Please patch the master branch
[~abhishek.chouhan].
{code}
---
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
+++
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
@@ -530,4 +531,14 @@ class MetricsRegionServerWrapperImpl
public long getBlockedRequestsCount() {
return blockedRequestsCount;
}
+
+ @Override
+ public long getLeaseRecoveryFailures() {
+ return FSUtils.getLeaseRecoveryFailures();
+ }
+
+ @Override
+ public long getLeaseRecoveryTimeouts() {
+ return FSUtils.getLeaseRecoveryTimeouts();
+ }
{code}
It would be better if these counts are kept in the metrics classes, using
metrics counters, like all the others.
{code}
diff --git
a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
index 57eeb7c..b321f15 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
@@ -99,6 +100,10 @@ public abstract class FSUtils {
/** Set to true on Windows platforms */
public static final boolean WINDOWS =
System.getProperty("os.name").startsWith("Windows");
+ /** To keep count of lease recovery failures and timeouts */
+ private static final AtomicLong leaseRecoveryFailures = new AtomicLong();
+ private static final AtomicLong leaseRecoveryTimeouts = new AtomicLong();
+
protected FSUtils() {
super();
}
{code}
Ditto
> metric for failed lease recovery
> --------------------------------
>
> Key: HBASE-13549
> URL: https://issues.apache.org/jira/browse/HBASE-13549
> Project: HBase
> Issue Type: Sub-task
> Components: Usability
> Reporter: Sean Busbey
> Attachments: HBASE-13549-0.98.patch
>
>
> we should publish metrics for
> * lease recovery failures
> * lease recovery timeout
> right now you have to examine the logs of individual RS to get this
> information and aggregating it is painful.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)