Hive报错

no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/packages/jdk/bin:/packages/hadoop-2.7.4/bin:/packages/hadoop-2.7.4/sbin:/root/bin:/packages/jdk/bin:/packages/hadoop-2.7.4/bin:/packages/hadoop-2.7.4/sbin:/packages/apache-hive-1.2.1-bin/bin:/packages/jdk/bin:/packages/hadoop-2.7.4/bin:/packages/hadoop-2.7.4/sbin:/packages/apache-hive-2.0.0-bin/bin)

Exception in thread "main" java.lang.RuntimeException: Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql)

解决办法:

schematool -initSchema  -dbType mysql

根据报错,输入这个命令,格式化hive就好了

 

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