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

  • 相关阅读:
    P2280 [HNOI2003]激光炸弹[前缀和]
    P1280 尼克的任务[区间覆盖dp]
    P1352 没有上司的舞会[树形dp]
    HDU1024 Max Sum Plus Plus[DP]
    P1282 多米诺骨牌[可行性01背包]
    P1063 能量项链[区间DP]
    P1880 [NOI1995]石子合并[环形DP]
    P1091 合唱队形[单调性+DP]
    Gym 100971D 单调栈
    Gym 100971A Treasure Island BFS 思维题
  • 原文地址:https://www.cnblogs.com/bigorang/p/13132134.html
Copyright © 2011-2022 走看看