You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Uber Slacker <cu...@gmail.com> on 2014/03/28 16:28:51 UTC

CLI, HiveServer2, Beeline

Hi folks. I'm trying to wrap my head around the latest Hive architecture
(as of 0.12 at least). From what I've gathered:

- HiveServer2 is the new Thrift based Hive server.

- We can use Thrift, JDBC, and ODBC tools to connect to HiveServer2.

- Beeline is an included CLI that connects to HiveServer2 via JDBC

- HiveServer1 sounds like it is deprecated, though it's still available to
run if you want.

Are those understandings correct?

Some questions I have:
What about the original CLI? I was playing with a distribution and I'm
still able to use the CLI.Will this be deprecated in favor of Beeline? Or
will both be available going forward?

When would you use the CLI vs Beeline?

Does the CLI require HiveServer1 to operate? My understanding is that it
doesn't and that the CLI only works in embedded mode.

Thanks much for any info!

Re: CLI, HiveServer2, Beeline

Posted by Prasad Mujumdar <pr...@cloudera.com>.
That's correct. Beeline is being used as a thin client, it's making JDBC
calls to the HiveServer2, which invokes the Hive driver to execute the
query.

The HiveServer2 interface supports both remote as well as local calls. The
Beeline (more accurately the Hive JDBC driver used by Beeline), invokes a
local dedicate instance of HiveServer2. The client requests get executed as
direct java method calls in this case (not network loopback). Hence for
embedded mode, you do NOT need the HiveServer2 service.

thanks
Prasad

On Fri, Mar 28, 2014 at 9:55 AM, Uber Slacker <cu...@gmail.com> wrote:

> Thanks Prasad! This is helping.
>
> A newb question about Beeline and embedded:
> So when Beeline is being used as a thin client, it's making JDBC calls to
> the HiveServer2. HiveServer2 is then interacting with the Hive driver.
> Hopefully that understanding is correct.
>
Now when HiveServer2 is in embedded mode, do we need HiveServer2 service
> even to be running, or can Beeline interact with the Hive driver without
> going through HiveServer2? Can you give me a little more insight on what is
> actually going on during embedded mode?
>

> Thanks much!
>
>
>
> On Fri, Mar 28, 2014 at 11:47 AM, Prasad Mujumdar <pr...@cloudera.com>wrote:
>
>> Hello Uber,
>>
>>    Please see the comments inline.
>>
>> thanks
>> Prasad
>>
>>
>>
>> On Fri, Mar 28, 2014 at 8:28 AM, Uber Slacker <cu...@gmail.com>wrote:
>>
>>> Hi folks. I'm trying to wrap my head around the latest Hive architecture
>>> (as of 0.12 at least). From what I've gathered:
>>>
>>> - HiveServer2 is the new Thrift based Hive server.
>>>
>>> - We can use Thrift, JDBC, and ODBC tools to connect to HiveServer2.
>>>
>>> - Beeline is an included CLI that connects to HiveServer2 via JDBC
>>>
>>> - HiveServer1 sounds like it is deprecated, though it's still available
>>> to run if you want.
>>>
>>> Are those understandings correct?
>>>
>> That's correct. Note that JDBC driver for HiveServer2 is part of Apache
>> Hive distribution. The ODBC is not. There are some third party ODBC driver
>> available that work with HiveServer2. You can find more details of clients
>> for HiveServer2 on the at
>> https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients
>>
>>
>>> Some questions I have:
>>> What about the original CLI? I was playing with a distribution and I'm
>>> still able to use the CLI.Will this be deprecated in favor of Beeline? Or
>>> will both be available going forward?
>>>
>> The original CLI is still available. In the last contributor meetup,
>> there was a discussion about deprecating both old HiveServer and CLI. It
>> might get deprecating in some future release, we are not sure.
>>
>>
>>>
>>> When would you use the CLI vs Beeline?
>>>
>>
>>> Does the CLI require HiveServer1 to operate? My understanding is that it
>>> doesn't and that the CLI only works in embedded mode.
>>>
>> CLI can work in both embedded mode as well as a client to old
>> HiveServer1. Beeline has pretty much at feature parity of CLI. Beeline can
>> also work as an embedded Hive or as a thin client to HiveServer2.
>> At this point you should be able to use Beeline as a command line tool
>> for all Hive use cases.
>>
>>
>>
>>> Thanks much for any info!
>>>
>>
>>
>

Re: CLI, HiveServer2, Beeline

