hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ChiaPing Tsai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-16346) The cell cannot be incremented with null qualifier
Date Mon, 22 Aug 2016 18:43:20 GMT

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

ChiaPing Tsai commented on HBASE-16346:
---------------------------------------

I don't hava the use case.

But the null qualifier can be used by PUT, DELETE, and APPEND. Why do we exclude the INCREMENT
?

thanks



> The cell cannot be incremented with null qualifier
> --------------------------------------------------
>
>                 Key: HBASE-16346
>                 URL: https://issues.apache.org/jira/browse/HBASE-16346
>             Project: HBase
>          Issue Type: Bug
>            Reporter: ChiaPing Tsai
>            Assignee: ChiaPing Tsai
>            Priority: Trivial
>         Attachments: HBASE-16346-v0.txt, HBASE-16346.v0.patch
>
>
> {code:title=Increment.java|borderStyle=solid}
>  // Is it necessary to prevent the null qualifier
>   public Increment addColumn(byte [] family, byte [] qualifier, long amount) {
>     if (family == null) {
>       throw new IllegalArgumentException("family cannot be null");
>     }
>     if (qualifier == null) {
>       throw new IllegalArgumentException("qualifier cannot be null");
>     }
>     List<Cell> list = getCellList(family);
>     KeyValue kv = createPutKeyValue(family, qualifier, ts, Bytes.toBytes(amount));
>     list.add(kv);
>     familyMap.put(CellUtil.cloneFamily(kv), list);
>     return this;
>   }
> {code}
> I use the add(Cell) method to add the cell with null qualifier and it works fine.
> It seems to me that the check should be removed
> any command? thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message