- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Is there a way to get results of hive command instead of getting job id in WebHCat?
- Labels:
-
Apache HCatalog
-
Apache Hive
-
Apache Pig
Created ‎11-04-2015 05:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I execute the following
curl -s -d execute="select+*+from+sample_08;" \
-d statusdir="outputofthejob" \
'http://localhost:50111/templeton/v1/hive?user.name=root'
I get a job id of the job in JSON format, is there a way to get actual result of the query rather than job id?
Created ‎11-04-2015 06:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, WebHCat does not provide any options to get the query output as part of the response object. Either you use the WebHDFS api to inspect the contents of the output directory or if your concern is the transport mode, you could JDBC connection to the HiveServer2 configured in HTTP mode.
Created ‎11-04-2015 05:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Artem Ervits So you mean, you want output of query i.e. "Select * from emp where dept_id=10"?
Created ‎11-04-2015 05:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Pardeep I believe, Yes
Created ‎11-04-2015 05:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, I want to see the results instead of looking in outputofthejob/part-m-0000. I didn't see any options in WebHCat wiki.
Created ‎11-04-2015 05:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The actual result is going under "outputofthejob" on HDFS. I don't see any options to get exact data using that command or any other option. Limit information in the doc.
Created ‎11-04-2015 06:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Artem Ervits Time to open an enhancement request 😉
Created ‎11-04-2015 06:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎11-04-2015 06:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, WebHCat does not provide any options to get the query output as part of the response object. Either you use the WebHDFS api to inspect the contents of the output directory or if your concern is the transport mode, you could JDBC connection to the HiveServer2 configured in HTTP mode.
Created ‎11-09-2015 05:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Performing a hdfs cat on stdout file inside the outputofthejob directory will give the output from hive.
hdfs dfs -cat <location-of-outputofthejob>/stdout
