Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple databases or namespace in Hbase

Tags:

hbase

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

like image 825
Fabien Avatar asked Oct 24 '12 17:10

Fabien


People also ask

What is a HBase namespace?

hbase. A namespace that is used to contain HBase internal system tables. default. A namespace that contains all other tables when you do not assign a specific user-defined namespace. Parent topic: Enable multitenancy with namespaces.

How to list namespaces in HBase?

The list_namespace command is used to list or display all available namespaces in the HBase.

What are namespaces in database?

A namespace defines a group of tables, within which all of the table names must be uniquely identified. This chapter describes namespaces and how to create and manage the namespaces in Oracle NoSQL Database.

How to create a namespace in HBase?

The HBase shell has a set of straightforward commands for creating and dropping namespaces. You can assign a table to a namespace when you create the table. Creates a namespace with the name my_ns . Creates my_table with a column family identified as fam1 in the my_ns namespace.


2 Answers

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'}
like image 183
psmith Avatar answered Sep 28 '22 01:09

psmith


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.

like image 25
mibrahim Avatar answered Sep 28 '22 03:09

mibrahim