You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Hao Hao (Code Review)" <ge...@cloudera.org> on 2019/10/14 16:58:11 UTC

[kudu-CR] [java] KUDU-2791: process communicates via protobuf-based protocol

Hello Attila Bukor, Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14329

to look at the new patch set (#2).

Change subject: [java] KUDU-2791: process communicates via protobuf-based protocol
......................................................................

[java] KUDU-2791: process communicates via protobuf-based protocol

This commit adds a java tool that can communicate with other process
via protobuf-based protocol over standard input/output. It is useful
in cases a Kudu process (e.g. master) needs to talk to third-party
libraries written in Java.

This tool has: 1) a single reader thread that continuously reads
protobuf-based messages (with optional JSON encoding) from the standard
input and puts the messages to a FIFO blocking queue;
2) multiple writer threads that continuously retrieve the messages from
the queue, process them and write the responses to the standard output.

To support a new protobuf message type, simply extend the 'ProtocolProcessor'
interface to specify how to handle the message type.

Change-Id: Iaf9ad24dbc9acc681284b6433836271b5b4c7982
---
M java/gradle/dependencies.gradle
A java/kudu-subprocess/build.gradle
A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/EchoProtocolProcessor.java
A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/MessageConsumer.java
A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/MessageProcessor.java
A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/MessageProducer.java
A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/ProtocolProcessor.java
A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/SubprocessCommandLine.java
A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/SubprocessCommandLineParser.java
A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/SubprocessConfiguration.java
A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/SubprocessMain.java
A java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/SubprocessRuntimeException.java
A java/kudu-subprocess/src/main/resources/log4j.properties
A java/kudu-subprocess/src/test/java/org/apache/kudu/subprocess/MessageTest.java
A java/kudu-subprocess/src/test/java/org/apache/kudu/subprocess/TestMessageProcessor.java
A java/kudu-subprocess/src/test/java/org/apache/kudu/subprocess/TestMessageProducerConsumer.java
M java/settings.gradle
17 files changed, 1,387 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/29/14329/2
-- 
To view, visit http://gerrit.cloudera.org:8080/14329
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iaf9ad24dbc9acc681284b6433836271b5b4c7982
Gerrit-Change-Number: 14329
Gerrit-PatchSet: 2
Gerrit-Owner: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)