-
Notifications
You must be signed in to change notification settings - Fork 550
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
Kerberos (hive/presto) access documentation #174
Comments
Hi:
Thanks |
Looking at https://github.com/dropbox/PyHive/blob/master/pyhive/hive.py, here is how:
Be sure to have a kerberos configured in /etc/krb5.conf. With pyhive : from pyhive import hive
engine = hive.Connection(host="<hive-host>", port=<hive-port>, username="<kerberos-username>", database='<db-name>', auth='KERBEROS', kerberos_service_name="hive") With sqlalchemy : from sqlalchemy import *
engine = create_engine("hive://<kerberos-username>@<hive-host>:<hive-port>/<db-name>",connect_args={'auth': 'KERBEROS','kerberos_service_name': 'hive'}) |
if keytab must be kinited before connection,that means i have to run pyhive code on hadoop cluster,right? |
Nope, you can kinit from a remote computer (through ports 88 tcp+udp) and then do remote pyhive. We do just that. |
@Dubrzr : Possible to give an example or point to any such link where you've done this? |
|
Is there also a solution for Windows? The above example Hive connection seems not to work on my Windows client (kinit works fine for years on my pc). Hive server log sais: |
How can we implement this in a docker setup. |
@Dubrzr thanks for providing examples here. it would be nice if you could add this information to the readme. |
I did all of this, but it did not work. However, creating a cache file & setting the
|
@lsgrep Can you provide the full code snippet. It would be very helpful |
i am using all theses steps but getting this error : |
Hi
Appently ( #47 #91 ) kerberized access is available.
However there is no example on how to use it in the documention.
That would be more than helpfull
Thanks
The text was updated successfully, but these errors were encountered: