inolen / titan-node

Wrapper around gremlin-node to provide out of the box support for Titan graph database
23 stars 13 forks source link

Facing Issue while connecting to hbase-0.96.1. #7

Closed a2prn closed 7 years ago

a2prn commented 10 years ago

I am using hadoop-2.2.0 and hbase-0.96.1 on ubuntu-12.04. I have created the sample code to connect to hbase and create tables there.

var Titan = require('titan-node'); var g = new Titan.Gremlin({ loglevel: 'OFF' });

var BaseConfiguration = g.java.import('org.apache.commons.configuration.BaseConfiguration'); var _storageConfObj={'backend':'hbase','hostname':'ip address of hbase','port':'2181','tablename':'titan6'};

    conf = new BaseConfiguration();
    conf.setPropertySync("storage.backend",_storageConfObj.backend);
    conf.setPropertySync("storage.tablename",_storageConfObj.tablename);

var TitanFactory = g.java.import('com.thinkaurelius.titan.core.TitanFactory'); var titanGaraph = TitanFactory.openSync(conf);

g.SetGraph(titanGraph);

when I run the code using node,

node ./test.js

I face below error:

0 [main] ERROR org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper - ZooKeeper exists failed after 3 retries 2 [main] ERROR org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher - hconnection Received unexpected KeeperException, re-throwing exception org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid at org.apache.zookeeper.KeeperException.create(KeeperException.java:99) at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1041) at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:172) at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:450) at org.apache.hadoop.hbase.zookeeper.ClusterId.readClusterIdZNode(ClusterId.java:61) at org.apache.hadoop.hbase.zookeeper.ClusterId.getId(ClusterId.java:50) at org.apache.hadoop.hbase.zookeeper.ClusterId.hasId(ClusterId.java:44) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.ensureZookeeperTrackers(HConnectionManager.java:720) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:789) at org.apache.hadoop.hbase.client.HBaseAdmin.(HBaseAdmin.java:127) at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getAdminInterface(HBaseStoreManager.java:364) at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.ensureColumnFamilyExists(HBaseStoreManager.java:261) at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.openDatabase(HBaseStoreManager.java:215) at com.thinkaurelius.titan.diskstorage.Backend.getStore(Backend.java:222) at com.thinkaurelius.titan.diskstorage.Backend.initialize(Backend.java:234) at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:1109) at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.(StandardTitanGraph.java:75) at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601)