There are various connectors that can be used to connect to and submit SQL queries to Impala, this doc summarizes the most widely used ones.

HiveServer2 Thrift Service

Impala coordinators expose a Thrift Service defined in ImpalaService.thrift called ImpalaHiveServer2Service. The Thrift interface is based on HiveServer2 Thrift Protocol (defined in the Hive repository in the file TCLIService.thrift).

This is the recommended way of connecting to Impala.

Beeswax Thrift Service

Impala coordinators expose another Thrift Service which is also defined in ImpalaService.Thrift called ImpalaService. The ImpalaService extends the BeeswaxService which is defined in beeswax.thrift. This protocol pre-dates the HiveServer2 Thrift Service mentioned above.

This is the legacy way of connecting to Impala, users should prefer to use the HiveServer2 Thrift service going forward.

Currently, the impala-shell and the majority of the Impala Python tests use Beeswax to connect to Impala, however, that may change in the future.

Thrift Services

For more information on how the Thrift services are started and managed within Impala see impala-server.h.

impyla

impyla is a Python client wrapper around the HiveServer2 Thrift Service, so it is capable of connecting to either Hive or Impala. It implements Python DB API 2.0. It is used by several tools within the Impala test infra.

hs2client

hs2client is a C++ native client for connecting to Hive and Impala. More information on this connector can be found in https://blog.cloudera.com/blog/2016/06/announcing-hs2client-a-fast-new-c-python-thrift-client-for-impala-and-hive/

The hs2client codebase has been "adopted" into Apache Arrow. The adopted code can be found here: https://github.com/apache/arrow/tree/master/cpp/src/arrow/dbi/hiveserver2

Hue

Hue uses the HS2 Thrift Protocol to connect to Impala.

impala-shell

The impala-shell uses the Beeswax protocol to connect to Impala.

Simba JDBC & ODBC Connectors

Simba provides popular JDBC / ODBC drivers to connect to Impala. These drivers use the HS2 Thrift Protocol to connect to Impala.

  • No labels