[
https://issues.apache.org/jira/browse/HBASE-15945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15347085#comment-15347085
]
Enis Soztutar commented on HBASE-15945:
---------------------------------------
bq. "if/Cell.pb.h" is added for reusing the CellType enum defined in the PB
instead of redefining the same enums.Should we define our own enums ?
We have made explicit decision to not expose PB / Netty / Guava, etc in our
Java client as a part of public APIs. For HBase-2.0, we are plugging the leaks
that happened (HBASE-15978, HBASE-15607, HBASE-15605, HBASE-15610). I would
like to follow the same for C++ as well. The client API should NOT have any PB
/ Folly / external lib reference (except for maybe async interfaces since C++
lacks a standard {{Future}} impl. With this patch + basic Get / Put / Table, we
can easily hide PB.
The patch is looking great. Just a couple of comments.
- Lets remove {{+#include "if/Cell.pb.h"}} as per above, and make a CellType
enum in Cell.h.
- CellType, timestamp and seqId should be returned as values, not references.
- Both in Java and in C++ PB, we make explicit copy of the passed in byte[]'s
for KV/Cell.pb. We are not exposing CellImpl to the user, so I think it is fine
to not do the explicit clone.
> Patch for Key Value, Bytes and Cell
> -----------------------------------
>
> Key: HBASE-15945
> URL: https://issues.apache.org/jira/browse/HBASE-15945
> Project: HBase
> Issue Type: Sub-task
> Reporter: Sudeep Sunthankar
> Assignee: Sudeep Sunthankar
> Attachments: HBASE-15945-HBASE-14850.v2.patch,
> HBASE-15945-HBASE-14850.v3.patch, HBASE-15945.HBASE-14850.v1.patch
>
>
> This patch contains an implementation of Key Value, Bytes and Cell modeled on
> the lines of Java implementation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)