在Ubuntu中执行hive cli时,出现以下错误消息:
hadoopgudi@hadoopgudi-VirtualBox:~$ hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop-env/hive-
3.1.0/lib/log4j-slf4j-impl-
2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop-env/hadoop-
2.8.3/share/hadoop/common/lib/slf4j-log4j12-
1.7.10.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 = 0610a30d-9c12-455e-8a5b-e63a40979a6e
Logging initialized using configuration in jar:file:/usr/local/hadoop-env/
hive-3.1.0/lib/hive-common-3.1.0.jar!/hive-log4j2.properties Async: true
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.
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> use default;
**FAILED: HiveException java.lang.RuntimeException: Unable to instantiate
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient**
因此,我已经尝试了有关此错误的所有社区论坛。在所有提到的地方,您都必须删除在cli上运行hive命令时创建的metastore_db文件。然后尝试以下命令:
schematool -dbType mysql -initSchema
但是,我没有找到metastore_db文件或任何这种格式的文件。 因此,我想再次运行schematool命令来检查它是否可以重新启动mysql数据库中的metastore模式。但是,再次遇到流程失败,如下所示:
hadoopgudi@hadoopgudi-VirtualBox:/$ schematool -dbType mysql -initSchema
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop-env/hive-
3.1.0/lib/log4j-slf4j-impl-
2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop-env/hadoop-
2.8.3/share/hadoop/common/lib/slf4j-log4j12-
1.7.10.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]
Metastore connection URL: jdbc:mysql://localhost/metastore?
createDatabaseIfNotExist=true
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: hiveuser
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.
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema
version.
Underlying cause: java.sql.SQLException : The server time zone value
'CEST' is unrecognized or represents more than one time zone. You must
configure either the server or JDBC driver (via the serverTimezone
configuration property) to use a more specifc time zone value if you want
to utilize time zone support.
SQL Error code: 0
Use --verbose for detailed stacktrace.
*** schemaTool failed ***
你们能帮我解决这个问题吗? 我想尝试重新发送元存储过程,但未成功,因为我无法定位并命令实现相同的目标?