hbase-rpc-client icon indicating copy to clipboard operation
hbase-rpc-client copied to clipboard

I get a timeout for some rows when i push the data into my hbase table.

Open adi2596 opened this issue 6 years ago • 3 comments

When i push data into my hbase table i get timeout for some of the rows. I tried increasing the timeout time still all the rows doesn't get pushed. Let's say if i want to push 96 rows , only 74 get pushed. Don't know how to troubleshoot this issue, need help in fixing it.

adi2596 avatar Feb 09 '19 20:02 adi2596

Show some code.

wision avatar Feb 10 '19 07:02 wision

module.exports = { hbaseconn: function (json, column_family) {

var hbase = require('hbase-rpc-client'); var base64 = require('base-64'); var utf8 = require('utf8');

var client = hbase({ zookeeperHosts: [''], zookeeperRoot: '/', rootRegionZKPath: '/***************', rpcTimeout: 30000, pingTimeout: 30000, callTimeout: 50000 });

client.on('error', function(err) { console.log(err) })

for (j=0; j<json.length; j++)
for (i=0; i<json[j].a.length; i++)
{
console.log(json[j].a[i].b)
console.log(json[j].a[i].c)

if(json[j].a[i].c){ put = new hbase.Put(json[j].d.toString()); var a='a'+i var b='b'+i put.add(column_family, a, json[j].a[i].b.toString()); put.add(column_family, b, json[j].a[i].c.toString());

client.put('xyz', put, function(err, res) { return console.log(arguments); }); }

}

} }

adi2596 avatar Feb 10 '19 19:02 adi2596

Now run it with DEBUG=* and post results.

wision avatar Feb 10 '19 19:02 wision