create_namespace

Definition

Creates a new namespace — a logical grouping of tables that is similar to a database in relation database systems. Requires a namespace name and optionally a dictionary of namespace configuration properties.

Usage

create_namespace '<namespace_name>'[,
                 {'<property_name>' => '<property_value>'[,...]}]
Arguments
Parameter Description

namespace_name

A namespace name

property_name

A property name

property_value

A property value

Examples

Creating a new namespace without properties

hbase(main):020:0> create_namespace 'ns1'
Took 0.2599 seconds

Including a table into the created namespace

Namespace membership is defined while table creation by specifying a fully-qualified table name in the form: <namespace_name>:<table_name>.

NOTE
For all subsequent accesses to the table, it is required to specify the full table name: <namespace_name>:<table_name>.
hbase(main):021:0> create 'ns1:table1','f1'
Created table ns1:table1
Took 1.3259 seconds
=> Hbase::Table - ns1:table1

Creating a new namespace with properties

hbase(main):022:0> create_namespace 'ns2', {'prop1' => 'val1', 'prop2' => 'val2'}
Took 0.2446 seconds
Found a mistake? Seleсt text and press Ctrl+Enter to report it