hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chia-Ping Tsai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19112) Suspect methods on Cell to be deprecated
Date Wed, 29 Nov 2017 13:12:00 GMT

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

Chia-Ping Tsai commented on HBASE-19112:

bq. So I think we can safely assume the Cells in this PBUtil APIs are of type RawCell?
When doing the conversion in RPC layer, we can safely assume the Cells are of type RawCell
if the cell impl is of our code. But it isn't safe if user add their cell impl. I have a use
case that have a factory to rewrite the specified field of a Cell. The cell impl with rewritten
field is a static nested class which isn't of type RawCell/ExtendedCell. All the custom cells
will be pushed to server via {{Put#add(Cell)}} and {{Table.put(Put)}}. 

The {{Cell}} is a limited read-only interface for normal users. That is to say, normal users
have no permission to read the internal data, such as tags(in 2.0), sequence id, and type
byte,  from a cell. Unfortunately, it also obstruct us to do the cell conversion in RPC layer.
That is why we should deprecate the add(Cell) and introduce the add(RawCell). Also, all methods
related to {{RawCell}} should be denoted with IA.LP. More simply, we are welcome user to put
their code in our read/write path but the related APIs is more unstable than the normal APIs.

If exposing the {{RawCell}} to client/user side seems over-the-top, a workaround is that we
introduce the subclass of {{Delete}}, such as {{DeleteFamily}} and {{DeleteColumn}}, to help
us to set the type byte of cell in conversion.

> 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
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Blocker
>             Fix For: 2.0.0-beta-1
>         Attachments: HBASE-19112_branch-2.patch
> [~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

View raw message