I just started learning Hive.There are three terms which often I seen in Hive books or Hive tutorials. Hive Server,Hive Service and Thrift Server. What is these ? how they are related ?. what is the difference ?. when each of these are used? please explain
Thrift comes in the architectural part of Hive, Thrift is a protocol for the application which were developed in a different programming languages to communicate. So the Thrift server sits in a hive services layer and this is the one which receives the request or hive queries from client programs.
Thrift is an interface definition language and binary communication protocol used for defining and creating services for numerous programming languages. It was developed at Facebook for "scalable cross-language services development" and as of 2020 is an open source project in the Apache Software Foundation.
HiveServer is an optional service that allows a remote client to submit requests to Hive, using a variety of programming languages, and retrieve results.
Thrift uses a special Interface Description Language (IDL) to define data types and service interfaces which are stored as . thrift files and used later as input by the compiler for generating the source code of client and server software that communicate over different programming languages.
What is Hive thrift server? Basically, a service which permits a remote client to submit requests to Hive, with the help of a variety of programming languages, as well as retrieve results, is what we call HiveServer. Since, It is built on Apache Thrift, that’s why we call it Thrift server sometimes.
Basically, a service which permits a remote client to submit requests to Hive, with the help of a variety of programming languages, as well as retrieve results, is what we call HiveServer. Since, It is built on Apache Thrift, that’s why we call it Thrift server sometimes.
I guess both do the same except when you start Hive Thrift server from spark, it adds one more CLI service to the thrift server which should add spark SQL context to the thrift API.
Introduction to Spark Thrift Server Spark SQL Thrift server is a port of Apache Hive’s HiverServer2 which allows the clients of JDBC or ODBC to execute queries of SQL over their respective protocols on Spark.
Hive Service is nothing but daemon which runs on your client node which sends requests to Hive Server.
Thrift is an RPC framework for building cross-platform services. Its stack consists of 4 layers: Server, Transport, Protocol, and Processor. You can find more details about the layers at https://thrift.apache.org/docs/concepts.
Relation between all these:
Usage:
What is Apache Thrift: It is framework for scalable for cross-language service development.
When we can use Apache Thrift: Developing web-service that uses service developed in one language access that is in another language.
What is HiveServer : It is a service that allows a remote client to submit requests to hive. Using a variety of programming languages, and retrieve results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With