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

Duo Zhang commented on HBASE-18554:
-----------------------------------

We still have this problem in the latest code.

I suggest that we mark add method as deprecated and throw UncheckedIOException 
when adding incorrect row, and in 4.0.0, we remove the deprecation and add 
IOException in the method signature. Although this maybe a bit ugly for the end 
users since they still need to use this method but it can be done in a much 
shorter time cycle...

Thanks.

> Append#add doesn't check the row of passed cell
> -----------------------------------------------
>
>                 Key: HBASE-18554
>                 URL: https://issues.apache.org/jira/browse/HBASE-18554
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Reid Chan
>            Priority: Major
>              Labels: beginner
>             Fix For: 3.0.0-beta-2
>
>         Attachments: HBASE-18554.master.001.patch, 
> HBASE-18554.master.002.patch
>
>
> {code}
>   @SuppressWarnings("unchecked")
>   public Append add(final Cell cell) {
>     // Presume it is KeyValue for now.
>     byte [] family = CellUtil.cloneFamily(cell);
>     List<Cell> list = this.familyMap.get(family);
>     if (list == null) {
>       list  = new ArrayList<>(1);
>     }
>     // find where the new entry should be placed in the List
>     list.add(cell);
>     this.familyMap.put(family, list);
>     return this;
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to