Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

hive rest api : cannot query tables ?

Highlighted

hive rest api : cannot query tables ?

Expert Contributor

Unable to query hive tables... was able to retrive the schema of tables, couldn't get the data of the table?

16 REPLIES 16

Re: hive rest api : cannot query tables ?

Re: hive rest api : cannot query tables ?

Expert Contributor

@Neeraj Sabharwal We have configured webhcat and is working fine to retrieve the schema http://<IP Address>:50111/templeton/v1/version/hive?user.name=hive result : {"module":"hive","version":"1.2.1.2.3.4.0-3485"} but while running a query to retrieve the data of a hive table , its throwing {

error: null;

}

Re: hive rest api : cannot query tables ?

Re: hive rest api : cannot query tables ?

@Krishna Srinivas Please see this...it's in my vm

Job is still running.

[hive@sandbox ~]$ curl -s -d execute="select+*+from+nstest;” \

> -d statusdir=“nstest.output" \

> 'http://localhost:50111/templeton/v1/hive?user.name=hive'

{"id":"job_1454999065989_0008"}[hive@sandbox ~]$

1970-screen-shot-2016-02-10-at-50927-am.png

Re: hive rest api : cannot query tables ?

Re: hive rest api : cannot query tables ?

Expert Contributor

@Neeraj Sabharwal Thanq for the detailed description and yes the jobs are getting initiated the same way, but am afraid couldn't get it from the google rest api client. How can we execute a query from rest api client, whenever am initiating its throwing

error:null

Re: hive rest api : cannot query tables ?

@Krishna Srinivas Do you have connectivity to cluster from google rest api? If connectivity is there then you are all set and if not then its bigger problem.

Re: hive rest api : cannot query tables ?

Expert Contributor

@Neeraj Sabharwal hiveexecutequery.png Please find the document, I am able to do the query but can't see the results from the API. My interest is an application using this api to pull the data

Re: hive rest api : cannot query tables ?

@Krishna Srinivas Your job got submitted and now , you need to access output from HDFS. Not possible to display data on screen yet...WIP

Don't have an account?
Coming from Hortonworks? Activate your account here