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


    113.1 unixODBC依赖包的安装

    • 检查是否安装unixODBC包
    $ rpm -qa |grep -i unixodbc
    
    • 1
    • 安装unixODBC依赖包
    $ sudo yum -y install unixODBC unixODBC-devel
    
    • 1
    • 查看unixODBC配置文件路径
    $ odbcinst -j
    
    • 1

    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
    
    • 1
    • 安装Impala ODBC的RPM包
    $ sudo yum -y localinstall ClouderaImpalaODBC-2.5.41.1029-1.el7.x86_64.rpm 
    
    • 1
    • Impala的安装目录在/opt/cloudera/impalaodbc
    $ tree /opt/cloudera/impalaodbc/
    
    • 1

    113.3 Impala ODBC的配置

    • 设置驱动环境变量,在/etc/profile文件的末尾增加如下配置
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cloudera/impalaodbc/lib/64
    
    • 1
    • 立即生效
    $ source /etc/profile
    $ echo $LD_LIBRARY_PATH
    
    • 1
    • 2
    • 配置Impala ODBC驱动,在/etc/odbcinst.ini文件末尾增加如下配置
    [ImpalaODBC]
    Description=Cloudera ODBC Driver for Impala (64-bit)
    Driver=/opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so
    
    • 1
    • 2
    • 3
    • 查看是否配置成功
    $ odbcinst -q -d
    
    • 1
    • 配置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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 验证
    $ odbcinst -q -s
    
    • 1
    • Impala ODBC连接验证
      • 访问DataSource
    $ isql -v ImpalaDataSource
    
    • 1

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

  • 相关阅读:
    PX4模块设计之三十六:MulticopterPositionControl模块
    3.1.2 内存池的实现与场景分析
    tiup dm reload
    PAT 1018 Public Bike Management
    OkHttp相关知识(二)
    定制AI问答机器人前需要准备什么数据来训练AI模型?
    经典面试题-lock与synchronized异同点
    Everest Group发布《2023年RPA供应商评估报告》:2家中国厂商持续上榜
    STM32 UDS Bootloader开发-需求篇
    C++ 函数重载
  • 原文地址:https://blog.csdn.net/m0_47454596/article/details/126250973