Updated Branches:
refs/heads/0.8 d726e14ee - cae19aa44
KAFKA-889 Add mbeans to track socket server's response queue size in addition
to request queue size; reviewed by Jun Rao and Joel Koshy
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/cae19aa4
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/cae19aa4
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/cae19aa4
Branch: refs/heads/0.8
Commit: cae19aa44f36775d8f95256e63e0cb50a0c0ba9f
Parents: d726e14
Author: Neha Narkhede neha.narkh...@gmail.com
Authored: Tue Apr 30 15:35:01 2013 -0700
Committer: Neha Narkhede neha.narkh...@gmail.com
Committed: Tue Apr 30 15:35:01 2013 -0700
--
.../main/scala/kafka/network/RequestChannel.scala |9 +
1 files changed, 9 insertions(+), 0 deletions(-)
--
http://git-wip-us.apache.org/repos/asf/kafka/blob/cae19aa4/core/src/main/scala/kafka/network/RequestChannel.scala
--
diff --git a/core/src/main/scala/kafka/network/RequestChannel.scala
b/core/src/main/scala/kafka/network/RequestChannel.scala
index c0e0dfc..c8f81c0 100644
--- a/core/src/main/scala/kafka/network/RequestChannel.scala
+++ b/core/src/main/scala/kafka/network/RequestChannel.scala
@@ -103,6 +103,15 @@ class RequestChannel(val numProcessors: Int, val
queueSize: Int) extends KafkaMe
}
)
+ for(i - 0 until numProcessors) {
+newGauge(
+ Processor- + i + -ResponseQueueSize,
+ new Gauge[Int] {
+def value = responseQueues(i).size()
+ }
+)
+ }
+
/** Send a request to be handled, potentially blocking until there is room
in the queue for the request */
def sendRequest(request: RequestChannel.Request) {
requestQueue.put(request)