[
https://issues.apache.org/jira/browse/HBASE-8128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13605262#comment-13605262
]
stack commented on HBASE-8128:
------------------------------
bq. Agreed. I'm actually studying this currently.
+ Too many Interfaces/Classes implemented (Row, Mutation, CellScanner, etc.)
+ Deletes and Gets are the same because they hold coordinates only, no data.
+ Put and Result are same because they hold Cells/KeyValues.
+ Mutation cuts across the two groupings because Deletes and Put 'mutate'.
+ High-level, these should be client-side only classes I'd say. Over in the
server we should never materialize them; protobufs are rich in accessors and
setters and we have to materialize them server-side anyways so we might as well
pass them down into the server (rather than do the protobuf object conversion
to these client-side Put/Delete, etc. POJOs, first, and then pass them into the
server).
+ CellScanner Interface was just added to these objects to faciliate rpc work.
Ideally, these Put/Delete, objects become Cell vesssels only. When they get to
the rpc edge, we will ask them for the Cell content and we'll put the
Put/Delete metadata on the wire apart from their Cell content. Would be coolio
if when you added an item, it was made into a Cell client-side and the Cell was
put into a CellBlock hosted by the Put or Increment, optionally compressing as
we went....
If you want more input to ignore (smile), just ask [~nkeywal]
> HTable#put improvements
> -----------------------
>
> Key: HBASE-8128
> URL: https://issues.apache.org/jira/browse/HBASE-8128
> Project: HBase
> Issue Type: Bug
> Components: Client
> Affects Versions: 0.95.0, 0.96.0
> Reporter: nkeywal
> Assignee: nkeywal
> Priority: Trivial
> Fix For: 0.95.0, 0.96.0
>
> Attachments: 8128.v1.patch
>
>
> 3 points:
> - When doing a single put, we're creating an object by calling Arrays.asList
> - we're doing a size check every 10 put. Not doing it seems simpler, better
> and allows to share some code between a single put and a list of puts.
> - we could call flushCommits on empty write buffer, especially for someone
> using a lot of HTable instead of using a pool, as it's called in close().
--
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