You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Toby White <to...@scrtplns.com> on 2009/02/04 17:09:30 UTC

column family names

 From the HBase documentation (http://wiki.apache.org/hadoop/Hbase/HbaseArchitecture 
)

'A column name has the form "<family>:<label>" where <family> and  
<label> can be arbitrary byte arrays'

yet in HColumnDescriptor.java:

     for (int i = 0; i < (b.length - 1); i++) {
       if (Character.isLetterOrDigit(b[i]) || b[i] == '_' || b[i] ==  
'.') {
         continue;
       }
       throw new IllegalArgumentException("Illegal character <" + b[i] +
         ">. Family names  can only contain  'word characters' and  
must end" +
         "with a colon: " + Bytes.toString(b));
     }

Presumably the code is the authoritative source here; but why is there  
such a restriction on family names?

Toby

Re: column family names

Posted by Toby White <to...@scrtplns.com>.
Thanks, see HBASE-1184.

Toby

On 4 Feb 2009, at 17:59, stack wrote:

> File an issue and a patch and we'll commit it.  Seems like a  
> reasonable
> expectation for a column family name.
> Thanks Toby,
> St.Ack
>
> On Wed, Feb 4, 2009 at 9:53 AM, Toby White <to...@scrtplns.com> wrote:
>
>> I quite wanted to use a hyphen in the name (so that it could be a  
>> direct
>> mapping to an HTTP header field name), but hbase wouldn't let me.
>> Not massively onerous - it's easy to translate; it's just a slight
>> awkwardness.
>>
>> Toby
>>
>> On 4 Feb 2009, at 17:49, stack wrote:
>>
>> Yeah, the architecture document is starting to showing its age.   
>> Needs a
>>> nip
>>> and tuck.
>>>
>>> No big reasons for family name being 'text'/'printable'.  Is it an  
>>> onerous
>>> restriction?
>>>
>>> St.Ack
>>>
>>>
>>>
>>> On Wed, Feb 4, 2009 at 8:09 AM, Toby White <to...@scrtplns.com>  
>>> wrote:
>>>
>>> From the HBase documentation (
>>>> http://wiki.apache.org/hadoop/Hbase/HbaseArchitecture)
>>>>
>>>> 'A column name has the form "<family>:<label>" where <family> and  
>>>> <label>
>>>> can be arbitrary byte arrays'
>>>>
>>>> yet in HColumnDescriptor.java:
>>>>
>>>> for (int i = 0; i < (b.length - 1); i++) {
>>>>   if (Character.isLetterOrDigit(b[i]) || b[i] == '_' || b[i] ==  
>>>> '.') {
>>>>     continue;
>>>>   }
>>>>   throw new IllegalArgumentException("Illegal character <" + b[i] +
>>>>     ">. Family names  can only contain  'word characters' and  
>>>> must end"
>>>> +
>>>>     "with a colon: " + Bytes.toString(b));
>>>> }
>>>>
>>>> Presumably the code is the authoritative source here; but why is  
>>>> there
>>>> such
>>>> a restriction on family names?
>>>>
>>>> Toby
>>>>
>>>>
>>


Re: column family names

Posted by stack <st...@duboce.net>.
File an issue and a patch and we'll commit it.  Seems like a reasonable
expectation for a column family name.
Thanks Toby,
St.Ack

On Wed, Feb 4, 2009 at 9:53 AM, Toby White <to...@scrtplns.com> wrote:

> I quite wanted to use a hyphen in the name (so that it could be a direct
> mapping to an HTTP header field name), but hbase wouldn't let me.
> Not massively onerous - it's easy to translate; it's just a slight
> awkwardness.
>
> Toby
>
> On 4 Feb 2009, at 17:49, stack wrote:
>
>  Yeah, the architecture document is starting to showing its age.  Needs a
>> nip
>> and tuck.
>>
>> No big reasons for family name being 'text'/'printable'.  Is it an onerous
>> restriction?
>>
>> St.Ack
>>
>>
>>
>> On Wed, Feb 4, 2009 at 8:09 AM, Toby White <to...@scrtplns.com> wrote:
>>
>>  From the HBase documentation (
>>> http://wiki.apache.org/hadoop/Hbase/HbaseArchitecture)
>>>
>>> 'A column name has the form "<family>:<label>" where <family> and <label>
>>> can be arbitrary byte arrays'
>>>
>>> yet in HColumnDescriptor.java:
>>>
>>>  for (int i = 0; i < (b.length - 1); i++) {
>>>    if (Character.isLetterOrDigit(b[i]) || b[i] == '_' || b[i] == '.') {
>>>      continue;
>>>    }
>>>    throw new IllegalArgumentException("Illegal character <" + b[i] +
>>>      ">. Family names  can only contain  'word characters' and must end"
>>> +
>>>      "with a colon: " + Bytes.toString(b));
>>>  }
>>>
>>> Presumably the code is the authoritative source here; but why is there
>>> such
>>> a restriction on family names?
>>>
>>> Toby
>>>
>>>
>

Re: column family names

Posted by Toby White <to...@scrtplns.com>.
I quite wanted to use a hyphen in the name (so that it could be a  
direct mapping to an HTTP header field name), but hbase wouldn't let me.
Not massively onerous - it's easy to translate; it's just a slight  
awkwardness.

Toby

On 4 Feb 2009, at 17:49, stack wrote:

> Yeah, the architecture document is starting to showing its age.   
> Needs a nip
> and tuck.
>
> No big reasons for family name being 'text'/'printable'.  Is it an  
> onerous
> restriction?
>
> St.Ack
>
>
>
> On Wed, Feb 4, 2009 at 8:09 AM, Toby White <to...@scrtplns.com> wrote:
>
>> From the HBase documentation (
>> http://wiki.apache.org/hadoop/Hbase/HbaseArchitecture)
>>
>> 'A column name has the form "<family>:<label>" where <family> and  
>> <label>
>> can be arbitrary byte arrays'
>>
>> yet in HColumnDescriptor.java:
>>
>>   for (int i = 0; i < (b.length - 1); i++) {
>>     if (Character.isLetterOrDigit(b[i]) || b[i] == '_' || b[i] ==  
>> '.') {
>>       continue;
>>     }
>>     throw new IllegalArgumentException("Illegal character <" + b[i] +
>>       ">. Family names  can only contain  'word characters' and  
>> must end"
>> +
>>       "with a colon: " + Bytes.toString(b));
>>   }
>>
>> Presumably the code is the authoritative source here; but why is  
>> there such
>> a restriction on family names?
>>
>> Toby
>>


Re: column family names

Posted by stack <st...@duboce.net>.
Yeah, the architecture document is starting to showing its age.  Needs a nip
and tuck.

No big reasons for family name being 'text'/'printable'.  Is it an onerous
restriction?

St.Ack



On Wed, Feb 4, 2009 at 8:09 AM, Toby White <to...@scrtplns.com> wrote:

> From the HBase documentation (
> http://wiki.apache.org/hadoop/Hbase/HbaseArchitecture)
>
> 'A column name has the form "<family>:<label>" where <family> and <label>
> can be arbitrary byte arrays'
>
> yet in HColumnDescriptor.java:
>
>    for (int i = 0; i < (b.length - 1); i++) {
>      if (Character.isLetterOrDigit(b[i]) || b[i] == '_' || b[i] == '.') {
>        continue;
>      }
>      throw new IllegalArgumentException("Illegal character <" + b[i] +
>        ">. Family names  can only contain  'word characters' and must end"
> +
>        "with a colon: " + Bytes.toString(b));
>    }
>
> Presumably the code is the authoritative source here; but why is there such
> a restriction on family names?
>
> Toby
>