You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2017/09/30 00:12:39 UTC
[1/4] hbase git commit: HBASE-18559 Add histogram to
MetricsConnection to track concurrent calls per server
Repository: hbase
Updated Branches:
refs/heads/branch-1 b2943504b -> 831e31b34
refs/heads/branch-1.4 790d006cc -> 66d348a3f
refs/heads/branch-2 55987efdc -> 759110c22
refs/heads/master f20580a53 -> c835dcc7e
HBASE-18559 Add histogram to MetricsConnection to track concurrent calls per server
Signed-off-by: Andrew Purtell <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/831e31b3
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/831e31b3
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/831e31b3
Branch: refs/heads/branch-1
Commit: 831e31b34b6c72a43ee90effc8ca58e84246f4b0
Parents: b294350
Author: Robert Yokota <ry...@yammer-inc.com>
Authored: Thu Aug 10 14:13:04 2017 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Sep 29 17:12:18 2017 -0700
----------------------------------------------------------------------
.../hadoop/hbase/client/MetricsConnection.java | 16 ++++++++++++++++
.../apache/hadoop/hbase/ipc/AbstractRpcClient.java | 1 +
2 files changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/831e31b3/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
index 7180ac2..6328d7f 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
@@ -71,6 +71,7 @@ public class MetricsConnection implements StatisticTrackable {
private long responseSizeBytes = 0;
private long startTime = 0;
private long callTimeMs = 0;
+ private int concurrentCallsPerServer = 0;
public long getRequestSizeBytes() {
return requestSizeBytes;
@@ -103,6 +104,14 @@ public class MetricsConnection implements StatisticTrackable {
public void setCallTimeMs(long callTimeMs) {
this.callTimeMs = callTimeMs;
}
+
+ public int getConcurrentCallsPerServer() {
+ return concurrentCallsPerServer;
+ }
+
+ public void setConcurrentCallsPerServer(int callsPerServer) {
+ this.concurrentCallsPerServer = callsPerServer;
+ }
}
@VisibleForTesting
@@ -280,6 +289,7 @@ public class MetricsConnection implements StatisticTrackable {
@VisibleForTesting protected final Counter metaCacheNumClearRegion;
@VisibleForTesting protected final Counter hedgedReadOps;
@VisibleForTesting protected final Counter hedgedReadWin;
+ @VisibleForTesting protected final Histogram concurrentCallsPerServerHist;
// dynamic metrics
@@ -348,6 +358,8 @@ public class MetricsConnection implements StatisticTrackable {
this.putTracker = new CallTracker(this.registry, "Mutate", "Put", scope);
this.multiTracker = new CallTracker(this.registry, "Multi", scope);
this.runnerStats = new RunnerStats(this.registry);
+ this.concurrentCallsPerServerHist = registry.newHistogram(this.getClass(),
+ "concurrentCallsPerServer", scope);
this.reporter = new JmxReporter(this.registry);
this.reporter.start();
@@ -450,6 +462,10 @@ public class MetricsConnection implements StatisticTrackable {
/** Report RPC context to metrics system. */
public void updateRpc(MethodDescriptor method, Message param, CallStats stats) {
+ int callsPerServer = stats.getConcurrentCallsPerServer();
+ if (callsPerServer > 0) {
+ concurrentCallsPerServerHist.update(callsPerServer);
+ }
// this implementation is tied directly to protobuf implementation details. would be better
// if we could dispatch based on something static, ie, request Message type.
if (method.getService() == ClientService.getDescriptor()) {
http://git-wip-us.apache.org/repos/asf/hbase/blob/831e31b3/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
index a110b8d..caa19b8 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
@@ -415,6 +415,7 @@ public abstract class AbstractRpcClient<T extends RpcConnection> implements RpcC
if (count > maxConcurrentCallsPerServer) {
throw new ServerTooBusyException(addr, count);
}
+ cs.setConcurrentCallsPerServer(count);
T connection = getConnection(remoteId);
connection.sendRequest(call, hrc);
} catch (Exception e) {
[3/4] hbase git commit: HBASE-18559 Add histogram to
MetricsConnection to track concurrent calls per server
Posted by ap...@apache.org.
HBASE-18559 Add histogram to MetricsConnection to track concurrent calls per server
Signed-off-by: Andrew Purtell <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c835dcc7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c835dcc7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c835dcc7
Branch: refs/heads/master
Commit: c835dcc7e70cc13415e60198ed4fb9c0e7339ac4
Parents: f20580a
Author: Robert Yokota <ry...@yammer-inc.com>
Authored: Thu Aug 10 14:13:04 2017 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Sep 29 17:12:26 2017 -0700
----------------------------------------------------------------------
.../hadoop/hbase/client/MetricsConnection.java | 16 ++++++++++++++++
.../apache/hadoop/hbase/ipc/AbstractRpcClient.java | 1 +
2 files changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/c835dcc7/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
index c54729b..b88baa4 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
@@ -73,6 +73,7 @@ public class MetricsConnection implements StatisticTrackable {
private long responseSizeBytes = 0;
private long startTime = 0;
private long callTimeMs = 0;
+ private int concurrentCallsPerServer = 0;
public long getRequestSizeBytes() {
return requestSizeBytes;
@@ -105,6 +106,14 @@ public class MetricsConnection implements StatisticTrackable {
public void setCallTimeMs(long callTimeMs) {
this.callTimeMs = callTimeMs;
}
+
+ public int getConcurrentCallsPerServer() {
+ return concurrentCallsPerServer;
+ }
+
+ public void setConcurrentCallsPerServer(int callsPerServer) {
+ this.concurrentCallsPerServer = callsPerServer;
+ }
}
@VisibleForTesting
@@ -271,6 +280,7 @@ public class MetricsConnection implements StatisticTrackable {
@VisibleForTesting protected final Counter metaCacheNumClearRegion;
@VisibleForTesting protected final Counter hedgedReadOps;
@VisibleForTesting protected final Counter hedgedReadWin;
+ @VisibleForTesting protected final Histogram concurrentCallsPerServerHist;
// dynamic metrics
@@ -327,6 +337,8 @@ public class MetricsConnection implements StatisticTrackable {
this.putTracker = new CallTracker(this.registry, "Mutate", "Put", scope);
this.multiTracker = new CallTracker(this.registry, "Multi", scope);
this.runnerStats = new RunnerStats(this.registry);
+ this.concurrentCallsPerServerHist = registry.histogram(name(MetricsConnection.class,
+ "concurrentCallsPerServer", scope));
this.reporter = JmxReporter.forRegistry(this.registry).build();
this.reporter.start();
@@ -422,6 +434,10 @@ public class MetricsConnection implements StatisticTrackable {
/** Report RPC context to metrics system. */
public void updateRpc(MethodDescriptor method, Message param, CallStats stats) {
+ int callsPerServer = stats.getConcurrentCallsPerServer();
+ if (callsPerServer > 0) {
+ concurrentCallsPerServerHist.update(callsPerServer);
+ }
// this implementation is tied directly to protobuf implementation details. would be better
// if we could dispatch based on something static, ie, request Message type.
if (method.getService() == ClientService.getDescriptor()) {
http://git-wip-us.apache.org/repos/asf/hbase/blob/c835dcc7/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
index de4dea4..22da05a 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
@@ -416,6 +416,7 @@ public abstract class AbstractRpcClient<T extends RpcConnection> implements RpcC
if (count > maxConcurrentCallsPerServer) {
throw new ServerTooBusyException(addr, count);
}
+ cs.setConcurrentCallsPerServer(count);
T connection = getConnection(remoteId);
connection.sendRequest(call, hrc);
} catch (Exception e) {
[2/4] hbase git commit: HBASE-18559 Add histogram to
MetricsConnection to track concurrent calls per server
Posted by ap...@apache.org.
HBASE-18559 Add histogram to MetricsConnection to track concurrent calls per server
Signed-off-by: Andrew Purtell <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/66d348a3
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/66d348a3
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/66d348a3
Branch: refs/heads/branch-1.4
Commit: 66d348a3f88ae8092a1e6836a7978952a0cac6a3
Parents: 790d006
Author: Robert Yokota <ry...@yammer-inc.com>
Authored: Thu Aug 10 14:13:04 2017 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Sep 29 17:12:23 2017 -0700
----------------------------------------------------------------------
.../hadoop/hbase/client/MetricsConnection.java | 16 ++++++++++++++++
.../apache/hadoop/hbase/ipc/AbstractRpcClient.java | 1 +
2 files changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/66d348a3/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
index 7180ac2..6328d7f 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
@@ -71,6 +71,7 @@ public class MetricsConnection implements StatisticTrackable {
private long responseSizeBytes = 0;
private long startTime = 0;
private long callTimeMs = 0;
+ private int concurrentCallsPerServer = 0;
public long getRequestSizeBytes() {
return requestSizeBytes;
@@ -103,6 +104,14 @@ public class MetricsConnection implements StatisticTrackable {
public void setCallTimeMs(long callTimeMs) {
this.callTimeMs = callTimeMs;
}
+
+ public int getConcurrentCallsPerServer() {
+ return concurrentCallsPerServer;
+ }
+
+ public void setConcurrentCallsPerServer(int callsPerServer) {
+ this.concurrentCallsPerServer = callsPerServer;
+ }
}
@VisibleForTesting
@@ -280,6 +289,7 @@ public class MetricsConnection implements StatisticTrackable {
@VisibleForTesting protected final Counter metaCacheNumClearRegion;
@VisibleForTesting protected final Counter hedgedReadOps;
@VisibleForTesting protected final Counter hedgedReadWin;
+ @VisibleForTesting protected final Histogram concurrentCallsPerServerHist;
// dynamic metrics
@@ -348,6 +358,8 @@ public class MetricsConnection implements StatisticTrackable {
this.putTracker = new CallTracker(this.registry, "Mutate", "Put", scope);
this.multiTracker = new CallTracker(this.registry, "Multi", scope);
this.runnerStats = new RunnerStats(this.registry);
+ this.concurrentCallsPerServerHist = registry.newHistogram(this.getClass(),
+ "concurrentCallsPerServer", scope);
this.reporter = new JmxReporter(this.registry);
this.reporter.start();
@@ -450,6 +462,10 @@ public class MetricsConnection implements StatisticTrackable {
/** Report RPC context to metrics system. */
public void updateRpc(MethodDescriptor method, Message param, CallStats stats) {
+ int callsPerServer = stats.getConcurrentCallsPerServer();
+ if (callsPerServer > 0) {
+ concurrentCallsPerServerHist.update(callsPerServer);
+ }
// this implementation is tied directly to protobuf implementation details. would be better
// if we could dispatch based on something static, ie, request Message type.
if (method.getService() == ClientService.getDescriptor()) {
http://git-wip-us.apache.org/repos/asf/hbase/blob/66d348a3/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
index a110b8d..caa19b8 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
@@ -415,6 +415,7 @@ public abstract class AbstractRpcClient<T extends RpcConnection> implements RpcC
if (count > maxConcurrentCallsPerServer) {
throw new ServerTooBusyException(addr, count);
}
+ cs.setConcurrentCallsPerServer(count);
T connection = getConnection(remoteId);
connection.sendRequest(call, hrc);
} catch (Exception e) {
[4/4] hbase git commit: HBASE-18559 Add histogram to
MetricsConnection to track concurrent calls per server
Posted by ap...@apache.org.
HBASE-18559 Add histogram to MetricsConnection to track concurrent calls per server
Signed-off-by: Andrew Purtell <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/759110c2
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/759110c2
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/759110c2
Branch: refs/heads/branch-2
Commit: 759110c2254ce043467b554746776c8beb0ccfd6
Parents: 55987ef
Author: Robert Yokota <ry...@yammer-inc.com>
Authored: Thu Aug 10 14:13:04 2017 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Sep 29 17:12:26 2017 -0700
----------------------------------------------------------------------
.../hadoop/hbase/client/MetricsConnection.java | 16 ++++++++++++++++
.../apache/hadoop/hbase/ipc/AbstractRpcClient.java | 1 +
2 files changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/759110c2/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
index c54729b..b88baa4 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
@@ -73,6 +73,7 @@ public class MetricsConnection implements StatisticTrackable {
private long responseSizeBytes = 0;
private long startTime = 0;
private long callTimeMs = 0;
+ private int concurrentCallsPerServer = 0;
public long getRequestSizeBytes() {
return requestSizeBytes;
@@ -105,6 +106,14 @@ public class MetricsConnection implements StatisticTrackable {
public void setCallTimeMs(long callTimeMs) {
this.callTimeMs = callTimeMs;
}
+
+ public int getConcurrentCallsPerServer() {
+ return concurrentCallsPerServer;
+ }
+
+ public void setConcurrentCallsPerServer(int callsPerServer) {
+ this.concurrentCallsPerServer = callsPerServer;
+ }
}
@VisibleForTesting
@@ -271,6 +280,7 @@ public class MetricsConnection implements StatisticTrackable {
@VisibleForTesting protected final Counter metaCacheNumClearRegion;
@VisibleForTesting protected final Counter hedgedReadOps;
@VisibleForTesting protected final Counter hedgedReadWin;
+ @VisibleForTesting protected final Histogram concurrentCallsPerServerHist;
// dynamic metrics
@@ -327,6 +337,8 @@ public class MetricsConnection implements StatisticTrackable {
this.putTracker = new CallTracker(this.registry, "Mutate", "Put", scope);
this.multiTracker = new CallTracker(this.registry, "Multi", scope);
this.runnerStats = new RunnerStats(this.registry);
+ this.concurrentCallsPerServerHist = registry.histogram(name(MetricsConnection.class,
+ "concurrentCallsPerServer", scope));
this.reporter = JmxReporter.forRegistry(this.registry).build();
this.reporter.start();
@@ -422,6 +434,10 @@ public class MetricsConnection implements StatisticTrackable {
/** Report RPC context to metrics system. */
public void updateRpc(MethodDescriptor method, Message param, CallStats stats) {
+ int callsPerServer = stats.getConcurrentCallsPerServer();
+ if (callsPerServer > 0) {
+ concurrentCallsPerServerHist.update(callsPerServer);
+ }
// this implementation is tied directly to protobuf implementation details. would be better
// if we could dispatch based on something static, ie, request Message type.
if (method.getService() == ClientService.getDescriptor()) {
http://git-wip-us.apache.org/repos/asf/hbase/blob/759110c2/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
index de4dea4..22da05a 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
@@ -416,6 +416,7 @@ public abstract class AbstractRpcClient<T extends RpcConnection> implements RpcC
if (count > maxConcurrentCallsPerServer) {
throw new ServerTooBusyException(addr, count);
}
+ cs.setConcurrentCallsPerServer(count);
T connection = getConnection(remoteId);
connection.sendRequest(call, hrc);
} catch (Exception e) {