Created 11-04-2015 05:33 PM
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
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
@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
@Pardeep I believe, Yes
Created 11-04-2015 05:51 PM
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
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
@Artem Ervits Time to open an enhancement request 😉
Created 11-04-2015 06:21 PM
Created 11-04-2015 06:55 PM
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
Performing a hdfs cat on stdout file inside the outputofthejob directory will give the output from hive.
hdfs dfs -cat <location-of-outputofthejob>/stdout