adaltas / node-hbase

Asynchronous HBase client for NodeJs using REST

Home Page:https://hbase.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion error when trying to connec to hbase

seleregb opened this issue · comments

I have hadoop and hbase 1.1.2 set up on my vmware ubuntu system. I am trying to connect to hbase to insert a table with rows but keep ending up with an assertion error. I am using the sample code from the npm package website:


var assert = require('assert');
var hbase = require('hbase');
 
hbase({ host: '127.0.0.1', port: 8080 })
.table('my_table' )
.create('my_column_family', function(err, success){
  this
  .row('my_row')
  .put('my_column_family:my_column', 'my value', function(err, success){
    this.get('my_column_family', function(err, cells){
      this.exists(function(err, exists){
        assert.ok(exists);
      });
    });
  });
});

what is your error?

Sorry for the late reply. I get this error:


assert.js:86
  throw new assert.AssertionError({
        ^
AssertionError: null == true
    at null. (/home/tentacleproj/Documents/Node.js/visualize_data_with_d3.js/startupdemo/app.js:12:16)
    at /home/tentacleproj/Documents/Node.js/visualize_data_with_d3.js/startupdemo/node_modules/hbase/lib/row.js:186:22
    at ClientRequest. (/home/tentacleproj/Documents/Node.js/visualize_data_with_d3.js/startupdemo/node_modules/hbase/lib/connection.js:96:16)
    at ClientRequest.emit (events.js:107:17)
    at Socket.socketErrorListener (_http_client.js:271:9)
    at Socket.emit (events.js:107:17)
    at net.js:459:14
    at process._tickCallback (node.js:355:11)

this error is thrown in your code, i need one thrown inside the driver.

And what is the error with the code?? You have clearly indicated in the description for this package, that this is the syntax to create a hbase table with a column family, and I have followed that but keep coming up with the same error. I also started the hbase thrift server and changed the port but that doesn't also work.

Whatever u got on line 12 is not my conserne. U shall start and connect to the rest server

commented

You can close this @wdavidw