- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试使用 Spark Java 连接到 Hive。当我通过 Spark 在 Hive 中运行任何查询时,它会返回如下异常:
16/10/06 09:37:56 ERROR metastore.RetryingHMSHandler: AlreadyExistsException(message:Database default already exists)
我的版本是:
星火 2.0.0
hive 1.0.0
这是我的全部堆栈:
16/10/06 09:37:56 ERROR metastore.RetryingHMSHandler: AlreadyExistsException(message:Database default already exists)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_database(HiveMetaStore.java:891)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
at com.sun.proxy.$Proxy14.create_database(Unknown Source)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createDatabase(HiveMetaStoreClient.java:644)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:156)
at com.sun.proxy.$Proxy15.createDatabase(Unknown Source)
at org.apache.hadoop.hive.ql.metadata.Hive.createDatabase(Hive.java:306)
at org.apache.spark.sql.hive.client.HiveClientImpl$$anonfun$createDatabase$1.apply$mcV$sp(HiveClientImpl.scala:291)
at org.apache.spark.sql.hive.client.HiveClientImpl$$anonfun$createDatabase$1.apply(HiveClientImpl.scala:291)
at org.apache.spark.sql.hive.client.HiveClientImpl$$anonfun$createDatabase$1.apply(HiveClientImpl.scala:291)
at org.apache.spark.sql.hive.client.HiveClientImpl$$anonfun$withHiveState$1.apply(HiveClientImpl.scala:262)
at org.apache.spark.sql.hive.client.HiveClientImpl.liftedTree1$1(HiveClientImpl.scala:209)
at org.apache.spark.sql.hive.client.HiveClientImpl.retryLocked(HiveClientImpl.scala:208)
at org.apache.spark.sql.hive.client.HiveClientImpl.withHiveState(HiveClientImpl.scala:251)
at org.apache.spark.sql.hive.client.HiveClientImpl.createDatabase(HiveClientImpl.scala:290)
at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$createDatabase$1.apply$mcV$sp(HiveExternalCatalog.scala:99)
at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$createDatabase$1.apply(HiveExternalCatalog.scala:99)
at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$createDatabase$1.apply(HiveExternalCatalog.scala:99)
at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:72)
at org.apache.spark.sql.hive.HiveExternalCatalog.createDatabase(HiveExternalCatalog.scala:98)
at org.apache.spark.sql.catalyst.catalog.SessionCatalog.createDatabase(SessionCatalog.scala:147)
at org.apache.spark.sql.catalyst.catalog.SessionCatalog.<init>(SessionCatalog.scala:89)
at org.apache.spark.sql.hive.HiveSessionCatalog.<init>(HiveSessionCatalog.scala:51)
at org.apache.spark.sql.hive.HiveSessionState.catalog$lzycompute(HiveSessionState.scala:49)
at org.apache.spark.sql.hive.HiveSessionState.catalog(HiveSessionState.scala:48)
at org.apache.spark.sql.hive.HiveSessionState$$anon$1.<init>(HiveSessionState.scala:63)
at org.apache.spark.sql.hive.HiveSessionState.analyzer$lzycompute(HiveSessionState.scala:63)
at org.apache.spark.sql.hive.HiveSessionState.analyzer(HiveSessionState.scala:62)
at org.apache.spark.sql.execution.QueryExecution.assertAnalyzed(QueryExecution.scala:49)
at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:64)
at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:582)
at in.inndata.sparkjoinsexamples.SparkJoinExample.main(SparkJoinExample.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:729)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:185)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:210)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:124)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
16/10/06 09:37:57 INFO metastore.HiveMetaStore: 0: get_database: default
16/10/06 09:37:57 INFO HiveMetaStore.audit: ugi=karuturi ip=unknown-ip-addr cmd=get_database: default
16/10/06 09:37:57 INFO metastore.HiveMetaStore: 0: get_table : db=default tbl=aaa
16/10/06 09:37:57 INFO HiveMetaStore.audit: ugi=karuturi ip=unknown-ip-addr cmd=get_table : db=default tbl=aaa
Exception in thread "main" org.apache.spark.sql.AnalysisException: Table or view not found: `default`.`aaa`; line 1 pos 14
at org.apache.spark.sql.catalyst.analysis.package$AnalysisErrorAt.failAnalysis(package.scala:42)
at org.apache.spark.sql.catalyst.analysis.CheckAnalysis$$anonfun$checkAnalysis$1.apply(CheckAnalysis.scala:71)
at org.apache.spark.sql.catalyst.analysis.CheckAnalysis$$anonfun$checkAnalysis$1.apply(CheckAnalysis.scala:67)
at org.apache.spark.sql.catalyst.trees.TreeNode.foreachUp(TreeNode.scala:126)
at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$foreachUp$1.apply(TreeNode.scala:125)
at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$foreachUp$1.apply(TreeNode.scala:125)
at scala.collection.immutable.List.foreach(List.scala:381)
at org.apache.spark.sql.catalyst.trees.TreeNode.foreachUp(TreeNode.scala:125)
at org.apache.spark.sql.catalyst.analysis.CheckAnalysis$class.checkAnalysis(CheckAnalysis.scala:67)
at org.apache.spark.sql.catalyst.analysis.Analyzer.checkAnalysis(Analyzer.scala:58)
at org.apache.spark.sql.execution.QueryExecution.assertAnalyzed(QueryExecution.scala:49)
at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:64)
at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:582)
at in.inndata.sparkjoinsexamples.SparkJoinExample.main(SparkJoinExample.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:729)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:185)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:210)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:124)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
16/10/06 09:37:57 INFO spark.SparkContext: Invoking stop() from shutdown hook
16/10/06 09:37:57 INFO server.ServerConnector: Stopped ServerConnector@3f20e4fa{HTTP/1.1}{0.0.0.0:4040}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@1bdf8190{/stages/stage/kill,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@4f8969b0{/api,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@6fefce9e{/,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@74cec793{/static,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@f9b7332{/executors/threadDump/json,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@18e7143f{/executors/threadDump,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@209775a9{/executors/json,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@5db4c359{/executors,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@2c177f9e{/environment/json,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@33617539{/environment,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@47874b25{/storage/rdd/json,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@290b1b2e{/storage/rdd,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@1fc0053e{/storage/json,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@77307458{/storage,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@389adf1d{/stages/pool/json,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@7bf9b098{/stages/pool,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@72e34f77{/stages/stage/json,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@6e9319f{/stages/stage,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@6fa590ba{/stages/json,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@2416a51{/stages,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@293bb8a5{/jobs/job/json,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@37ebc9d8{/jobs/job,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@5217f3d0{/jobs/json,null,UNAVAILABLE}
16/10/06 09:37:57 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@32232e55{/jobs,null,UNAVAILABLE}
16/10/06 09:37:57 INFO ui.SparkUI: Stopped Spark web UI at http://192.168.1.131:4040
16/10/06 09:37:57 INFO spark.MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!
16/10/06 09:37:57 INFO memory.MemoryStore: MemoryStore cleared
16/10/06 09:37:57 INFO storage.BlockManager: BlockManager stopped
16/10/06 09:37:57 INFO storage.BlockManagerMaster: BlockManagerMaster stopped
16/10/06 09:37:57 INFO scheduler.OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!
16/10/06 09:37:57 INFO spark.SparkContext: Successfully stopped SparkContext
16/10/06 09:37:57 INFO util.ShutdownHookManager: Shutdown hook called
16/10/06 09:37:57 INFO util.ShutdownHookManager: Deleting directory /private/var/folders/6n/nrvn14r50tvdvcfdds6jxyx40000gn/T/spark-b0f5733d-a475-4289-956d-c2650d9792d0
这是我的 Spark 代码:
public static void main(String[] arr){
SparkSession session = new SparkSession.Builder().appName("SparkJoinExample").master("local").enableHiveSupport().getOrCreate();
Dataset<Row> dset = session.sql("select * from test.results");
}
最佳答案
它将在您的 $HOME 文件夹中创建一个 Metastore,在 Metastore 中只需删除 dbex.lck
关于java - Spark 2.0.0 抛出 AlreadyExistsException(消息 :Database default already exists) when interact with Hive 1. 0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39887437/
自从我开始工作(约 6 年)以来,我一直是 .NET 的一员。最近在做一个使用Django的项目,需要并行学习Python。很多时候我碰到的 Python 代码看起来很简单,但我就是看不懂。这是其中之
谁能解释一下 JLS §8.4.8.4 中提到的“严格的default-abstract 和default-default 冲突规则” . 它们是否在 JLS 中定义?我似乎找不到他们的定义。 最佳答
我在我的启动图像通用项目中添加了“Default.png,Default-568h@2x.png,Default@2x.png”这三个文件,我有三个不同的图像,分辨率与苹果中提到的完全相同文档,适用于
我试图在删除 AWS RDS MySQL 数据库后删除默认的数据库参数组,但出现以下错误 Failed to delete default.mysql8.0: Default DBParameterG
我想使用 firebase 云函数发送通知,所以我尝试使用 firebase.messaging().getToken() 获取 token ,但我不断收到错误消息: TypeError: fireb
无法通过 Instagram 登录我的应用。我正在使用 react-native instagram 包,但我面临这个问题,因为 _react3.default.creteRef() 不是一个函数。引
从 Rust 1.6 开始,当前特征 Default定义为, pub trait Default { fn default() -> Self; } 为什么不是这个 pub trait Def
在我的第一次代码审查(不久前)中,我被告知在所有 switch 语句中包含默认子句是一种很好的做法。我最近想起了这个建议,但不记得其理由是什么。现在对我来说听起来很奇怪。 始终包含默认语句是否有合理的
这个错误很奇怪。在 firebase 中 react native 有什么问题我已经通过 npm install 安装了 firebase这是我的代码 import React, {Component
对于以下 3 种编译情况: gcc -o helloc hello.c (1) g++ -o hellocpp hello.cpp
我有一个 switch 语句。它几乎可以正常工作,但是它不仅显示一个案例,还显示选定的案例,然后显示默认案例。这是我的代码: var people = { names: ["Sam", "Tim"
这个问题在这里已经有了答案: Default keyword in Swift parameter (1 个回答) 关闭 6 年前。 我试图理解前置条件函数并遇到了“= default”。快速谷歌和
禁止!配置的服务帐户无权访问。服务帐户可能已被撤销。用户“system:serviceaccount:default:default”无法获取命名空间“mycomp-services-process”
我一直在我的 React 中广泛使用命名导出和默认导出,我遇到了这 2 个相似的语法。 从'./Button'导出默认值; export { default } from './Button'; 有人
我很困惑什么时候使用 .prototype 来扩展一个对象,什么时候不使用它。像下面的部分代码,为什么不在FacebookApi.defaults中使用.prototype,难道.prototype只
这个问题在这里已经有了答案: What is the difference between "var=${var:-word}" and "var=${var:=word}"? (4 个答案) 关闭
我想创建一个数据类基类,其中子类中的所有字段都自动可选且默认为无(如果未提供默认值)。 下面的代码……几乎可以满足我的要求,但又不完全是。它出错的方式就像我从未编写过 __init_subclass_
所以我有三个 Typescript 文件: 配置/env/development.ts import { Config } from '../config'; class DevConfig {
我在一个名为 Activity 的表中添加了一个名为 Ordinal 的新列。问题是我给了它一个 UNIQUE 约束,将它设置为允许 NULL(尽管我最终不会想要这个。我只需要将它设置为那个以使脚本更
嗨,我是 struts2 的新手,在我的项目中,我在注册页面使用 json-default 扩展,并使用validation.xml 文件验证它,在同一个项目中,我在登录页面使用 struts-def
我是一名优秀的程序员,十分优秀!