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

  • 相关阅读:
    JavaScript Json对象和Json对象字符串的关系 jsonObj<->JsonString
    VS2012 MVC4 学习笔记-概览
    java中运算符的解析和计算
    Python基本数据类型之tuple
    Python基本数据类型之list
    Python基本数据类型之str
    Python基本数据类型之int
    range和xrange梳理
    python编码
    ubuntu下的ssh
  • 原文地址:https://www.cnblogs.com/bigorang/p/13132134.html
Copyright © 2011-2022 走看看