- 浏览: 348363 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
lvyuan1234:
你好,你那个sample.txt文件可以分享给我吗
hive insert overwrite into -
107x:
不错,谢谢!
hive 表的一些默认值 -
on_way_:
赞
Hadoop相关书籍 -
bupt04406:
dengkanghua 写道出来这个问题该怎么解决?hbase ...
Unexpected state导致HMaster abort -
dengkanghua:
出来这个问题该怎么解决?hbase master启动不起来。
Unexpected state导致HMaster abort
hiveserver
./hive --service start-hive
./hive --service stop-hive
hive的metastore使用了datanucleus
下载datanucleus-samples-jdo-tutorial-2.0-src.zip
解压datanucleus-samples-jdo-tutorial-2.0,把里面的lib目录,src目录,datanucleus.properties log4j.properties orm.xml都拷到另外一个目录下面
创建 target/classes文件。
修改datanucleus.properties文件为:
javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.jdo.JDOPersistenceManagerFactory
javax.jdo.option.ConnectionDriverName=com.mysql.jdbc.Driver
javax.jdo.option.ConnectionURL=jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true
javax.jdo.option.ConnectionUserName=hive
javax.jdo.option.ConnectionPassword=123456
javax.jdo.option.Mapping=hsql
datanucleus.metadata.validate=false
datanucleus.autoCreateSchema=true
datanucleus.validateTables=false
datanucleus.validateConstraints=false
加上下面这个选项会出现问题:Unable to fetch table ***
<property>
<name>datanucleus.cache.collections</name>
<value>false</value>
</property>
datanucleus.cache.level2.type 从 soft 改为 none
datanucleus.fixedDatastore = true; 出现问题。
https://issues.apache.org/jira/browse/HIVE-1841
hive-site.xml中加入下面的配置能够解决下面的问题:Failures with DELETEME tables
<property>
<name>datanucleus.fixedDatastore</name>
<value>true</value>
</property>
并发造成的错误:
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'dataoven_prod_hadoop.DELETEME1309959999747' doesn't exist
http://search-hadoop.com/m/bi3w92UVF3L/Failures+with+DELETEME+tables&subj=Failures+with+DELETEME+tables
The datastore exception was thrown because com.mysql.jdbc.DatabaseMetaData.getColumns has a race condition. It was called with tableNamePattern == null and because of that it went and fetched a list of all tables, and for each table, it executed a query to fetch table info. Before all table-info fetches were done, if a table were dropped by some other process, the fetch would fail and getColumns would throw an exception. This is a race condition bug.
For now, I have enabled datanucleus.fixedDatastore in hive-site.xml to eliminate the use of DELTEME tables, virtually eliminating the problem. But the problem can still happen with non-DELETEME causes due to the 2 bugs described above or when datanucleus.fixedDatastore needs to be disabled occasionally.
hiveserver take too much memory:
http://search-hadoop.com/m/PIsyn1GZxfh1&subj=java+lang+OutOfMemoryError+PermGen+space+when+running+as+a+service+
move all properties from jpox.properties to hive-site.xml
https://issues.apache.org/jira/browse/HIVE-610
操作如下:
编译生成的class文件到target/classes
tianzhao@tianzhao-VirtualBox:~/software/datanucleus/example$ javac -cp lib/jdo2-api-2.3-ec.jar:lib/datanucleus-core-2.0.3.jar -sourcepath src/java/ src/java/org/datanucleus/samples/jdo/tutorial/*.java -d target/classes
tianzhao@tianzhao-VirtualBox:~/software/datanucleus/example$ cp src/java/org/datanucleus/samples/jdo/tutorial/package-hsql.orm target/classes/org/datanucleus/samples/jdo/tutorial/
tianzhao@tianzhao-VirtualBox:~/software/datanucleus/example$ java -cp target/classes/:lib/datanucleus-enhancer-2.0.3.jar:lib/datanucleus-core-2.0.3.jar:lib/jdo2-api-2.3-ec.jar:lib/asm-3.1.jar org.datanucleus.enhancer.DataNucleusEnhancer target/classes/org/datanucleus/samples/jdo/tutorial/package-hsql.orm
在数据库中创建表
tianzhao@tianzhao-VirtualBox:~/software/datanucleus/example$ java -cp target/classes/:lib/datanucleus-rdbms-2.0.3.jar:lib/datanucleus-core-2.0.3.jar:lib/jdo2-api-2.3-ec.jar:lib/mysql-connector-java-5.1.6.jar org.datanucleus.store.rdbms.SchemaTool -props datanucleus.properties -create target/classes/org/datanucleus/samples/jdo/tutorial/package-hsql.orm
执行相关操作
tianzhao@tianzhao-VirtualBox:~/software/datanucleus/example$ java -cp lib/jdo2-api-2.3-ec.jar:lib/datanucleus-core-2.0.3.jar:lib/datanucleus-rdbms-2.0.3.jar:lib/mysql-connector-java-5.1.6.jar:target/classes/:. org.datanucleus.samples.jdo.tutorial.Main
datanucleus-samples-jdo-tutorial-2.0 下面有build.xml pom.xml两个文件
pom.xml
Files used by Maven2 for building and running the tutorial.
build.xml
File used by Ant for building the tutorial.
这里只是转成直接使用java 和 javac的的命令
hive用的datanucleus版本。
build.properties :
#
# Data nucleus repository - needed for jdo2-api-2.3-ec.jar download
#
datanucleus.repo=http://www.datanucleus.org/downloads/maven2
ivy/libraries.properties :
datanucleus-connectionpool.version=2.0.3
datanucleus-core.version=2.1.1
datanucleus-enhancer.version=2.1.0-release
datanucleus-rdbms.version=2.1.1
metastore/ivy.xml :
<dependency org="org.datanucleus" name="datanucleus-connectionpool" rev="${datanucleus-connectionpool.version}">
<exclude module="proxool" />
<exclude module="c3p0" />
<exclude module="datanucleus-core" />
<exclude module="datanucleus-rdbms" />
<exclude module="commons-collections" />
<exclude module="commons-pool" />
<exclude module="commons-dbcp" />
<exclude org="com.jolbox" module="bonecp"/>
</dependency>
<dependency org="org.datanucleus" name="datanucleus-core" rev="${datanucleus-core.version}">
<exclude org="javax.jdo" module="jdo2-api"/>
<exclude org="org.apache.geronimo.specs" module="geronimo-jta_1.1_spec"/>
<exclude org="org.eclipse.equinox" module="org.eclipse.equinox.registry"/>
<exclude org="org.eclipse.equinox" module="org.eclipse.equinox.common"/>
<exclude org="org.eclipse.core" module="org.eclipse.core.runtime"/>
<exclude org="org.eclipse.osgi" module="org.eclipse.osgi"/>
<exclude org="log4j" module="log4j"/>
</dependency>
<dependency org="org.datanucleus" name="datanucleus-enhancer" rev="${datanucleus-enhancer.version}">
<exclude org="org.datanucleus" module="datanucleus-core"/>
<exclude org="javax.jdo" module="jdo2-api"/>
<exclude org="asm" module="asm"/>
<exclude org="org.apache.ant" module="ant"/>
</dependency>
<dependency org="org.datanucleus" name="datanucleus-rdbms" rev="${datanucleus-rdbms.version}">
<exclude org="org.datanucleus" module="datanucleus-core"/>
<exclude org="javax.jdo" module="jdo2-api"/>
<exclude org="org.apache.geronimo.specs" module="geronimo-jta_1.1_spec"/>
<exclude org="org.datanucleus" module="datanucleus-thirdparty"/>
<exclude org="org.apache.ant" module="ant"/>
<exclude org="oracle" module="ojdbc14_g"/>
</dependency>
http://www.jpox.org/servlet/jira/browse/NUCCORE-559?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
./hive --service start-hive
./hive --service stop-hive
hive的metastore使用了datanucleus
下载datanucleus-samples-jdo-tutorial-2.0-src.zip
解压datanucleus-samples-jdo-tutorial-2.0,把里面的lib目录,src目录,datanucleus.properties log4j.properties orm.xml都拷到另外一个目录下面
创建 target/classes文件。
修改datanucleus.properties文件为:
javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.jdo.JDOPersistenceManagerFactory
javax.jdo.option.ConnectionDriverName=com.mysql.jdbc.Driver
javax.jdo.option.ConnectionURL=jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true
javax.jdo.option.ConnectionUserName=hive
javax.jdo.option.ConnectionPassword=123456
javax.jdo.option.Mapping=hsql
datanucleus.metadata.validate=false
datanucleus.autoCreateSchema=true
datanucleus.validateTables=false
datanucleus.validateConstraints=false
加上下面这个选项会出现问题:Unable to fetch table ***
<property>
<name>datanucleus.cache.collections</name>
<value>false</value>
</property>
datanucleus.cache.level2.type 从 soft 改为 none
datanucleus.fixedDatastore = true; 出现问题。
https://issues.apache.org/jira/browse/HIVE-1841
hive-site.xml中加入下面的配置能够解决下面的问题:Failures with DELETEME tables
<property>
<name>datanucleus.fixedDatastore</name>
<value>true</value>
</property>
并发造成的错误:
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'dataoven_prod_hadoop.DELETEME1309959999747' doesn't exist
http://search-hadoop.com/m/bi3w92UVF3L/Failures+with+DELETEME+tables&subj=Failures+with+DELETEME+tables
The datastore exception was thrown because com.mysql.jdbc.DatabaseMetaData.getColumns has a race condition. It was called with tableNamePattern == null and because of that it went and fetched a list of all tables, and for each table, it executed a query to fetch table info. Before all table-info fetches were done, if a table were dropped by some other process, the fetch would fail and getColumns would throw an exception. This is a race condition bug.
For now, I have enabled datanucleus.fixedDatastore in hive-site.xml to eliminate the use of DELTEME tables, virtually eliminating the problem. But the problem can still happen with non-DELETEME causes due to the 2 bugs described above or when datanucleus.fixedDatastore needs to be disabled occasionally.
hiveserver take too much memory:
http://search-hadoop.com/m/PIsyn1GZxfh1&subj=java+lang+OutOfMemoryError+PermGen+space+when+running+as+a+service+
move all properties from jpox.properties to hive-site.xml
https://issues.apache.org/jira/browse/HIVE-610
操作如下:
编译生成的class文件到target/classes
tianzhao@tianzhao-VirtualBox:~/software/datanucleus/example$ javac -cp lib/jdo2-api-2.3-ec.jar:lib/datanucleus-core-2.0.3.jar -sourcepath src/java/ src/java/org/datanucleus/samples/jdo/tutorial/*.java -d target/classes
tianzhao@tianzhao-VirtualBox:~/software/datanucleus/example$ cp src/java/org/datanucleus/samples/jdo/tutorial/package-hsql.orm target/classes/org/datanucleus/samples/jdo/tutorial/
tianzhao@tianzhao-VirtualBox:~/software/datanucleus/example$ java -cp target/classes/:lib/datanucleus-enhancer-2.0.3.jar:lib/datanucleus-core-2.0.3.jar:lib/jdo2-api-2.3-ec.jar:lib/asm-3.1.jar org.datanucleus.enhancer.DataNucleusEnhancer target/classes/org/datanucleus/samples/jdo/tutorial/package-hsql.orm
在数据库中创建表
tianzhao@tianzhao-VirtualBox:~/software/datanucleus/example$ java -cp target/classes/:lib/datanucleus-rdbms-2.0.3.jar:lib/datanucleus-core-2.0.3.jar:lib/jdo2-api-2.3-ec.jar:lib/mysql-connector-java-5.1.6.jar org.datanucleus.store.rdbms.SchemaTool -props datanucleus.properties -create target/classes/org/datanucleus/samples/jdo/tutorial/package-hsql.orm
执行相关操作
tianzhao@tianzhao-VirtualBox:~/software/datanucleus/example$ java -cp lib/jdo2-api-2.3-ec.jar:lib/datanucleus-core-2.0.3.jar:lib/datanucleus-rdbms-2.0.3.jar:lib/mysql-connector-java-5.1.6.jar:target/classes/:. org.datanucleus.samples.jdo.tutorial.Main
datanucleus-samples-jdo-tutorial-2.0 下面有build.xml pom.xml两个文件
pom.xml
Files used by Maven2 for building and running the tutorial.
build.xml
File used by Ant for building the tutorial.
这里只是转成直接使用java 和 javac的的命令
hive用的datanucleus版本。
build.properties :
#
# Data nucleus repository - needed for jdo2-api-2.3-ec.jar download
#
datanucleus.repo=http://www.datanucleus.org/downloads/maven2
ivy/libraries.properties :
datanucleus-connectionpool.version=2.0.3
datanucleus-core.version=2.1.1
datanucleus-enhancer.version=2.1.0-release
datanucleus-rdbms.version=2.1.1
metastore/ivy.xml :
<dependency org="org.datanucleus" name="datanucleus-connectionpool" rev="${datanucleus-connectionpool.version}">
<exclude module="proxool" />
<exclude module="c3p0" />
<exclude module="datanucleus-core" />
<exclude module="datanucleus-rdbms" />
<exclude module="commons-collections" />
<exclude module="commons-pool" />
<exclude module="commons-dbcp" />
<exclude org="com.jolbox" module="bonecp"/>
</dependency>
<dependency org="org.datanucleus" name="datanucleus-core" rev="${datanucleus-core.version}">
<exclude org="javax.jdo" module="jdo2-api"/>
<exclude org="org.apache.geronimo.specs" module="geronimo-jta_1.1_spec"/>
<exclude org="org.eclipse.equinox" module="org.eclipse.equinox.registry"/>
<exclude org="org.eclipse.equinox" module="org.eclipse.equinox.common"/>
<exclude org="org.eclipse.core" module="org.eclipse.core.runtime"/>
<exclude org="org.eclipse.osgi" module="org.eclipse.osgi"/>
<exclude org="log4j" module="log4j"/>
</dependency>
<dependency org="org.datanucleus" name="datanucleus-enhancer" rev="${datanucleus-enhancer.version}">
<exclude org="org.datanucleus" module="datanucleus-core"/>
<exclude org="javax.jdo" module="jdo2-api"/>
<exclude org="asm" module="asm"/>
<exclude org="org.apache.ant" module="ant"/>
</dependency>
<dependency org="org.datanucleus" name="datanucleus-rdbms" rev="${datanucleus-rdbms.version}">
<exclude org="org.datanucleus" module="datanucleus-core"/>
<exclude org="javax.jdo" module="jdo2-api"/>
<exclude org="org.apache.geronimo.specs" module="geronimo-jta_1.1_spec"/>
<exclude org="org.datanucleus" module="datanucleus-thirdparty"/>
<exclude org="org.apache.ant" module="ant"/>
<exclude org="oracle" module="ojdbc14_g"/>
</dependency>
http://www.jpox.org/servlet/jira/browse/NUCCORE-559?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
发表评论
-
hive rename table name
2013-09-18 14:28 2600hive rename tablename hive re ... -
hive的distribute by如何partition long型的数据
2013-08-20 10:15 2480有用户问:hive的distribute by分桶是怎么分 ... -
hive like vs rlike vs regexp
2013-04-11 18:53 11216like vs rlike vs regexp r ... -
hive sql where条件很简单,但是太多
2012-07-18 15:51 8744insert overwrite table aaaa ... -
insert into时(string->bigint)自动类型转换
2012-06-14 12:30 8281原表src: hive> desc src; ... -
通过复合结构来优化udf的调用
2012-05-11 14:07 1210select split("accba&quo ... -
RegexSerDe
2012-03-14 09:58 1551官方示例在: https://cwiki.apache.or ... -
Hive 的 OutputCommitter
2012-01-30 19:44 1820Hive 的 OutputCommitter publi ... -
hive LATERAL VIEW 行转列
2011-11-09 14:49 5452drop table lateralview; create ... -
hive complex type
2011-11-08 19:56 1371数据: 1,100|3,20|2,70|5,100 建表: ... -
hive转义字符
2011-10-25 16:41 6245CREATE TABLE escape (id STRING, ... -
hive 两个不同类型的columns进行比较
2011-09-19 13:46 3039select case when "ab1234&q ... -
lateral view
2011-09-18 04:04 0lateral view与udtf相关 -
udf 中获得 FileSystem
2011-09-14 10:28 0在udf中获得FileSystem,需要获得知道fs.defa ... -
hive union mapjoin
2011-09-09 16:29 0union union.q union2.q ... -
hive eclipse
2011-09-08 17:42 0eclipse-templates$ vi .classpat ... -
hive join filter
2011-09-07 23:05 0join16.q.out hive.optimize.ppd ... -
hive limit
2011-09-07 21:02 0limit 关键字: input4_limit.q.out ... -
hive convertMapJoin MapJoinProcessor
2011-09-06 21:17 0join25.q join26 ... -
hive hive.merge.mapfiles hive.merge.mapredfiles
2011-09-06 19:14 0HiveConf: HIVEMERGEMAPFILES ...
相关推荐
赠送jar包:datanucleus-api-jdo-3.2.6.jar; 赠送原API文档:datanucleus-api-jdo-3.2.6-javadoc.jar; 赠送源代码:datanucleus-api-jdo-3.2.6-sources.jar; 赠送Maven依赖信息文件:datanucleus-api-jdo-3.2.6....
赠送jar包:datanucleus-rdbms-3.2.9.jar; 赠送原API文档:datanucleus-rdbms-3.2.9-javadoc.jar; 赠送源代码:datanucleus-rdbms-3.2.9-sources.jar; 赠送Maven依赖信息文件:datanucleus-rdbms-3.2.9.pom; ...
赠送jar包:datanucleus-rdbms-4.1.7.jar; 赠送原API文档:datanucleus-rdbms-4.1.7-javadoc.jar; 赠送源代码:datanucleus-rdbms-4.1.7-sources.jar; 赠送Maven依赖信息文件:datanucleus-rdbms-4.1.7.pom; ...
赠送jar包:datanucleus-core-3.2.10.jar; 赠送原API文档:datanucleus-core-3.2.10-javadoc.jar; 赠送源代码:datanucleus-core-3.2.10-sources.jar; 赠送Maven依赖信息文件:datanucleus-core-3.2.10.pom; ...
在这个示例中,我们将探讨如何使用DataNucleus框架通过Java Persistence API (JPA) 和 Java Data Objects (JDO) 访问MySQL数据库。DataNucleus是一个开源的持久性框架,它支持多种持久化标准,包括JPA和JDO,提供了...
赠送jar包:datanucleus-api-jdo-4.2.1.jar; 赠送原API文档:datanucleus-api-jdo-4.2.1-javadoc.jar; 赠送源代码:datanucleus-api-jdo-4.2.1-sources.jar; 赠送Maven依赖信息文件:datanucleus-api-jdo-4.2.1....
datanucleus-api-jdo-3.2.6.jar )
datanucleus-core-3.2.10.jar 下载。datanucleus-core-3.2.10.jar 下载。datanucleus-core-3.2.10.jar 下载。
maven-datanucleus-plugin-2.0.0-m2.jar
plugin.xml 是对datanucleus的jar包合并的资源文件,在对spark sql项目打包时,datanucleus自身配置文件文件重复而不能正常合并
maven-datanucleus-plugin-2.0.0-release.jar
赠送jar包:datanucleus-core-4.1.6.jar; 赠送原API文档:datanucleus-core-4.1.6-javadoc.jar; 赠送源代码:datanucleus-core-4.1.6-sources.jar; 赠送Maven依赖信息文件:datanucleus-core-4.1.6.pom; 包含...
《DataNucleus Spatial 3.2.3与Druid JDBC数据源的深度解析》 在IT领域,数据管理和高效的数据访问是至关重要的。这里我们将深入探讨两个关键组件:DataNucleus Spatial 3.2.3和Druid数据源。它们都是开源项目,为...
标题中的"datanucleus-jdo-jca-5.1.0-release.zip"是指DataNucleus JDO(Java Data Objects)与JCA(Java Connector Architecture)的5.1.0版本发布压缩包。DataNucleus是一个开源的对象关系映射(ORM)框架,它允许...
docs-datanucleus 该项目提供了网站的文档。 在v5.0及更高版本中,此版本使用了Maven“站点”插件和“ docs-datanucleus-skin”作为站点主题。 在5.1及更高版本中,它利用了AsciiDoc和Maven asciidoctor插件。 该...
datanucleus-测试dCache 中特定 DataNucleus 用例的测试。 (1) ----------------------------------------------- --------------------------- 测试用例 EnhancerHelperTest1EnhancerHelperTest2演示在与对象使用...
maven-datanucleus-plugin-3.1.1.jar
maven-datanucleus-plugin-3.1.2.jar
maven-datanucleus-plugin-3.1.3.jar