zoukankan      html  css  js  c++  java
  • hive

    Cannot initialize metastore due to autoCreate error
    javax.jdo.JDODataStoreException: Required table missing : "DBS" in Catalog "" Schema "". DataNucleus requires this table to perform its persistence operatio
    ns. Either your MetaData is incorrect, or you need to enable "datanucleus.schema.autoCreateTables"

    太复杂了,搞了一下午,直接使用schematool初始化

    cd /hive-2.3.7/bin
    ./schematool -initSchema -dbType mysql
    

    附上hive.site.xml

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
    <configuration>
    	<property>
    	  <name>javax.jdo.option.ConnectionURL</name>
    	  <value>jdbc:mysql://server136:3306/metastore?createDatabaseIfNotExist=true</value>
    	  <description>JDBC connect string for a JDBC metastore</description>
    	</property>
    
    	<property>
    	  <name>javax.jdo.option.ConnectionDriverName</name>
    	  <value>com.mysql.jdbc.Driver</value>
    	  <description>Driver class name for a JDBC metastore</description>
    	</property>
    
    	<property>
    	  <name>javax.jdo.option.ConnectionUserName</name>
    	  <value>root</value>
    	  <description>username to use against metastore database</description>
    	</property>
    
    	<property>
    	  <name>javax.jdo.option.ConnectionPassword</name>
    	  <value>root</value>
    	  <description>password to use against metastore database</description>
    	</property>
    
    	<property>
    	  <name>hive.metastore.schema.verification</name>
    	  <value>false</value>
    	  <description>password to use against metastore database</description>
    	</property>
    
    	<property>
    		<name>datanucleus.schema.autoCreateAll</name>
    		<value>true</value>
    		<description>Auto creates necessary schema on a startup if one doesn't exist. Set this to false, after creating it once.To enable auto create also set hive.metastore.schema.verification=false. Auto creation is not recommended for production use cases, run schematool command instead.            
                   </description>
            </property>
    </configuration>
    

    参考1

  • 相关阅读:
    shutil模块详解
    pycharm连接服务器
    python中__name__属性的使用
    ORM学习笔记
    ORM连表操作
    python操作mysql实例
    python登录项目
    pycharm建立第一个django工程-----windows中
    打印顺序
    shell脚本
  • 原文地址:https://www.cnblogs.com/bigorang/p/13132134.html
Copyright © 2011-2022 走看看