HBASE-15353 Add metric for number of CallQueueTooBigException's

This commit is contained in:
Jingcheng Du 2016-06-24 11:27:48 +08:00
parent 68c1b34dbc
commit 518faa735b
3 changed files with 14 additions and 0 deletions

View File

@ -85,6 +85,8 @@ public interface MetricsHBaseServerSource extends BaseSource {
String EXCEPTIONS_MULTI_TOO_LARGE_NAME = "exceptions.multiResponseTooLarge";
String EXCEPTIONS_MULTI_TOO_LARGE_DESC = "A response to a multi request was too large and the " +
"rest of the requests will have to be retried.";
String EXCEPTIONS_CALL_QUEUE_TOO_BIG = "exceptions.callQueueTooBig";
String EXCEPTIONS_CALL_QUEUE_TOO_BIG_DESC = "Call queue is full";
void authorizationSuccess();
@ -108,6 +110,7 @@ public interface MetricsHBaseServerSource extends BaseSource {
void unknownScannerException();
void tooBusyException();
void multiActionTooLargeException();
void callQueueTooBigException();
void sentBytes(long count);

View File

@ -49,6 +49,7 @@ public class MetricsHBaseServerSourceImpl extends BaseSourceImpl
private final MutableFastCounter exceptionsNSRE;
private final MutableFastCounter exceptionsMoved;
private final MutableFastCounter exceptionsMultiTooLarge;
private final MutableFastCounter exceptionsCallQueueTooBig;
private MetricHistogram queueCallTime;
@ -85,6 +86,8 @@ public class MetricsHBaseServerSourceImpl extends BaseSourceImpl
.newCounter(EXCEPTIONS_NSRE_NAME, EXCEPTIONS_TYPE_DESC, 0L);
this.exceptionsMultiTooLarge = this.getMetricsRegistry()
.newCounter(EXCEPTIONS_MULTI_TOO_LARGE_NAME, EXCEPTIONS_MULTI_TOO_LARGE_DESC, 0L);
this.exceptionsCallQueueTooBig = this.getMetricsRegistry().newCounter(
EXCEPTIONS_CALL_QUEUE_TOO_BIG, EXCEPTIONS_CALL_QUEUE_TOO_BIG_DESC, 0L);
this.authenticationSuccesses = this.getMetricsRegistry().newCounter(
AUTHENTICATION_SUCCESSES_NAME, AUTHENTICATION_SUCCESSES_DESC, 0L);
@ -168,6 +171,11 @@ public class MetricsHBaseServerSourceImpl extends BaseSourceImpl
exceptionsMultiTooLarge.incr();
}
@Override
public void callQueueTooBigException() {
exceptionsCallQueueTooBig.incr();
}
@Override
public void authenticationSuccess() {
authenticationSuccesses.incr();

View File

@ -19,6 +19,7 @@
package org.apache.hadoop.hbase.ipc;
import org.apache.hadoop.hbase.CallQueueTooBigException;
import org.apache.hadoop.hbase.MultiActionResultTooLarge;
import org.apache.hadoop.hbase.NotServingRegionException;
import org.apache.hadoop.hbase.RegionTooBusyException;
@ -110,6 +111,8 @@ public class MetricsHBaseServer {
source.failedSanityException();
} else if (throwable instanceof MultiActionResultTooLarge) {
source.multiActionTooLargeException();
} else if (throwable instanceof CallQueueTooBigException) {
source.callQueueTooBigException();
}
}
}