Getting started
About HBase
HBase is part of the Hadoop ecosystem from the Apache Software Foundation. It is a column oriented database (think NoSQL) that really scale and is modelled after Google papers and its BigTable database.
Installing HBase
Downloading the Cloudera CDH or Hortonworks HDP sandboxes are the easiest ways to get started. If you run Ubuntu, Debian or RedHat, those two distributions provide packages integrated with apt-get and yum. It is also possible to download the binaries from the official website.
Starting HBase
Assuming ${HBASE_HOME}/bin
is in your classpath, starting HBase with REST connector is as follow:
start-hbase.sh
hbase-daemon.sh start rest
And stopping:
hbase-daemon.sh stop rest
stop-hbase.sh
Or
ps ax | grep hbase | awk '{print $1}' | xargs kill -9
Installing node-hbase
Use NPM or YARN to install the HBase client.
npm install hbase
Creating a new instance
const hbase = require('hbase')
const client = hbase({
host: '127.0.0.1',
port: 8080
})
Or
const hbase = require('hbase')
const client = new hbase.Client({
host: '127.0.0.1',
port: 8080
})