Andrew Wong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/15315
Change subject: [java] subprocess: add a metrics message ...................................................................... [java] subprocess: add a metrics message This patch adds a metrics message to each SubprocessResponsePB. These metrics are general metrics that most Subprocess implementations will likely find useful. Namely, inbound queue time, outbound queue time, inbound queue length, outbound queue length, and execution time. To get these metrics, I've passed the new SubprocessMetrics class around alongside the request/response as it journeys through the SubprocessExecutor, timing the different stages as it goes. Right before sending the final response over the pipe, the queue lengths are determined and the final response is built. A couple of tests are added to demonstrate how these metrics may be useful. Along the way, I refactored the EchoSubprocess tests to be a bit more ergonomic w.r.t creating, sending, and receiving messages. These metrics are currently unused -- a later patch will plumb them into the C++ metrics. Change-Id: I11a89fff8df23c5057c577f2aebfd40922d01e3c --- M java/kudu-subprocess-echo/src/test/java/org/apache/kudu/subprocess/echo/TestEchoSubprocess.java A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/InboundRequest.java M java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/MessageParser.java M java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/MessageReader.java M java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/MessageWriter.java A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/OutboundResponse.java M java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/ProtocolHandler.java M java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/SubprocessExecutor.java A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/SubprocessMetrics.java M java/kudu-subprocess/src/test/java/org/apache/kudu/subprocess/MessageTestUtil.java M src/kudu/subprocess/subprocess.proto 11 files changed, 558 insertions(+), 145 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/15/15315/1 -- To view, visit http://gerrit.cloudera.org:8080/15315 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I11a89fff8df23c5057c577f2aebfd40922d01e3c Gerrit-Change-Number: 15315 Gerrit-PatchSet: 1 Gerrit-Owner: Andrew Wong <[email protected]>
