How client can interact with Hive?

Viewing 2 reply threads
  • Author
    Posts
    • #5127
      DataFlair TeamDataFlair Team
      Spectator

      Explain how the client can interact with Hive?

    • #5129
      DataFlair TeamDataFlair Team
      Spectator

      The Client can interact with the Hive in the below three ways:-
       Hive Thrift Client: The Hive server is exposed as thrift service. Hence it is possible to interact with HIVE with any programming language that supports thrift.
       JDBC Driver: Hive uses pure Type 4 JDBC driver to connect to the server which is defined in org.apache.hadoop.HIVE.JDBC.HiveDriver class. . Pure Java applications may use this driver in order to connect to application using separate host and port.
      The BeeLine CLI uses JDBC Driver to connect to the HIVE Server.
       ODBC Driver: An ODBC Driver allows application that support ODBC to connect to the HIVE server. By default Apache does not ships the ODBC Driver but it is freely available by many vendors.

    • #5130
      DataFlair TeamDataFlair Team
      Spectator

      Hive provides different driver for interaction with different type application:

      1) For Thrift based application it provides thrift client which interacts with hive server in hive services.Hive Thrift Client can run Hive commands from a wide range of programming languages. Thrift bindings for Hive are available for Java, Python, and Ruby

      2)For java based application it provides jdbc driver defined in the class org.apache.hadoop.hive.jdbc.HiveDriver.When configured with a JDBC URI of the form jdbc:hive://host:port/dbname ,Java application will connect to Hive server running in a separate process at the given host and port.

      3)For ODBC application it provides odbc driver to interact with hive server and connect to hive.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.