Tags

, , , , , , , , ,

HBase is free, open-source software from the Apache Foundation. It is a cross platform technology, so we can run it on Linux, Windows or OS/X machines and also can be hosted on Amazon Web Services and Microsoft Azure.

HBase is a NoSQL database which can run on a single machine, or cluster of servers. HBase provides data access in real-time. HBase tables can store billions of rows and millions of columns, unlike other big data technologies, which are batch-oriented. In HBase we have few key concepts like row key structure, column families, and regions.

To connection to HBase terminal:

> hbase shell

then it will change the prompt to hbase>;

General Commands:

1. To check the version of Hbase

hbase> version

2. To check the current hbase user

hbase> whoami

3. To show cluster status. Can be ‘summary’, ‘simple’, ‘detailed’, or ‘replication’. The default is ‘summary’.

hbase> status
hbase> status 'simple'
hbase> status 'summary'
hbase> status 'detailed'
hbase> status 'replication'
hbase> status 'replication', 'source'
hbase> status 'replication', 'sink'

Namespace Commands:

1. To create namespace in HBase

hbase> create_namespace 'namespace1'

2. To describe namespace in HBase

hbase> describe_namespace 'namespace1'

3. To list all namespaces in HBase

hbase> list_namespace

Optional regular expression parameter could be used to filter the output.

hbase> list_namespace 'name.*'

4. To drop the name space in HBase. To drop the name space, make sure that namespace is empty.

hbase> drop_namespace 'namespace1'

5. To list all tables that are members of the namespace in HBase

hbase> list_namespace_tables 'namespace1'

References:

https://hbase.apache.org/
https://en.wikipedia.org/wiki/Apache_HBase

Advertisements