[
https://issues.apache.org/jira/browse/HBASE-19112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16256568#comment-16256568
]
Chia-Ping Tsai commented on HBASE-19112:
----------------------------------------
The {{Cell}}, {{RawCell}}, and {{ExtendedCell}} are shown below.
{code}
@InterfaceAudience.Public
public interface Cell {
getRowXXX();
getFamilyXXX();
getQualifierXXX();
getTimestamp();
getValueXXX();
}
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
public interface RawCell extends Cell {
getType();
getTagsXXX();
}
@InterfaceAudience.Private
public interface ExtendedCell extends RawCell, SettableSequenceId,
SettableTimestamp, HeapSize,
Cloneable {
getSequenceId();
setXXX();
write();
...
}
{code}
bq. What we propose instead of getType? What would user use instead?
The type of cells for normal scan (i.e non-raw scan) is always PUT type. Also,
the raw scan user can call CellUtil.isXXX() to check the type. Hence, the
{{getType}} can be moved from {{Cell}} to {{RawCell}}. We should not expose the
really byte data of type to user.
bq. Why not let out timestamp? Because it could be HLC timestamp?
It is ok to preserve the {{getTimestamp}} in {{Cell}} if the we don't change
the format in recent release.
bq. There is no getTag in Cell. There is getTagsArray and getTagsOffset. We
talking about deprecating these?
Yep.
bq. We want to hide sequencid? It is used-client side scanning. We'd just keep
it hidden?
Just hidden.
bq. I like saying that CPs can't modify a Cell that HBase has made.
As i see it, the {{ExtendedCell}} is not acceptable to be exposed to cp user
because it's not a read-only interface. My philosophy is that the {{Cell}} and
{{RawCell}} are the "view" (i.e read-only) to the normal and advanced user, and
we should use {{ExtendedCell}} rather than {{Cell}} or {{RawCell}} internally.
Also, the Put#add(cell) should change to accept the {{RawCell}}.
> Suspect methods on Cell to be deprecated
> ----------------------------------------
>
> Key: HBASE-19112
> URL: https://issues.apache.org/jira/browse/HBASE-19112
> Project: HBase
> Issue Type: Bug
> Components: Client
> Reporter: Josh Elser
> Priority: Blocker
> Fix For: 2.0.0-beta-1
>
>
> [~chia7712] suggested on the [mailing
> list|https://lists.apache.org/thread.html/e6de9af26d9b888a358ba48bf74655ccd893573087c032c0fcf01585@%3Cdev.hbase.apache.org%3E]
> that we have some methods on Cell which should be deprecated for removal:
> * {{#getType()}}
> * {{#getTimestamp()}}
> * {{#getTag()}}
> * {{#getSequenceId()}}
> Let's make a pass over these (and maybe the rest) to make sure that there
> aren't others which are either implementation details or methods returning
> now-private-marked classes.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)