HiveServer2 Beeline Introduction 4

In this post we will discuss about HiveServer2 Beeline Introduction. As of hive-0.11.0, Apache Hive started decoupling HiveServer2 from Hive. It is because of overcoming the existing Hive Thrift Server.

Below are the Limitations of Hive Thrift Server 1

  • No Sessions/Concurrency
  • Essentially need 1 server per client
  • Security
  • Client Interface
  • Stability


  • Old Thrift API and server implementation didn’t support concurrency.


  • Incomplete implementations of Authentication (verifying the identity of the user) and Authorizations (Verifying if user has permissions to perform this action).


HiveServer2 is a container for the Hive execution engine (Driver). For each client connection, it creates a new execution context (Connection and Session) that serves Hive SQL requests from the client. The new RPC interface enables the server to associate this Hive execution context with the thread serving the client’s request.

Below is the high level architecture of HiveServer2.


Sourced from

Run HiveServer2:

We can start Thrift HiveServer2 service with the below command if hive-0.11.0 or above is installed in our machine.

If we need to customize HiveServer2, we can set below properties in hive-site.xml file.

Start Beeline Client for HiveServer2:

We can start the client service for HiveServer2 from various clients like SQLine, Beeline or Squirrel or Web Interface. But in this we will see how to connect to HiveServer2 via Beeline client.

Below command can be used to connect to HiveServer2.

About Siva

Senior Hadoop developer with 4 years of experience in designing and architecture solutions for the Big Data domain and has been involved with several complex engagements. Technical strengths include Hadoop, YARN, Mapreduce, Hive, Sqoop, Flume, Pig, HBase, Phoenix, Oozie, Falcon, Kafka, Storm, Spark, MySQL and Java.

Leave a comment

Your email address will not be published. Required fields are marked *

4 thoughts on “HiveServer2 Beeline Introduction

  • Lekan

    Hi, Any time I run the bin/hiveserver2 command, I get this response
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/usr/local/hadoop/hive/lib/hive-jdbc-1.0.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See for an explanation.
    SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

    And it never loads further. I have tried connecting via PHP client but it does not return anything. Why does it hang there?

  • Eswar

    Hi Siva,

    Thank you for the beeline introduction.

    Currently we are using Hive CLI on my cluster. we are planning to disable Hive CLI by bringing up beeline for the security purpose.

    Could you please guide me the process to disable the current Hive CLI version from the existing cluster.

    -> What is the process  to bring up beeline with out any impact of the current databases , tables and data.

    -> what are the properties needs to be change in hive-site.xml file. Please specify the properties .

    Please suggest me the process on this scenario.

    Thank you in advance !!!

  • Ajay

    Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: Connection refused (state=08S01,code=0)