Closed myou closed 8 months ago
needs more information how to reproduce, as openSession is checked in test pipeline https://github.com/lenchv/hive-driver/blob/master/tests/e2e/operations/data_types.test.js#L33
Same here. I'm using https://github.com/big-data-europe/docker-hive at localhost 10000; The example hang at client.openSession
.
not sure if it is the same use.
I have setup a hive server with username & password node v18.7.0
const promiseSession = client.openSession({
client_protocol: TCLIService_types.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10
});
console.debug(await promiseSession)
When we await client.openSession promise, the entire node process exit with 0. No error found and no success hint.
@davidkhala it is not related to this issue, but related to how nodejs works, try to wrap your code with IIFE
(async () => {
const promiseSession = client.openSession({
client_protocol: TCLIService_types.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10
});
console.debug(await promiseSession)
})()
@davidkhala it is not related to this issue, but related to how nodejs works, try to wrap your code with IIFE
(async () => { const promiseSession = client.openSession({ client_protocol: TCLIService_types.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10 }); console.debug(await promiseSession) })()
@lenchv thanks for your prompt reply, actually it is just part of full text, and I am quite sure not a syntax error, but the process exit happend within client.openSession
.
Here are the context https://github.com/davidkhala/node-databases/blob/main/hive/index.js
@davidkhala sorry, didn't notice your reply back then, hope you found a solution for the problem. For the context, perhaps the issue happens inside the TCP connection itself, so you might try to subscribe on client events to figure out the core problem:
this.connection = new hive.HiveClient(
TCLIService,
TCLIService_types
);
this.connection.on('error', console.debug);
this.connection.on('close', () => console.log('connection closed'));
but this is strange the entire process crashes
I traced the code a little bit, in driver.openSession, action.execute(request) seems to hang, and the promise never resolves
confirmed local thrift is running via beeline