-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hello I am trying to loop through a hbase table to get the a specific number of rows and displaying them on the console. I keep ending up with a event emitter error while only the first row of the hbase table is printed out to the console.
Sample code:
var HBase = require('node-thrift-hbase');
var config = {
host: 'localhost',
port: 9090
};
var hbaseClient = HBase.client(config);
// getRow( table, rowKey, columns, callback)
var rowKey = 0;
for (var i = 1; i <= 50000; i++) {
rowKey = i;
hbaseClient.getRow('AllResults',rowKey.toString(),['component:component_category','module:module_category'],2,function(err,data){
//get documents
if(err){
console.log('error:',err);
return;
}
else{
console.log(data);
}
});
};
error code:
(node) warning: possible EventEmitter memory leak detected. 11 connect listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at addListener (events.js:179:15)
at Client.getClient (/home/bigdata/node_learning/startupdemo/node_modules/node-thrift-hbase/lib/client.js:36:21)
at Client.getRow (/home/bigdata/node_learning/startupdemo/node_modules/node-thrift-hbase/lib/client.js:328:10)
at Object. (/home/bigdata/node_learning/startupdemo/connect-to-hbase.js:72:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at addListener (events.js:179:15)
at Client.getClient (/home/bigdata/node_learning/startupdemo/node_modules/node-thrift-hbase/lib/client.js:41:21)
at Client.getRow (/home/bigdata/node_learning/startupdemo/node_modules/node-thrift-hbase/lib/client.js:328:10)
at Object. (/home/bigdata/node_learning/startupdemo/connect-to-hbase.js:72:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
Metadata
Metadata
Assignees
Labels
No labels