hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Helmling (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6787) Convert RowProcessorProtocol to protocol buffer service
Date Tue, 13 Nov 2012 18:34:13 GMT

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

Gary Helmling commented on HBASE-6787:
--------------------------------------

Sorry for the delay in the review.  Overall this looks good to me, but I'm still trying to
think through the client usage.

The one thing eating at me is that between this and the ColumnInterpreter stuff for AggregateService,
we seem to be working towards a common interface for the user code serialization/deserialization
bits:

Request ser/de:
{code:java}
public ByteString rowProcessorSpecificData() throws IOException {}

public void initialize(ByteString bytes) throws IOException {}
{code}

Response ser/de:
{code:java}
public ByteString getProtoForResult(T t) {}

public T parseResponseAsResultType(byte[] response) {}
{code}

Given the very similar pattern here, does it make sense to try to factor these out into a
common interface that can be shared?

I'm not sure it's really necessary to remain serialization agnostic for the user code, either.
 Would it be simpler if we just required PB serialization for these bits?

RowProcessor could represent it's serialization as a message:
{code:java}
Message getRequestData() throws IOException;

void initialize(Message request) throws IOException;
{code}
(These could also be parameterized for additional type safety.)

And the response type could similarly be a message:
{code:java}
T getResult(); // where <T extends Message>
{code}

Clients would still get a typed response that they could extract values from without the additional
{{getProtoForResult(T t)}} and {{parseResponseAsResultType(byte[] bytes)}} methods.

Does this make sense?  Of course you could still do the PB-conversions yourself for PB serialization
with the original patch.  But I think we're adding some complexity to remain serialization
agnostic in this case.  Is the need there to make the trade off worth it?
                
> Convert RowProcessorProtocol to protocol buffer service
> -------------------------------------------------------
>
>                 Key: HBASE-6787
>                 URL: https://issues.apache.org/jira/browse/HBASE-6787
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Coprocessors
>            Reporter: Gary Helmling
>            Assignee: Devaraj Das
>             Fix For: 0.96.0
>
>         Attachments: 6787-1.patch, 6787-2.patch
>
>
> With coprocessor endpoints now exposed as protobuf defined services, we should convert
over all of our built-in endpoints to PB services.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message