[jira] [Commented] (HBASE-7215) Put, Delete, and Increment still implement Writable

2012-11-25 Thread Lars Hofhansl (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-7215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13503612#comment-13503612
 ] 

Lars Hofhansl commented on HBASE-7215:
--

Result.java also still implements Writable.

The sticky part is that M/R expects Writables. So if we have Put/Delete not as 
Writable they cannot be used in M/R, but if we keep them as Writable we are not 
using protobufs everywhere and hence we do not have wire compatibility.

Maybe readFields and write could be implemented in terms of protobuf, so that 
we still have Writables, but all encoding/decoding is done by protobuf.


 Put, Delete, and Increment still implement Writable
 ---

 Key: HBASE-7215
 URL: https://issues.apache.org/jira/browse/HBASE-7215
 Project: HBase
  Issue Type: Bug
Reporter: Lars Hofhansl
Priority: Blocker
 Fix For: 0.96.0


 Making blocker as suggested by Stack.
 At least the following still use Put/Delete as writables.
 * IdentityTableReduce.java
 * MultiPut.java
 * HRegionServer.checkAndMutate

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


[jira] [Commented] (HBASE-7215) Put, Delete, and Increment still implement Writable

2012-11-25 Thread Lars Hofhansl (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-7215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13503624#comment-13503624
 ] 

Lars Hofhansl commented on HBASE-7215:
--

After some looking... If we want continue to support Put/Delete/Result in M/R, 
using protobufs to implement readFields and write is the only way out.

In Writable.write(DataOutput) we'd create the write Mutate protobuf object, 
write that to a bytearray and then write that byte array into the DataOutput. 
It's too bad we only have a DataOutut here and not an OutputStream, othewise we 
could just stream the protobuf object through that stream, saving one copy of 
all the data.
In Writable.readFields we do something akin to ProtoBufutil.toDelete after we 
read the Mutate object from the stream.

That means the data is not streamed, but instead materialized in memory 
three(!) times in these cases (the object itself, its protobuf representation, 
and the byte array to be sent across the wire).

I'd welcome any better ideas!


 Put, Delete, and Increment still implement Writable
 ---

 Key: HBASE-7215
 URL: https://issues.apache.org/jira/browse/HBASE-7215
 Project: HBase
  Issue Type: Bug
Reporter: Lars Hofhansl
Priority: Blocker
 Fix For: 0.96.0


 Making blocker as suggested by Stack.
 At least the following still use Put/Delete as writables.
 * IdentityTableReduce.java
 * MultiPut.java
 * HRegionServer.checkAndMutate

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