Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>
Error reporting environment:
The hive service integrated in CDH starts to report an error, so initialize the metadata
Configuration file: /etc/hive/conf hive site. XML
Command directory: /opt/cloudera/parcels/cdh-5.15.1-1. Cdh5.15.1. P0.4/lib/hive/bin
Error reporting:
An error is reported when executing the following command:
./schematool -dbType mysql -initSchema
[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 ***
Solution:
Add the following to the hive-site.xml file
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://192.168.52.26:3306/hive</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>root</value>
</property>
After saving, execute the command again