[
https://issues.apache.org/jira/browse/HBASE-19607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16323499#comment-16323499
]
Yung-An He commented on HBASE-19607:
------------------------------------
Sorry for replying too late,[~chia7712]
I am working on this issue and got some question.
What kind of exception should be thrown if memstore is incapable of doing the
deep clone? HBaseException?
Or just return the result of deepclone() as below?
{code:java}
private static Cell deepCopyIfNeeded(Cell cell) {
return ((ExtendedCell) cell).deepClone();
}
{code}
> throw the exception if memstore is incompetent to do the deep clone for cell
> ----------------------------------------------------------------------------
>
> Key: HBASE-19607
> URL: https://issues.apache.org/jira/browse/HBASE-19607
> Project: HBase
> Issue Type: Bug
> Reporter: Chia-Ping Tsai
> Assignee: Yung-An He
> Priority: Trivial
>
> We must to clone the cell since the cell is backed by the reusable byte
> array. Also, we assume all cells passed to AbstractMemStore is of
> ExtendedCell. Not only is the type check unnecessary, but it also confuses
> the readers.
> {code:title=AbstractMemStore.java}
> private static Cell deepCopyIfNeeded(Cell cell) {
> if (cell instanceof ExtendedCell) {
> return ((ExtendedCell) cell).deepClone();
> }
> return cell;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)