hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Haroon Muhammad <>
Subject RE: HS2 ODBC incompatibility
Date Tue, 22 Oct 2013 17:47:14 GMT

Looking at some of the sample code in java implementation, can't figure out where I am going
wrong. Is it possible to point out what is that I am doing wrong here ? It executes the select
query fine at the server end ( looking at the logs), however, fetchRes->results.rows.size()
turns out to be zero.
// quer_str = "SELECT * FROM foo";
	TOpenSessionReq *sessionReq = new TOpenSessionReq();

	TOpenSessionResp *sessionRes = new TOpenSessionResp();
	//TSessionHandle *sessionHandle = new TSessionHandle();

	connection->client->OpenSession(*sessionRes, *sessionReq);

	TExecuteStatementReq *execStmtReq = new TExecuteStatementReq();
	TExecuteStatementResp *execStmtRes = new TExecuteStatementResp();

	connection->client->ExecuteStatement(*execStmtRes, *execStmtReq);

	TFetchResultsReq *fetchReq = new TFetchResultsReq();

	TFetchResultsResp *fetchRes = new TFetchResultsResp();
	connection->client->FetchResults(*fetchRes, *fetchReq);
	std::vector<TRow> vRow = fetchRes->results.rows;
	cout<<"Row size:" << vRow.size() <<endl;

Thanks,Date: Tue, 22 Oct 2013 09:53:18 -0700
Subject: Re: HS2 ODBC incompatibility

   The Apache Hive JDBC driver (
is Java implementation of thrift client for HS2.


On Tue, Oct 22, 2013 at 7:04 AM, Haroon Muhammad <> wrote:

Thanks Carl and Tejas!!
Actually my application ( written in C) is based on the ODBC source i.e. makes use of ODBC
client source files. It works fine for Hiveserver1 but fails with Hiveserver2 for obvious
reasons. I am trying to incorporate TCLIService now and facing issue with "FetchResults" i.e.
TFetchResultsResp->results.rows.size() is always zero (I am doing a SELECT which should
return 10k rows in my table).

Would it be possible to share/point to a working thrift client (any language) sample code
for HiveServer2? It would help me verify the steps I am doing.
Date: Mon, 21 Oct 2013 12:11:27 -0700
Subject: Re: HS2 ODBC incompatibility

Cloudera has an ODBC driver that is compatible with both HiveServer1 and HiveServer2. More
info here:


On Mon, Oct 21, 2013 at 12:01 PM, Thejas Nair <> wrote:

Yes, the current odbc driver source in hive is not compatible with

hive server2. I am not aware of any body working on it.

But you can download odbc driver add on for hive server2, for free

from the hortonworks website -

On Mon, Oct 21, 2013 at 5:06 AM, Haroon Muhammad

<> wrote:

> Hi,


> Source under ODBC seems to be incompatible with HS2's changed RPC thrift

> interface. Are there any plans on getting an updated version out any time

> sooner ?


> Thanks,



NOTICE: This message is intended for the use of the individual or entity to

which it is addressed and may contain information that is confidential,

privileged and exempt from disclosure under applicable law. If the reader

of this message is not the intended recipient, you are hereby notified that

any printing, copying, dissemination, distribution, disclosure or

forwarding of this communication is strictly prohibited. If you have

received this communication in error, please contact the sender immediately

and delete it from your system. Thank You.


View raw message