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.