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

Jeffrey Zhong commented on HBASE-10183:
---------------------------------------

Andrew raised a good point that Java byte value range is [-128, 127]. Since we 
use tag type in equal comparison, if we reserve 0-64 then a user tag could use 
any value from range [-128,-1] and [65,127]. Reserving 0-31 as system range 
should be also sufficient.  

The problem here is how we can enforce the system range because our internal 
code and client code both use same interface. 

Option 1: The easiest option is to document what's the value range can be used 
by clients
Option 2: Creating factory methods such as createUserTag and createSystemTag so 
that it's easy for users to know 

Any good suggestion? Thanks.


> Need enforce a reserved range of system tag types
> -------------------------------------------------
>
>                 Key: HBASE-10183
>                 URL: https://issues.apache.org/jira/browse/HBASE-10183
>             Project: HBase
>          Issue Type: Task
>          Components: HFile
>    Affects Versions: 0.98.0
>            Reporter: Jeffrey Zhong
>            Priority: Critical
>             Fix For: 0.98.0
>
>
> If we don't reserve a system tag types now, let's say 0-64(total tag type 
> range is 0-255). We'll have a hard time when introducing a new system tag 
> type in the future because the new tag type may collide with an existing user 
> tag type as tag is open to users as well.
> [~ram_krish], [~anoop.hbase] How do you guys think?
> Thanks!



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to