Posted by Uber Slacker <cu...@gmail.com>.
Thanks Prasad! This is helping.

A newb question about Beeline and embedded:
So when Beeline is being used as a thin client, it's making JDBC calls to
the HiveServer2. HiveServer2 is then interacting with the Hive driver.
Hopefully that understanding is correct.
Now when HiveServer2 is in embedded mode, do we need HiveServer2 service
even to be running, or can Beeline interact with the Hive driver without
going through HiveServer2? Can you give me a little more insight on what is
actually going on during embedded mode?

Thanks much!


On Fri, Mar 28, 2014 at 11:47 AM, Prasad Mujumdar <pr...@cloudera.com>wrote:

> Hello Uber,
>
>    Please see the comments inline.
>
> thanks
> Prasad
>
>
>
> On Fri, Mar 28, 2014 at 8:28 AM, Uber Slacker <cu...@gmail.com>wrote:
>
>> Hi folks. I'm trying to wrap my head around the latest Hive architecture
>> (as of 0.12 at least). From what I've gathered:
>>
>> - HiveServer2 is the new Thrift based Hive server.
>>
>> - We can use Thrift, JDBC, and ODBC tools to connect to HiveServer2.
>>
>> - Beeline is an included CLI that connects to HiveServer2 via JDBC
>>
>> - HiveServer1 sounds like it is deprecated, though it's still available
>> to run if you want.
>>
>> Are those understandings correct?
>>
> That's correct. Note that JDBC driver for HiveServer2 is part of Apache
> Hive distribution. The ODBC is not. There are some third party ODBC driver
> available that work with HiveServer2. You can find more details of clients
> for HiveServer2 on the at
> https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients
>
>
>> Some questions I have:
>> What about the original CLI? I was playing with a distribution and I'm
>> still able to use the CLI.Will this be deprecated in favor of Beeline? Or
>> will both be available going forward?
>>
> The original CLI is still available. In the last contributor meetup, there
> was a discussion about deprecating both old HiveServer and CLI. It might
> get deprecating in some future release, we are not sure.
>
>
>>
>> When would you use the CLI vs Beeline?
>>
>
>> Does the CLI require HiveServer1 to operate? My understanding is that it
>> doesn't and that the CLI only works in embedded mode.
>>
> CLI can work in both embedded mode as well as a client to old HiveServer1.
> Beeline has pretty much at feature parity of CLI. Beeline can also work as
> an embedded Hive or as a thin client to HiveServer2.
> At this point you should be able to use Beeline as a command line tool for
> all Hive use cases.
>
>
>
>> Thanks much for any info!
>>
>
>

Re: CLI, HiveServer2, Beeline

Posted by Prasad Mujumdar <pr...@cloudera.com>.
Hello Uber,

   Please see the comments inline.

thanks
Prasad



On Fri, Mar 28, 2014 at 8:28 AM, Uber Slacker <cu...@gmail.com> wrote:

> Hi folks. I'm trying to wrap my head around the latest Hive architecture
> (as of 0.12 at least). From what I've gathered:
>
> - HiveServer2 is the new Thrift based Hive server.
>
> - We can use Thrift, JDBC, and ODBC tools to connect to HiveServer2.
>
> - Beeline is an included CLI that connects to HiveServer2 via JDBC
>
> - HiveServer1 sounds like it is deprecated, though it's still available to
> run if you want.
>
> Are those understandings correct?
>
That's correct. Note that JDBC driver for HiveServer2 is part of Apache
Hive distribution. The ODBC is not. There are some third party ODBC driver
available that work with HiveServer2. You can find more details of clients
for HiveServer2 on the at
https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients


> Some questions I have:
> What about the original CLI? I was playing with a distribution and I'm
> still able to use the CLI.Will this be deprecated in favor of Beeline? Or
> will both be available going forward?
>
The original CLI is still available. In the last contributor meetup, there
was a discussion about deprecating both old HiveServer and CLI. It might
get deprecating in some future release, we are not sure.


>
> When would you use the CLI vs Beeline?
>

> Does the CLI require HiveServer1 to operate? My understanding is that it
> doesn't and that the CLI only works in embedded mode.
>
CLI can work in both embedded mode as well as a client to old HiveServer1.
Beeline has pretty much at feature parity of CLI. Beeline can also work as
an embedded Hive or as a thin client to HiveServer2.
At this point you should be able to use Beeline as a command line tool for
all Hive use cases.



> Thanks much for any info!
>