Thanks for the heads up. This sounds like a bug.

I've filed HBASE-12329 to track the problem in both the API and the shell.
Please follow that ticket if you'd like updates.

https://issues.apache.org/jira/browse/HBASE-12329

On Thu, Oct 23, 2014 at 8:45 AM, Ted Yu <yuzhih...@gmail.com> wrote:

> Interesting.
>
> Using shell, I did:
>
> hbase(main):001:0> create 't2', {NAME => 'f1'}, {NAME => 'f1'}
>
> The table got created - with 1 column family:
>
> hbase(main):002:0> describe 't2'
> DESCRIPTION
>                        ENABLED
>  't2', {NAME => 'f1', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW',
> REPLICATION_SCOPE => '0 true
>  ', VERSIONS => '1', COMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL =>
> '2147483647', KEEP_DELETED
>  _CELLS => 'false', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE
> => 'true'}
> 1 row(s) in 0.1000 seconds
>
> On Thu, Oct 23, 2014 at 1:27 AM, Sznajder ForMailingList <
> bs4mailingl...@gmail.com> wrote:
>
> > Hi
> >
> > Is it allowed to provide two similar family names during the creation of
> an
> > HBase table?
> >
> > I was expecting that it is forbidden, **but** this call does not throw
> any
> > exception
> >
> >         String[] families = {"cf", "cf"};
> >         HTableDescriptor desc = new HTableDescriptor(name);
> >         for (String cf : families) {
> >           HColumnDescriptor coldef = new HColumnDescriptor(cf);
> >           desc.addFamily(coldef);
> >         }
> >         try {
> >             admin.createTable(desc);
> >         } catch (TableExistsException e) {
> >             throw new IOException("table \'" + name + "\' already
> exists");
> >         }
> >
>



-- 
Sean

Reply via email to