alibaba / alibaba/node-hbase-client
Closing connections
- Dominant language
- JavaScript
- Stars
- 279
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
I can't seem to have the HBase client close all connections and all the Node.js process to exit normally. I've tried iterating the `client.servers` and calling `.close()` against each of them but I just receive a message about the connection being closed with no error and the Node.js process stays open (no other code is contained).
Exampe:
``` javascript
var HBase = require('hbase-client');
var client = HBase.create({zookeeperHosts: ['127.0.0.1:2181']});
client.getRow('table', 'rowName', ['field'], function(err, row) {
console.log(row);
// How do I close the connection?
for (var name in client.servers) {
console.log('Closing connection to ' + name + '.');
client.servers[name].close();
}
});
```
This script, doesn't ever finish executing for me.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the `client.getRow` callback and the `client.servers` connections used in the example, then inspect what `.close()` does for each server. Reproduce the script with the provided HBase and ZooKeeper settings. Done means all client connections are released and the Node.js process exits normally without requiring unrelated code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100