报错:org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.

报错环境:

CDH中集成的hive服务,启动报错,所以初始化一下元数据。

配置文件:/etc/hive/conf hive-site.xml

命令目录:/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hive/bin

报错现象:

执行以下命令的时候报错:

./schematool -dbType mysql -initSchema

报错:org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version._第1张图片

[root@master bin]# ./schematool -dbType mysql -initSchema
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/java/jdk1.8.0_191/bin:/root/bin)
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Metastore connection URL:     jdbc:mysql://192.168.52.26:3306/hive
Metastore Connection Driver :     com.mysql.jdbc.Driver
Metastore connection User:     APP
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
*** schemaTool failed ***

解决方法:

在hive-site.xml文件中添加以下内容

<property>
      <name>javax.jdo.option.ConnectionURLname>
      <value>jdbc:mysql://192.168.52.26:3306/hivevalue>
  property>
  <property>
      <name>javax.jdo.option.ConnectionDriverNamename>
      <value>com.mysql.jdbc.Drivervalue>
  property>
  <property>
      <name>javax.jdo.option.ConnectionUserNamename>
      <value>rootvalue>
  property>
  <property>
      <name>javax.jdo.option.ConnectionPasswordname>
      <value>rootvalue>
  property>

保存之后重新执行命令。

报错:org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version._第2张图片

 

转载于:https://www.cnblogs.com/chuijingjing/p/10643226.html

你可能感兴趣的:(报错:org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.)