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

Lars Hofhansl commented on HBASE-7381:
--------------------------------------

Result in trunk already has a copyFrom method. I added that while removing 
Writable from Result.
Let's call it the same in 0.94.

Note that this is only needed to mapred (and API requiring mutable objects is 
an abomination - IMHO).

I'm fine making this change in 0.94, should then also fix TableRecordReaderImpl 
by calling this API.

                
> Lightweight data transfer for Class Result
> ------------------------------------------
>
>                 Key: HBASE-7381
>                 URL: https://issues.apache.org/jira/browse/HBASE-7381
>             Project: HBase
>          Issue Type: Improvement
>          Components: Client
>            Reporter: Cheng Hao
>            Priority: Trivial
>             Fix For: 0.94.4
>
>         Attachments: result_lightweight_copy.patch
>
>
> Currently,the data transferring between 2 Result objects in the same process, 
> will cause additional/unnecessary data parsing & copying; as we have to do 
> that via "Writables.copyWritable(result1, result2)", which internally is 
> serialization, data copying, and de-serialization.
> The use case are quite common when integrated with Hadoop job running;
> The protocol org.apache.hadoop.mapred.RecordReader defined in Hadoop, 
> provides 3 interfaces:
> 1) K createKey();
> 2) V createValue();
> 3) boolean next(K key, V value) throws IOException;
> In the 3rd method implementation, most likely requires the value (should be 
> Result object) to be filled, with the Result object from HBase.

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