Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> Hive Thrift Client


+
VanHuy Pham 2012-06-25, 19:43
Copy link to this message
-
Re: Hive Thrift Client
Can you do client.getAllTables()?

~Aniket

On Mon, Jun 25, 2012 at 12:43 PM, VanHuy Pham <[EMAIL PROTECTED]> wrote:

> Hi,
>    I am trying to use the hive thrift client to connect to hive. Even
> though I have started the hive thrift server (it's running by checking
> netstat -na | grep 10000).
>    However, the thrift client justs hangs forever when I execute a query.
> here is the code:
>
>                       TSocket transport = new TSocket(hiveServer,
> hivePort);
>
>                       transport.setTimeout(999999);
>
>                       TBinaryProtocol protocol = new
> TBinaryProtocol(transport);
>
>                       client = new ThriftHive.Client(protocol);
>
>                       transport.open();
>
>                       System.out.println(transport.isOpen()); ///// It is
> open
>
>
>                       System.out.println("Executing query");
>                       client.execute("show tables"); // >>> hanging forever
>
> The thrift server is definitely on, because if I tried shutting it down,
> the hanging would stop immediately and say something like "connection
> interupted...". I was able to use JDBC to connect to hive locally only.
> Trying to use thrift client now.
> Any help would be much appreciated.
> Thanks
>

--
"...:::Aniket:::... Quetzalco@tl"
+
VanHuy Pham 2012-06-25, 21:36
+
Ben Kim 2012-07-17, 05:57
+
Navis류승우 2012-07-17, 06:03
+
Ben Kim 2012-07-17, 06:05
+
Navis류승우 2012-07-17, 06:34
+
Ben Kim 2012-07-17, 08:52