113.Impala ODBC驱动的安装及配置
2022-08-11 本文已影响0人
大勇任卷舒
113.1 unixODBC依赖包的安装
- 检查是否安装unixODBC包
$ rpm -qa |grep -i unixodbc
- 安装unixODBC依赖包
$ sudo yum -y install unixODBC unixODBC-devel
- 查看unixODBC配置文件路径
$ odbcinst -j
113.2 Impala ODBC驱动安装
- Impala ODBC驱动
$ wget https://downloads.cloudera.com/connectors/impala_odbc_2.5.41.1029/Linux/EL7/ClouderaImpalaODBC-2.5.41.1029-1.el7.x86_64.rpm
- 安装Impala ODBC的RPM包
$ sudo yum -y localinstall ClouderaImpalaODBC-2.5.41.1029-1.el7.x86_64.rpm
- Impala的安装目录在/opt/cloudera/impalaodbc
$ tree /opt/cloudera/impalaodbc/
113.3 Impala ODBC的配置
- 设置驱动环境变量,在/etc/profile文件的末尾增加如下配置
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cloudera/impalaodbc/lib/64
- 立即生效
$ source /etc/profile
$ echo $LD_LIBRARY_PATH
- 配置Impala ODBC驱动,在/etc/odbcinst.ini文件末尾增加如下配置
[ImpalaODBC]
Description=Cloudera ODBC Driver for Impala (64-bit)
Driver=/opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so
- 查看是否配置成功
$ odbcinst -q -d
- 配置ODBC DataSource,修改/home/ec2-user/.odbc.ini配置
[ODBC Data Sources]
ImpalaDataSource=Cloudera ODBC Driver for Impala 64-bit
[ImpalaDataSource]
# Description: DSN Description.
# This key is not necessary and is only to give a description of the data source.
Description=Cloudera ODBC Driver for Impala (64-bit) DSN
# Driver: The location where the ODBC driver is installed to.
Driver=/opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so
# The DriverUnicodeEncoding setting is only used for SimbaDM
# When set to 1, SimbaDM runs in UTF-16 mode.
# When set to 2, SimbaDM runs in UTF-8 mode.
#DriverUnicodeEncoding=2
# Values for HOST, PORT, KrbFQDN, and KrbServiceName should be set here.
# They can also be specified on the connection string.
HOST=ip-172-31-22-86.ap-southeast-1.compute.internal
PORT=25004
Schema=default
# The authentication mechanism.
# 0 - No authentication (NOSASL)
# 1 - Kerberos authentication (SASL)
# 2 - Username authentication (SASL)
# 3 - Username/password authentication (NOSASL or SASL depending on UseSASL configuration)
AuthMech=1
# Set to 1 to use SASL for authentication.
# Set to 0 to not use SASL.
# When using Kerberos authentication (SASL) or Username authentication (SASL) SASL is always used
# and this configuration is ignored. SASL is always not used for No authentication (NOSASL).
UseSASL=0
# Kerberos related settings.
KrbFQDN=ip-172-31-22-86.ap-southeast-1.compute.internal
KrbRealm=CLOUDERA.COM
KrbServiceName=impala
# Username/password authentication with SASL settings.
UID=
PWD=
# Set to 0 to disable SSL.
# Set to 1 to enable SSL.
SSL=0
CAIssuedCertNamesMismatch=1
TrustedCerts=/opt/cloudera/impalaodbc/lib/64/cacerts.pem
# General settings
TSaslTransportBufSize=1000
RowsFetchedPerBlock=10000
SocketTimeout=0
StringColumnLength=32767
UseNativeQuery=0
- 验证
$ odbcinst -q -s
- Impala ODBC连接验证
- 访问DataSource
$ isql -v ImpalaDataSource
大数据视频推荐:
腾讯课堂
CSDN
AIops智能运维机器学习算法实战
ELK入门精讲
AIOps智能运维实战
ELK7 stack开发运维
大数据语音推荐:
ELK7 stack开发运维
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通