Tableau 通過 ODBC 連接Apache Drill 直連和ZK集羣連

1、安裝ODBC

說明文檔:https://drill.apache.org/docs/installing-the-driver-on-linux/

ODBC驅動包下載:下載地址http://package.mapr.com/tools/MapR-ODBC/MapR_Drill/

2、直連

如果出現

WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@882] - Connection request from old client /172.19.85.82:62303; will be dropped if server is in r-o mode

 

FAILED! [MapR][Drill] (1010) Error occurred while trying to connect: [MapR][Drill] (20) Failure occurred while trying to connect to zk=172.17.51.119:2181/drill/drillbits1

 

FAILED! [MapR][Drill] (1010) Error occurred while trying to connect: [MapR][Drill] (30) Handshake failure occurred while trying to connect to local=172.17.51.119:31010

等錯誤,說明安裝的ODBC驅動版本與當前的Drill版本互相不兼容,請重新安裝新版本的ODBC

http://mail-archives.apache.org/mod_mbox/drill-user/201805.mbox/%[email protected]%3E

 

3、zookeeper Quorum連接

 

此時出現錯誤:

FAILED! [MapR][Drill] (70) The hostname of '172.17.51.119' cannot be resolved. Please check your DNS setup or connect directly to Drillbit.

 

查看zk錯誤日誌:

2019-09-20 15:45:11,848 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@357] - caught end of stream exception EndOfStreamException: Unable to read additional data from client sessionid 0x16d48f23bcf0032, likely client has closed socket at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228) at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:203) at java.lang.Thread.run(Thread.java:745)

分析:

當Drill啓動時,它們會向ZK上註冊,ZK保存可用的已註冊Drill主機名的列表節點。

使用zkcl.sh檢查註冊節點,發現確實已經註冊成功了。

當客戶端使用ODBC或JDBC連接到ZK時,它將獲得列表可用Drill,並選擇要連接的一個Drill,如果無法解析該Drill的主機名,則會通訊失敗,但是我填的是直接IP,並非主機名,沒有DNS解析的問題啊?

 

4、Drill設置賬號密碼

http://drill.apache.org/docs/configuring-plain-security/

  1. 下載 tar.gz 文件到 Linux 平臺: http://sourceforge.net/projects/jpam/files/jpam/jpam-1.1/
  2. 解壓文件,然後拷貝 libjpam.so 文件到不包含其他 Hadoop 組件的文件目錄中。 例如:/opt/pam/ 目錄
  3. 增加以下行到 <DRILL_HOME>/conf/drill-env.sh,包含 libjpam.so 文件的地方: export DRILLBIT_JAVA_OPTS="-Djava.library.path=<directory>" 例如:export DRILLBIT_JAVA_OPTS="-Djava.library.path=/opt/pam/"
  4. 在 drill.exec 塊中增加以下配置到 <DRILL_HOME>/conf/drill-override.conf
    drill.exec {
        security.user.auth {
          enabled: true,
          packages += "org.apache.drill.exec.rpc.user.security",
          impl: "pam",
          pam_profiles: [ "sudo", "login" ]
        }
    }
    
  5. (可選)增加或刪除不同的 PAM 配置文件,添加或刪除配置文件名稱中的 “pam_profiles”
  6. 在每個 Drill 節點上重啓 Drillbit 進程。
    <DRILLINSTALL_HOME>/bin/drillbit.sh restart

drill-env.sh

drill-override.conf

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章