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

  • 相关阅读:
    异常以及异常处理框架探析
    ArcGis Server10 for java初试
    C#制作鹰眼全过程(带注释)
    flex remoteobject 因默认设置而调用失败
    ExecutorService.submit(Callable).get()不并发执行
    学习《The Flex, Spring, and BlazeDS full stack》-1
    java.lang.NoSuchMethodError: org.hibernate.mapping.SimpleValue.<init>(Lorg/hibernate/mapping/Table;)V
    用内置jetty运行项目struts2提示找不到Action
    二分查找
    排序
  • 原文地址:https://www.cnblogs.com/bigorang/p/13132134.html
Copyright © 2011-2022 走看看