DESCRIBE EXTENDED show numRows=0

2014-01-22 Thread Haroon Muhammad
Hi,

I have observed that 
DESCRIBE EXTENDED always shows number of rows to be zero despite the 
fact that the table has data. Is it a bug? Is it known ? Has anyone else also 
come 
across the same ?


Thanks,   

RE: HS2 ODBC incompatibility

2013-10-22 Thread Haroon Muhammad

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();
sessionReq->__set_client_protocol((TProtocolVersion::type)0);

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

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

TExecuteStatementReq *execStmtReq = new TExecuteStatementReq();
TExecuteStatementResp *execStmtRes = new TExecuteStatementResp();
execStmtReq->__set_sessionHandle(sessionRes->sessionHandle);
execStmtReq->__set_statement(query_str);


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


TFetchResultsReq *fetchReq = new TFetchResultsReq();
fetchReq->__set_operationHandle(execStmtRes->operationHandle);
fetchReq->__set_orientation((TFetchOrientation::type)4);

TFetchResultsResp *fetchRes = new TFetchResultsResp();
connection->client->FetchResults(*fetchRes, *fetchReq);
std::vector vRow = fetchRes->results.rows;
cout<<"Row size:" << vRow.size() <https://github.com/apache/hive/tree/trunk/jdbc/src/java/org/apache/hive/jdbc) 
is Java implementation of thrift client for HS2.

thanksPrasad


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.
Thanks
Date: Mon, 21 Oct 2013 12:11:27 -0700
Subject: Re: HS2 ODBC incompatibility
From: cwsteinb...@gmail.com
To: user@hive.apache.org


Cloudera has an ODBC driver that is compatible with both HiveServer1 and 
HiveServer2. More info here:
http://www.cloudera.com/content/cloudera-content/cloudera-docs/Connectors/PDF/Cloudera-ODBC-Driver-for-Apache-Hive-Install-Guide.pdf



Thanks.
Carl

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 -

http://hortonworks.com/download/download-archives/



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,



--

CONFIDENTIALITY NOTICE

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.


  

  

RE: HS2 ODBC incompatibility

2013-10-22 Thread Haroon Muhammad
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.
ThanksDate: Mon, 21 Oct 2013 12:11:27 -0700
Subject: Re: HS2 ODBC incompatibility
From: cwsteinb...@gmail.com
To: user@hive.apache.org

Cloudera has an ODBC driver that is compatible with both HiveServer1 and 
HiveServer2. More info here:
http://www.cloudera.com/content/cloudera-content/cloudera-docs/Connectors/PDF/Cloudera-ODBC-Driver-for-Apache-Hive-Install-Guide.pdf


Thanks.
Carl

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 -

http://hortonworks.com/download/download-archives/



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,



--

CONFIDENTIALITY NOTICE

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.


  

RE: hive_service.thrift vs TCLIService.thrift

2013-10-22 Thread Haroon Muhammad
Thanks Vaibhav.

Date: Mon, 21 Oct 2013 11:14:28 -0700
Subject: Re: hive_service.thrift vs TCLIService.thrift
From: vgumas...@hortonworks.com
To: user@hive.apache.org

Hi Haroon,
hive_service.thrift is the interface definition language (IDL) file for 
HiveServer (older one), whereas TCLIService.thrift is the IDL for HiveServer2. 
HiveServer2 was introduced in Hive-0.11. Check the docs here:


https://cwiki.apache.org/confluence/display/Hive/Setting+up+HiveServer2


Thanks,--Vaibhav


On Mon, Oct 21, 2013 at 11:03 AM, Haroon Muhammad  
wrote:




Hi,
Can anyone share what's the difference between hive_service.thrift and 
TCLIService.thrift?
Thanks,   





CONFIDENTIALITY NOTICENOTICE: 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. 

hive_service.thrift vs TCLIService.thrift

2013-10-21 Thread Haroon Muhammad
Hi,
Can anyone share what's the difference between hive_service.thrift and 
TCLIService.thrift?
Thanks,   

HS2 ODBC incompatibility

2013-10-21 Thread Haroon Muhammad
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,