我试图从以下链接执行hcatalog
示例:
http://www.cloudera.com/content/cloudera/en/documentation/CDH4/v4-2-0/CDH4-installation-guide/CDH4IG_Topic_19_6.html
Exception in thread "main" com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: org/antlr/runtime/RecognitionException
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2232)
at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4764)
at org.apache.hcatalog.common.HiveClientCache.getOrCreate(HiveClientCache.java:167)
at org.apache.hcatalog.common.HiveClientCache.get(HiveClientCache.java:143)
at org.apache.hcatalog.common.HCatUtil.getHiveClient(HCatUtil.java:544)
at org.apache.hcatalog.mapreduce.InitializeInput.getInputJobInfo(InitializeInput.java:103)
at org.apache.hcatalog.mapreduce.InitializeInput.setInput(InitializeInput.java:85)
at org.apache.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:85)
at org.apache.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:54)
at org.apache.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:46)
at com.otsi.hcat.UseHCat.run(UseHCat.java:69)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at com.otsi.hcat.UseHCat.main(UseHCat.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: java.lang.NoClassDefFoundError: org/antlr/runtime/RecognitionException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.apache.hadoop.hive.metastore.MetaStoreUtils.getClass(MetaStoreUtils.java:1378)
at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:64)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:498)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:476)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:524)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:398)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.<init>(HiveMetaStore.java:357)
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:54)
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:59)
at org.apache.hadoop.hive.metastore.HiveMetaStore.newHMSHandler(HiveMetaStore.java:4948)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:171)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:154)
at org.apache.hcatalog.common.HiveClientCache$CacheableHiveMetaStoreClient.<init>(HiveClientCache.java:246)
at org.apache.hcatalog.common.HiveClientCache$4.call(HiveClientCache.java:170)
at org.apache.hcatalog.common.HiveClientCache$4.call(HiveClientCache.java:167)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4767)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
... 19 more
Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.RecognitionException
$hcatjar=$hcat_home/share/hcatalog/hcatalog-core-0.11.0.jar
$hcatpigjar=$hcat_home/share/hcatalog/hive-hcatalog-pig-adapter-0.13.0.jar
$export
$libjars=echo$hadoop_classpath sed-e的/:/,/g'
$export libjars=$libjars,$hive_home/lib/antlr-runtime-3.4.jar
我没有运行CDH发行版,但我能够通过以下配置设置完成这项工作:
export HCAT_HOME=/usr/lib/hive-hcatalog
export HIVE_HOME=/usr/lib/hive
HCATJAR=$HCAT_HOME/share/hcatalog/hive-hcatalog-core-0.13.0.2.1.1.0-385.jar
HCATPIGJAR=$HCAT_HOME/share/hcatalog/hive-hcatalog-pig-adapter-0.13.0.2.1.1.0-385.jar
HIVE_VERSION=0.13.0.2.1.1.0-385
export HADOOP_CLASSPATH=$HCATJAR:$HCATPIGJAR:$HIVE_HOME/lib/hive-exec-$HIVE_VERSION.jar:$HIVE_HOME/lib/hive-metastore-$HIVE_VERSION.jar:$HIVE_HOME/lib/libfb303-0.9.0.jar:$HIVE_HOME/lib/libthrift-0.9.0.jar:$HIVE_HOME/conf:/etc/hadoop/conf
LIBJARS=`echo $HADOOP_CLASSPATH | sed -e 's/:/,/g'`
export LIBJARS=$LIBJARS,$HIVE_HOME/lib/antlr-runtime-3.4.jar
有几件事需要注意:
ls-l
命令,以确保jar文件确实存在于您认为应该存在的位置。我希望这能帮上忙!
我们有配置了FreeIPA的HDP-2.2集群。但当我们试图通过knox访问HiveJDBC时,我们面临着一个问题。以下是我们正在使用的JDBC URI: jdbc: hive2://xxxxxxxxx: 8443/; ssl=true; sslTrustStore=/var/lib/Knox/data/Security/keystore/gateway.jks; Trust StorePassw
错误: hive-site.xml
我在java中开发了一个工作正常的配置单元udf,我的函数返回输入与配置单元表中列之间的最佳匹配,因此它有以下简化的伪代码: 我的问题是,如果这个函数是由Hive调用的,为什么我需要在代码中连接到Hive?我可以使用使用我的功能的用户所连接的当前连接吗?
配置单元版本:1.0 此简单查询失败,
Apache HCatalog是基于Apache Hadoop之上的数据表和存储管理服务。 包括: 提供一个共享的模式和数据类型的机制。 抽象出表,使用户不必关心他们的数据怎么存储。 提供可操作的跨数据处理工具,如Pig,MapReduce,Streaming,和Hive。
我设置了一个AWS EMR集群,其中包括Spark 2.3.2、hive 2.3.3和hbase 1.4.7。如何配置Spark以访问hive表? 我采取了以下步骤,但结果是错误消息: Java语言lang.ClassNotFoundException:java。lang.NoClassDefFoundError:org/apache/tez/dag/api/SessionNotRunning使用