|
VanHuy Pham
2012-06-25, 19:43
Aniket Mokashi
2012-06-25, 21:15
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
|
-
Hive Thrift ClientVanHuy Pham 2012-06-25, 19:43
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 +
VanHuy Pham 2012-06-25, 19:43
-
Re: Hive Thrift ClientAniket Mokashi 2012-06-25, 21:15
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" +
Aniket Mokashi 2012-06-25, 21:15
-
Re: Hive Thrift ClientVanHuy Pham 2012-06-25, 21:36
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 <[EMAIL PROTECTED]> wrote: > 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
-
Re: Hive Thrift ClientBen Kim 2012-07-17, 05:57
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>wrote: > >> 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" >> > > -- *Benjamin Kim* *benkimkimben at gmail* +
Ben Kim 2012-07-17, 05:57
-
Re: Hive Thrift ClientNavis류승우 2012-07-17, 06:03
Can I ask the hive version you are currently using?
2012/7/17 Ben Kim <[EMAIL PROTECTED]> > 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 <[EMAIL PROTECTED]>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 <[EMAIL PROTECTED]>wrote: >> >>> 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" >>> >> >> > > > -- > > *Benjamin Kim* > *benkimkimben at gmail* > > +
Navis류승우 2012-07-17, 06:03
-
Re: Hive Thrift ClientBen Kim 2012-07-17, 06:05
I tested it on 0.8.1 and 0.9.0
Ben On Tue, Jul 17, 2012 at 3:03 PM, Navis류승우 <[EMAIL PROTECTED]> wrote: > Can I ask the hive version you are currently using? > > > 2012/7/17 Ben Kim <[EMAIL PROTECTED]> > >> 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 <[EMAIL PROTECTED]>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 <[EMAIL PROTECTED]>wrote: >>> >>>> 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" >>>> >>> >>> >> >> >> -- >> >> *Benjamin Kim* >> *benkimkimben at gmail* >> >> > -- *Benjamin Kim* *benkimkimben at gmail* +
Ben Kim 2012-07-17, 06:05
-
Re: Hive Thrift ClientNavis류승우 2012-07-17, 06:34
It seemed to be https://issues.apache.org/jira/browse/HIVE-2937
HIVE-2397 is expected to be included in hive-0.9 but missed by some reason. You can try applying the patch or using hive in trunk. 2012/7/17 Ben Kim <[EMAIL PROTECTED]> > I tested it on 0.8.1 and 0.9.0 > > Ben > > > On Tue, Jul 17, 2012 at 3:03 PM, Navis류승우 <[EMAIL PROTECTED]> wrote: > >> Can I ask the hive version you are currently using? >> >> >> 2012/7/17 Ben Kim <[EMAIL PROTECTED]> >> >>> 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 <[EMAIL PROTECTED]>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 <[EMAIL PROTECTED]>wrote: >>>> >>>>> 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" >>>>> >>>> >>>> >>> >>> >>> -- >>> >>> *Benjamin Kim* >>> *benkimkimben at gmail* >>> >>> >> > > > -- > > *Benjamin Kim* > *benkimkimben at gmail* > > +
Navis류승우 2012-07-17, 06:34
-
Re: Hive Thrift ClientBen Kim 2012-07-17, 08:52
alright the problem solved!
Now I'm able to connect to the hiveserver. I appreciate your help Navis :) Ben On Tue, Jul 17, 2012 at 3:34 PM, Navis류승우 <[EMAIL PROTECTED]> wrote: > It seemed to be https://issues.apache.org/jira/browse/HIVE-2937 > > HIVE-2397 is expected to be included in hive-0.9 but missed by some > reason. > You can try applying the patch or using hive in trunk. > > 2012/7/17 Ben Kim <[EMAIL PROTECTED]> > >> I tested it on 0.8.1 and 0.9.0 >> >> Ben >> >> >> On Tue, Jul 17, 2012 at 3:03 PM, Navis류승우 <[EMAIL PROTECTED]> wrote: >> >>> Can I ask the hive version you are currently using? >>> >>> >>> 2012/7/17 Ben Kim <[EMAIL PROTECTED]> >>> >>>> 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 <[EMAIL PROTECTED]>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 <[EMAIL PROTECTED]>wrote: >>>>> >>>>>> 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" >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> *Benjamin Kim* >>>> *benkimkimben at gmail* >>>> >>>> >>> >> >> >> -- >> >> *Benjamin Kim* >> *benkimkimben at gmail* >> >> > -- *Benjamin Kim* *benkimkimben at gmail* +
Ben Kim 2012-07-17, 08:52
|