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

Gary Helmling commented on HBASE-7405:
--------------------------------------

I tried extracting a single interface for the value <-> PB message conversions:
{code:java}
public interface TypeSerializer<T, Q extends Message> {

  public abstract Q wrap(T t);

  public abstract T unwrap(Q q);
}
{code}

But this didn't really pan out.  It saves some complexity in the 
ColumnInterpreter type signature (the additional Q and R are not required on 
that class) and avoids some minor duplication in the code, but it then adds 
more complexity in having potentially 3 client classes to send to the server 
(CI, serializer for cell type and serializer for promoted type).  So I don't 
think there is any net benefit.  Sorry for the diversion.

I'd say let's stick with DD's v3 patch.  The one change I think worth making is 
extracting out the reflection code to do Message.parseFrom(), which is 
currently repeated several times in AggregationClient and 
AggregateImplementation, into ProtobufUtil.  

                
> Enforce PB ser/de for Aggregate protocol and associated ColumnInterpreter 
> user code bits
> ----------------------------------------------------------------------------------------
>
>                 Key: HBASE-7405
>                 URL: https://issues.apache.org/jira/browse/HBASE-7405
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Coprocessors, Protobufs
>            Reporter: Devaraj Das
>            Assignee: Devaraj Das
>             Fix For: 0.96.0
>
>         Attachments: 7405-1.patch, 7405-2.patch, 7405-3.patch
>
>
> Enforce PB ser/de for Aggregate protocol and associated ColumnInterpreter 
> user code bits

--
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

Reply via email to