Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get data of the sql query. #16

Open
WangJiaoJo opened this issue Aug 31, 2017 · 5 comments
Open

Cannot get data of the sql query. #16

WangJiaoJo opened this issue Aug 31, 2017 · 5 comments

Comments

@WangJiaoJo
Copy link

Hi, ufukomer,

I use Node.js to run the code, here is my code,
`var impalaDB = require('node-impala');
const client = impalaDB.createClient();

client.connect({
host: '10.2.18.185',
port: 21050,
resultType: 'json-array'
})
.then(function (message) {
console.log(message); //this output 'Connection established'
})
.catch(function (err) {
console.log(err);
});

client.query('show databases')
.then(result => console.log(result))
.catch(err => console.error(err))
.done(() => client.close().catch(err => console.error(err))); //here output nothing
`

Could you please explain why the query doesn't output anything, result or err? Thank you so much!

@WangJiaoJo
Copy link
Author

Hi, ufukomer,

Could I ask one more question?
Whether the connection configuration should include impala username and password?
Thank you so much!

@ufukomer
Copy link
Owner

ufukomer commented Sep 1, 2017

@WangJiaoJo I think your port should be 21000 (#8). You don't need to include your username and password, no authentication is required (#14).

@WangJiaoJo
Copy link
Author

Hi, ufukomer,

I have changed the port to 21000. But the result is same as previous. Only output the "Connnection established" but the query statement still output nothing. Is that because the server that I use open the Kerberos authentication?

Thank you so much!

@ufukomer
Copy link
Owner

ufukomer commented Sep 1, 2017

@WangJiaoJo Yes, probably. It does not support Kerberos. So, I should add an error to promise response. Let's keep this issue open.

@WangJiaoJo
Copy link
Author

Hi, ufukomer,
Thanks so much!

Also, I have tried another way. Before I run the command "node impala.js", I type the command
"kinit -kt /root/eedep.keytab eedep@DFMCIT.COM" in the terminal on the server which could authenticate Kerberos.

While this not works, do you think this way has some reasonability?

Let's keep focus on this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants