Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 48DB59FBE for ; Tue, 17 Jul 2012 06:04:32 +0000 (UTC) Received: (qmail 87987 invoked by uid 500); 17 Jul 2012 06:04:30 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 87823 invoked by uid 500); 17 Jul 2012 06:04:30 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 87774 invoked by uid 99); 17 Jul 2012 06:04:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2012 06:04:28 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.160.48] (HELO mail-pb0-f48.google.com) (209.85.160.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2012 06:04:21 +0000 Received: by pbbrq8 with SMTP id rq8so301793pbb.35 for ; Mon, 16 Jul 2012 23:03:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=rlWk1glkxgbF/tziWRrY66xQT3RntdZLK5EaVbjhHIY=; b=OfsYMevZcX5YQU00Kt8Zncg3Vs7NqvGLxFvHxLHjURKufdjfbMigPH+sYalFffojik wD/uWmjkAocg9D40EhBsWAmky9UwQ+pViVG9Z/6FUx+ouO3Nzqx68aDCigAZb2ZMWtXr LSXhDOhexQrSWNeXvWYOn93PAZNhcxxxUgWxnt5A8+uMiTHEx41ebSiDbogKU/6O+Wo+ Dyg/C9C88TuAZQSZbbdnKEN1U8FflpIFWtmCjA2Oyh5qm0d4hutdzdhKfxWID+DFqsW/ a0NJwYCN/jOPwLGyjSX1i5dh6fNImC8lfG/dAetOzg/A5hRY9nFFwdgyNX+56bK0o/Nn UBZQ== MIME-Version: 1.0 Received: by 10.68.223.35 with SMTP id qr3mr3532907pbc.83.1342505039488; Mon, 16 Jul 2012 23:03:59 -0700 (PDT) Received: by 10.68.224.34 with HTTP; Mon, 16 Jul 2012 23:03:59 -0700 (PDT) In-Reply-To: References: Date: Tue, 17 Jul 2012 15:03:59 +0900 Message-ID: Subject: Re: Hive Thrift Client From: =?EUC-KR?B?TmF2aXO3+b3Cv+w=?= To: user@hive.apache.org Content-Type: multipart/alternative; boundary=047d7b163089fce6bb04c5004f2a X-Gm-Message-State: ALoCoQnuyw1JH/hFCZ6KBRd8z3eeyd4uoGUz7xh4jdfNCgSo+A8xlGNGxoO4roeuj6Z1i5TwZZwu X-Virus-Checked: Checked by ClamAV on apache.org --047d7b163089fce6bb04c5004f2a Content-Type: text/plain; charset=ISO-8859-1 Can I ask the hive version you are currently using? 2012/7/17 Ben Kim > Did you get around to solve this problem? > > I running into the same problem and can't find a fix anywhere. > > For Hiveserver you will need to create your own when running the server > such as running "hive --service hiveserver & >> hiveserver.log 2>&1" > but it writes no logs. I think a connection is getting blocked somewhere > outside of the hive server or it could be something else. > > Ben > > On Tue, Jun 26, 2012 at 6:36 AM, VanHuy Pham wrote: > >> I just tried, but it still hangs there. I think all the executions run >> into the same problem so I was wondering if I miss anything here. >> 1) Do I need to sart any other services to make hive thrift server work? >> 2) I can't seem to find the log information for hive-thrift server. There >> is a folder called "hivelogs" created in my home dir, but I only find the >> log information there when I use hive cli through terminal. Is there any >> log dir for hive-thrift server? or any way I can tract the trace of the >> thrift client query (execute or getAlltables())?? >> >> Thanks >> >> >> On Mon, Jun 25, 2012 at 2:15 PM, Aniket Mokashi wrote: >> >>> Can you do client.getAllTables()? >>> >>> ~Aniket >>> >>> >>> On Mon, Jun 25, 2012 at 12:43 PM, VanHuy Pham 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" >>> >> >> > > > -- > > *Benjamin Kim* > *benkimkimben at gmail* > > --047d7b163089fce6bb04c5004f2a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Can I ask the hive version you are currently using?

2012/7/17 Ben Kim <benkimkimben@gmail.com>
Did you get around to solve this problem?

I running into= the same problem and can't find a fix anywhere.

For Hiveserver you will need to create your own when running the server = such as running "hive --service hiveserver & >> hiveserver.l= og 2>&1"
but it writes no logs. I think a connection is getting blocked somewhe= re outside of the hive server or it could be something else.

=
Ben

On Tue, Jun 26, 201= 2 at 6:36 AM, VanHuy Pham <huy.pham.sc@gmail.com> wrote:=
I just tried, but it still hangs there. I th= ink all the executions run into the same problem so I was wondering if I mi= ss anything here.
1) Do I need to sart any other services to make hive thrift server work?=A0=
2) I can't seem to find the log information for hive-thrift server. The= re is a folder called "hivelogs" created in my home dir, but I on= ly find the log information there when I use hive cli through terminal. Is = there any log dir for hive-thrift server? or any way I can tract the trace = of the thrift client query (execute or getAlltables())??

Thanks


On M= on, Jun 25, 2012 at 2:15 PM, Aniket Mokashi <aniket486@gmail.com&g= t; wrote:
Can you do client.getAllTables()?

~Aniket


On Mon, Jun 25= , 2012 at 12:43 PM, VanHuy Pham <huy.pham.sc@gmail.com> = wrote:
Hi,
=A0 =A0I am trying to u= se the hive thrift client to connect to hive. Even though I have started th= e hive thrift server (it's running by checking netstat -na | grep 10000= ).
=A0 =A0However, the thrift client justs hangs forever when I execute a= query. here is the code:

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 TSocke= t transport =3D new TSocket(hiveServer, hivePort);

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 transport.setTimeout(999999);<= /div>

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 TBinar= yProtocol protocol =3D new TBinaryProtocol(transport);

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 client =3D = new ThriftHive.Client(protocol);

=A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 transport.open();

=A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 System.out.println(transport.isOpen= ()); ///// It is open
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
=A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 System.out.println("Executing query&qu= ot;);
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 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.=A0
Any help would be much appreciated.
Thanks



--
"...:::= Aniket:::... Quetzalco@tl"




--

Benjamin K= im
benkimkimben at gmail



--047d7b163089fce6bb04c5004f2a--