- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
curl with hive on secured cluster
- Labels:
-
Apache Hive
Created ‎03-03-2016 06:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I run curl with hive command in secured cluster?
curl -s -d execute="select+*+from+pokes;" \ -d statusdir="pokes.output" \ 'http://localhost:50111/templeton/v1/hive?user.name=ekoifman'
in user.name - I tried to pass Hive Principal and keytab didnt work and tried with user principal didnt work. can you please provide some example?
Created ‎03-03-2016 08:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Usually when you want to use curl in combination with Kerberos (secured cluster), you have to use the following command:
curl --negotiate -u : -X GET 'http://localhost:50111/templeton/v1/hive?user.name=ekoifman'
Make sure you have a valid kerberos ticket (run: klist)
Created ‎03-03-2016 08:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Usually when you want to use curl in combination with Kerberos (secured cluster), you have to use the following command:
curl --negotiate -u : -X GET 'http://localhost:50111/templeton/v1/hive?user.name=ekoifman'
Make sure you have a valid kerberos ticket (run: klist)
Created ‎03-04-2016 01:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I generally add "-b ~/cookie.txt -c ~/cookie.txt" also the curl command. And "-i" will give addition information also.
curl --negotiate -u : -b ~/cookie.txt -c ~/cookie.txt ...
Created ‎05-05-2017 02:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"localhost" doesn't work with kerberos authentication, you need the actual hostname in URL. @Jonas Straub can you please edit ?
Created ‎03-06-2016 10:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @Jonas Straub @bdurai for your comments.
In user.name what value should I pass? is it a kerberos principal of the user who is the executing the command
This is what I got after I ran the above command.
~> curl --negotiate -u : -X GET 'http://WebdhcatserverDNS:50111/templeton/v1/hive?user.name=ekoifman' {"error":null}:~> curl --negotiate -u : -X GET 'http://WebhcatserverDNS:50111/templeton/v1/hive?user.name=ekoifman
Created ‎02-25-2017 12:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
User.name would be ignored during kerberos mode. The credentials via kinit is what gets used.
