Multiple databases or namespace in Hbase

2019-03-18 08:36发布

问题:

Is there a way to setup Hbase so we can create multiples databases inside the same cluster ?

回答1:

Just to refresh topic: http://hbase.apache.org/book.html#namespace

5.3.1. Namespace management A namespace can be created, removed or altered. Namespace membership is determined during table creation by specifying a fully-qualified table name of the form:

: Example 5.1. Examples

#Create a namespace
create_namespace 'my_ns'

#create my_table in my_ns namespace
create 'my_ns:my_table', 'fam'

#drop namespace
drop_namespace 'my_ns'

#alter namespace
alter_namespace 'my_ns', {METHOD => 'set', 'PROPERTY_NAME' => 'PROPERTY_VALUE'}


回答2:

No there's none. However, you can use prefixes for table names to separate a set of tables from another set.

I didn't test ACLs before, but I think you can use them in recent versions of hbase > 0.92 to allow access to some tables and prevent access to others per user.



回答3:

Namespaces support is coming in the 0.96.0 release. More and more features will be built in as time passes.

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



标签: hbase