[
https://issues.apache.org/jira/browse/HBASE-11805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14128031#comment-14128031
]
Anoop Sam John edited comment on HBASE-11805 at 9/10/14 4:32 AM:
-----------------------------------------------------------------
As part of this change I changed the internal data structure to
ArrayList<Cell> cells
from
ArrayList<KeyValue> kvs
We have to return the internal data structure same ref so that remove from the
list will result in actual removal from WALEdit.
That is why from old getKeyValues() API we had to return a newly created
ArrayList and putting the cells (after KVUtil.ensureKeyValue())
Now to fix, we will have to keep ArrayList as KeyValue generic and when adding
to WALEdit we can add only KeyValue types. Then only we can return the same
list ref. Am I making it clear LarsH?
was (Author: anoop.hbase):
As part of this change I changed the internal data structure to
ArrayList<Cell> cells
from
ArrayList<KeyValue> kvs
We have to return the internal data structure same ref so that remove from the
list will result in actual removal from WALEdit.
That is why from old getKeyValues() API we had to return a newly created
ArrayList and putting the cells (after KVUtil.ensureKeyValue())
> KeyValue to Cell Convert in WALEdit APIs
> ----------------------------------------
>
> Key: HBASE-11805
> URL: https://issues.apache.org/jira/browse/HBASE-11805
> Project: HBase
> Issue Type: Improvement
> Components: wal
> Reporter: Anoop Sam John
> Assignee: Anoop Sam John
> Fix For: 0.99.0, 2.0.0, 0.98.7
>
> Attachments: HBASE-11805.patch, HBASE-11805_0.98.patch,
> HBASE-11805_0.98_V2.patch, HBASE-11805_0.99.patch, HBASE-11805_V2.patch,
> HBASE-11805_V3.patch
>
>
> In almost all other main interface class/APIs we have changed KeyValue to
> Cell. But missing in WALEdit. This is public marked for Replication (Well it
> should be for CP also)
> These 2 APIs deal with KVs
> add(KeyValue kv)
> ArrayList<KeyValue> getKeyValues()
> Suggest deprecate them and add for 0.98
> add(Cell kv)
> List<Cell> getCells()
> And just replace from 1.0
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)