Невозможно прочитать конфигурации HiveServer2 из ZooKeeper

Я использую HDP3.1. И я Амбари для развертывания кластера Hadoop и Hive. После развертывания я могу успешно запустить куст в оболочке. Затем я развертываю Apache Kylin2.6, он может синхронизировать таблицу кустов. Но когда я строю куб, я получаю следующую ошибку:

java.io.IOException: OS command error exit with return code: 1, error message: SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://datacenter1:2181,datacenter2:2181,datacenter3:2181/default;password=hdfs;serviceDiscoveryMode=zooKeeper;user=hdfs;zooKeeperNamespace=hiveserver2
19/02/15 10:04:53 [main]: INFO jdbc.HiveConnection: Connected to datacenter3:10000
19/02/15 10:04:53 [main]: WARN jdbc.HiveConnection: Failed to connect to datacenter3:10000
19/02/15 10:04:53 [main]: ERROR jdbc.Utils: Unable to read HiveServer2 configs from ZooKeeper
Error: Could not open client transport for any of the Server URI's in ZooKeeper: Failed to open new session: java.lang.IllegalArgumentException: Cannot modify dfs.replication at runtime. It is not in list of params that are allowed to be modified at runtime (state=08S01,code=0)
Cannot run commands specified using -e. No current connection
The command is: 
hive -e "USE default;

Я запускаю команду hive в оболочке. Это успех. Строка подключения такая же, как и при запуске куба сборки в kylin. Я смущен, почему это успех в оболочке, но не удалось построить куб.

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://datacenter1:2181,datacenter2:2181,datacenter3:2181/default;password=hdfs;serviceDiscoveryMode=zooKeeper;user=hdfs;zooKeeperNamespace=hiveserver2
19/02/15 12:10:19 [main]: INFO jdbc.HiveConnection: Connected to datacenter3:10000
Connected to: Apache Hive (version 3.1.0.3.1.0.0-78)
Driver: Hive JDBC (version 3.1.0.3.1.0.0-78)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 3.1.0.3.1.0.0-78 by Apache Hive
0: jdbc:hive2://datacenter1:2181,datacenter2:> 

person shenlang    schedule 15.02.2019    source источник
comment
Похоже, что несколько привязок slf4j создают для вас проблему, удалите одну и попробуйте.   -  person Jainik    schedule 15.02.2019
comment
Я удалил одну банку slf4j. Проблема все еще существует.   -  person shenlang    schedule 15.02.2019


Ответы (2)


Вы можете попробовать добавить эти два свойства в файл hive-site.xml.

<property>
  <name>hive.security.authorization.sqlstd.confwhitelist</name>
  <value>mapred.*|hive.*|mapreduce.*|spark.*</value>
</property>

<property>
  <name>hive.security.authorization.sqlstd.confwhitelist.append</name>
  <value>mapred.*|hive.*|mapreduce.*|spark.*</value>
</property>
person handsome    schedule 17.02.2019

Наконец-то я нашел первопричину. Существует «Невозможно изменить dfs.replication во время выполнения». сообщение об ошибке в журнале ошибок. Кайлин установил это свойство в $KYLIN_HOME/conf/kylin_hive_conf.xml. И когда он запускает команду hive, он автоматически добавляет свойства в этот файл. Последняя команда выглядит так: hive --hiveconf dfs.replication=2 .......... Похоже, что свойство dfs.replication не может быть добавлено к команде hive. Я удалил это свойство в kylin_hive_conf.xml. И это работает сейчас.

person shenlang    schedule 21.02.2019