113.Impala ODBC驱动的安装及配置

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
大数据语音推荐:
ELK7 stack开发运维
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值