hbase-rpc-client
hbase-rpc-client copied to clipboard
I get a timeout for some rows when i push the data into my hbase table.
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.
Show some code.
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); }); }
}
} }
Now run it with DEBUG=*
and post results.