Skip to content
Asynchronous HBase client for NodeJs using REST
CoffeeScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
docs
lib
test
.gitignore
package.json
readme.md

readme.md

 ___   _           _          _     _ ______                   
|   \ | |         | |        | |   | |____  \                  
| |\ \| | ___   __| |_____   | |___| |____)  )_____  ___ _____ 
| | \   |/ _ \ / _  | ___ |  |  ___  |  __  ((____ |/___) ___ |
| |  \  | |_| ( |_| | ____|  | |   | | |__)  ) ___ |___ | ____|
|_|   |_|\___/ \____|_____)  |_|   |_|______/\_____(___/|_____)

Node HBase is a Node.JS client for HBase server. It use the Rest API (Stargate) to communicate with HBase. Currently, the data exchange format is JSON (but protocol buffer could follow).

Features include

  • Intuitive API following HBase naming conventions
  • Documentation and tests
  • Implements all the REST API
  • Transparent encoding/decoding of values
  • Scanner and filter support
  • Integration with npm

Quick example

This code create a new HBase instance, create a table and a column family, insert a few records and traverse them.

var assert = require('assert')
  , hbase = require('hbase');

hbase({ host: '127.0.0.1', port: 8080 })
.getTable('node_hbase' )
.create('node_hbase_column', function(error, success){
    this
    .row('my_row')
    .put('my_column_family:my_column', function(error, success){
        this.get('my_column_family', function(error, cells){
            this.exists(function(error, exists){
                assert.ok(exists);
            }
        }
    });
});

Status

At this point, HBase REST API is fully covered at the exception of scanners. Javascript API might also change in the near future.

Installing

Via git (or downloaded tarball):

$ git clone http://github.com/wdavidw/node-hbase.git

Then, simply copy or link the lib/csv.js file into your $HOME/.node_libraries folder or inside a declared path folder.

Via npm:

$ npm install hbase

Running the tests

Tests are executed with expresso. To install it, simple use npm install expresso.

To run the tests expresso -I lib test/test*

To develop with the tests watching at your changes expresso -w -I lib test/test*

To instrument the tests expresso -I lib --cov test/test*

Related projects

Something went wrong with that request. Please try again.