You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/02/08 18:05:00 UTC

[jira] [Commented] (KUDU-2971) Add a generic Java library wrapper

    [ https://issues.apache.org/jira/browse/KUDU-2971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17032964#comment-17032964 ] 

ASF subversion and git services commented on KUDU-2971:
-------------------------------------------------------

Commit 622260415fe2b0d2dd5f14f8e1b0e4a03eff2662 in kudu's branch refs/heads/master from Hao Hao
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=6222604 ]

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

This commit adds a java tool that can communicate over a stdin/stdout
pipe via protobuf-based protocol. 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 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.

IOException is fatal and causes the program to exit, e.g. I/O errors
when reading/writing to the pipe, and parsing malformed protobuf messages.
If encounter InterruptedException during placing/getting messages to/from
the queue, we consider it to be a signal to shutdown the task which
cause the program to exit as well.

To support a new protobuf message type, simply extend the 'ProtocolProcessor'
interface and add the specific ProcessorMain class (similar to 'EchoProcessorMain')
for the message type.

Change-Id: Iaf9ad24dbc9acc681284b6433836271b5b4c7982
Reviewed-on: http://gerrit.cloudera.org:8080/14329
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Tested-by: Kudu Jenkins


> Add a generic Java library wrapper
> ----------------------------------
>
>                 Key: KUDU-2971
>                 URL: https://issues.apache.org/jira/browse/KUDU-2971
>             Project: Kudu
>          Issue Type: Sub-task
>    Affects Versions: 1.11.0
>            Reporter: Hao Hao
>            Assignee: Hao Hao
>            Priority: Major
>
> For Ranger integration, to call Java Ranger plugin from masters, we need a create a wrapper (via Java subprocess). This should be generic to be used by future integrations (e.g. Atlas) which need to call other Java libraries.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)