Hive CLI启动报错Impossible d'instancier org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

Hive CLI启动报错Impossible d'instancier org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

Arrière-plan

Lors du démarrage du client Hive sur le cluster Hadoop, l'erreur suivante est signalée :

ÉCHEC : SemanticException org.apache.hadoop.hive.ql.metadata.HiveException : java.lang.RuntimeException : impossible d'instancier org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

Généralement, cela est dû au fait que le service metastore n'est pas activé.

Solution

  1. Avant : HIVE_HOME a été ajouté en tant que variable d'environnement système
  2. saisir la commande
    hive --service metastore &
➜  ext source ~/.zshrc                                                                                                
➜  ext hive --service metastore &
[1] 39705
➜  ext 2023-05-28 23:00:55: Starting Hive Metastore Server
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/onetwothree/BIGDATA_DEV/hive-3.1.2/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.30.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]
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
  1. Entrez à nouveau la commande Hive pour accéder à l'interface de ligne de commande interactive Hive :
➜  lib hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/onetwothree/BIGDATA_DEV/hive-3.1.2/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.30.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]
Hive Session ID = 52d1397e-df67-40b5-b47f-a1b4d4adfd04

Logging initialized using configuration in jar:file:/Users/onetwothree/BIGDATA_DEV/hive-3.1.2/lib/hive-common-3.1.2.jar!/hive-log4j2.properties Async: true
Hive Session ID = bc2fd479-9774-4da3-b395-48b91f93a3a8
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
hive> show databases;
OK
default
Time taken: 0.391 seconds, Fetched: 1 row(s)
hive>

Je suppose que tu aimes

Origine blog.csdn.net/liuwei0376/article/details/130919128
conseillé
Classement