[ https://issues.apache.org/jira/browse/SPARK-5286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14280827#comment-14280827 ]
Apache Spark commented on SPARK-5286: ------------------------------------- User 'yhuai' has created a pull request for this issue: https://github.com/apache/spark/pull/4076 > Fail to drop an invalid table when using the data source API > ------------------------------------------------------------ > > Key: SPARK-5286 > URL: https://issues.apache.org/jira/browse/SPARK-5286 > Project: Spark > Issue Type: Bug > Components: SQL > Reporter: Yin Huai > Priority: Critical > > Example > {code} > CREATE TABLE jsonTable > USING org.apache.spark.sql.json.DefaultSource > OPTIONS ( > path 'it is not a path at all!' > ) > DROP TABLE jsonTable > {code} > We will get > {code} > [info] com.google.common.util.concurrent.UncheckedExecutionException: > org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: > file:/Users/yhuai/Projects/Spark/spark/sql/hive/it is not a path at all! > [info] at > com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4882) > [info] at > com.google.common.cache.LocalCache$LocalLoadingCache.apply(LocalCache.java:4898) > [info] at > org.apache.spark.sql.hive.HiveMetastoreCatalog.lookupRelation(HiveMetastoreCatalog.scala:147) > [info] at > org.apache.spark.sql.hive.HiveContext$$anon$2.org$apache$spark$sql$catalyst$analysis$OverrideCatalog$$super$lookupRelation(HiveContext.scala:241) > [info] at > org.apache.spark.sql.catalyst.analysis.OverrideCatalog$$anonfun$lookupRelation$3.apply(Catalog.scala:137) > [info] at > org.apache.spark.sql.catalyst.analysis.OverrideCatalog$$anonfun$lookupRelation$3.apply(Catalog.scala:137) > [info] at scala.Option.getOrElse(Option.scala:120) > [info] at > org.apache.spark.sql.catalyst.analysis.OverrideCatalog$class.lookupRelation(Catalog.scala:137) > [info] at > org.apache.spark.sql.hive.HiveContext$$anon$2.lookupRelation(HiveContext.scala:241) > [info] at org.apache.spark.sql.SQLContext.table(SQLContext.scala:332) > [info] at > org.apache.spark.sql.hive.execution.DropTable.run(commands.scala:57) > [info] at > org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult$lzycompute(commands.scala:53) > [info] at > org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult(commands.scala:53) > [info] at > org.apache.spark.sql.execution.ExecutedCommand.execute(commands.scala:61) > [info] at > org.apache.spark.sql.SQLContext$QueryExecution.toRdd$lzycompute(SQLContext.scala:472) > [info] at > org.apache.spark.sql.SQLContext$QueryExecution.toRdd(SQLContext.scala:472) > [info] at > org.apache.spark.sql.SchemaRDDLike$class.$init$(SchemaRDDLike.scala:58) > [info] at org.apache.spark.sql.SchemaRDD.<init>(SchemaRDD.scala:108) > [info] at org.apache.spark.sql.hive.HiveContext.sql(HiveContext.scala:73) > [info] at > org.apache.spark.sql.hive.MetastoreDataSourcesSuite$$anonfun$9.apply$mcV$sp(MetastoreDataSourcesSuite.scala:258) > [info] at > org.apache.spark.sql.hive.MetastoreDataSourcesSuite$$anonfun$9.apply(MetastoreDataSourcesSuite.scala:246) > [info] at > org.apache.spark.sql.hive.MetastoreDataSourcesSuite$$anonfun$9.apply(MetastoreDataSourcesSuite.scala:246) > [info] at > org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) > [info] at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) > [info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) > [info] at org.scalatest.Transformer.apply(Transformer.scala:22) > [info] at org.scalatest.Transformer.apply(Transformer.scala:20) > [info] at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166) > [info] at org.scalatest.Suite$class.withFixture(Suite.scala:1122) > [info] at org.scalatest.FunSuite.withFixture(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) > [info] at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175) > [info] at > org.apache.spark.sql.hive.MetastoreDataSourcesSuite.org$scalatest$BeforeAndAfterEach$$super$runTest(MetastoreDataSourcesSuite.scala:36) > [info] at > org.scalatest.BeforeAndAfterEach$class.runTest(BeforeAndAfterEach.scala:255) > [info] at > org.apache.spark.sql.hive.MetastoreDataSourcesSuite.runTest(MetastoreDataSourcesSuite.scala:36) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) > [info] at scala.collection.immutable.List.foreach(List.scala:318) > [info] at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) > [info] at > org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) > [info] at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) > [info] at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208) > [info] at org.scalatest.FunSuite.runTests(FunSuite.scala:1555) > [info] at org.scalatest.Suite$class.run(Suite.scala:1424) > [info] at > org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at org.scalatest.SuperEngine.runImpl(Engine.scala:545) > [info] at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212) > [info] at org.scalatest.FunSuite.run(FunSuite.scala:1555) > [info] at > org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:462) > [info] at > org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:671) > [info] at sbt.ForkMain$Run$2.call(ForkMain.java:294) > [info] at sbt.ForkMain$Run$2.call(ForkMain.java:284) > [info] at java.util.concurrent.FutureTask.run(FutureTask.java:262) > [info] at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > [info] at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > [info] at java.lang.Thread.run(Thread.java:745) > [info] Cause: org.apache.hadoop.mapred.InvalidInputException: Input path > does not exist: file:/Users/yhuai/Projects/Spark/spark/sql/hive/it is not a > path at all! > [info] at > org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:197) > [info] at > org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:208) > [info] at org.apache.spark.rdd.HadoopRDD.getPartitions(HadoopRDD.scala:201) > [info] at > org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:206) > [info] at > org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:204) > [info] at scala.Option.getOrElse(Option.scala:120) > [info] at org.apache.spark.rdd.RDD.partitions(RDD.scala:204) > [info] at > org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:32) > [info] at > org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:206) > [info] at > org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:204) > [info] at scala.Option.getOrElse(Option.scala:120) > [info] at org.apache.spark.rdd.RDD.partitions(RDD.scala:204) > [info] at > org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:32) > [info] at > org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:206) > [info] at > org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:204) > [info] at scala.Option.getOrElse(Option.scala:120) > [info] at org.apache.spark.rdd.RDD.partitions(RDD.scala:204) > [info] at > org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:32) > [info] at > org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:206) > [info] at > org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:204) > [info] at scala.Option.getOrElse(Option.scala:120) > [info] at org.apache.spark.rdd.RDD.partitions(RDD.scala:204) > [info] at org.apache.spark.SparkContext.runJob(SparkContext.scala:1367) > [info] at org.apache.spark.rdd.RDD.reduce(RDD.scala:881) > [info] at org.apache.spark.sql.json.JsonRDD$.inferSchema(JsonRDD.scala:54) > [info] at > org.apache.spark.sql.json.JSONRelation$$anonfun$schema$1.apply(JSONRelation.scala:60) > [info] at > org.apache.spark.sql.json.JSONRelation$$anonfun$schema$1.apply(JSONRelation.scala:59) > [info] at scala.Option.getOrElse(Option.scala:120) > [info] at > org.apache.spark.sql.json.JSONRelation.schema$lzycompute(JSONRelation.scala:58) > [info] at > org.apache.spark.sql.json.JSONRelation.schema(JSONRelation.scala:58) > [info] at > org.apache.spark.sql.sources.LogicalRelation.<init>(LogicalRelation.scala:30) > [info] at > org.apache.spark.sql.hive.HiveMetastoreCatalog$$anon$2.load(HiveMetastoreCatalog.scala:85) > [info] at > org.apache.spark.sql.hive.HiveMetastoreCatalog$$anon$2.load(HiveMetastoreCatalog.scala:63) > [info] at > com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599) > [info] at > com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2379) > [info] at > com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342) > [info] at > com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2257) > [info] at com.google.common.cache.LocalCache.get(LocalCache.java:4000) > [info] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4004) > [info] at > com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874) > [info] at > com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4880) > [info] at > com.google.common.cache.LocalCache$LocalLoadingCache.apply(LocalCache.java:4898) > [info] at > org.apache.spark.sql.hive.HiveMetastoreCatalog.lookupRelation(HiveMetastoreCatalog.scala:147) > [info] at > org.apache.spark.sql.hive.HiveContext$$anon$2.org$apache$spark$sql$catalyst$analysis$OverrideCatalog$$super$lookupRelation(HiveContext.scala:241) > [info] at > org.apache.spark.sql.catalyst.analysis.OverrideCatalog$$anonfun$lookupRelation$3.apply(Catalog.scala:137) > [info] at > org.apache.spark.sql.catalyst.analysis.OverrideCatalog$$anonfun$lookupRelation$3.apply(Catalog.scala:137) > [info] at scala.Option.getOrElse(Option.scala:120) > [info] at > org.apache.spark.sql.catalyst.analysis.OverrideCatalog$class.lookupRelation(Catalog.scala:137) > [info] at > org.apache.spark.sql.hive.HiveContext$$anon$2.lookupRelation(HiveContext.scala:241) > [info] at org.apache.spark.sql.SQLContext.table(SQLContext.scala:332) > [info] at > org.apache.spark.sql.hive.execution.DropTable.run(commands.scala:57) > [info] at > org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult$lzycompute(commands.scala:53) > [info] at > org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult(commands.scala:53) > [info] at > org.apache.spark.sql.execution.ExecutedCommand.execute(commands.scala:61) > [info] at > org.apache.spark.sql.SQLContext$QueryExecution.toRdd$lzycompute(SQLContext.scala:472) > [info] at > org.apache.spark.sql.SQLContext$QueryExecution.toRdd(SQLContext.scala:472) > [info] at > org.apache.spark.sql.SchemaRDDLike$class.$init$(SchemaRDDLike.scala:58) > [info] at org.apache.spark.sql.SchemaRDD.<init>(SchemaRDD.scala:108) > [info] at org.apache.spark.sql.hive.HiveContext.sql(HiveContext.scala:73) > [info] at > org.apache.spark.sql.hive.MetastoreDataSourcesSuite$$anonfun$9.apply$mcV$sp(MetastoreDataSourcesSuite.scala:258) > [info] at > org.apache.spark.sql.hive.MetastoreDataSourcesSuite$$anonfun$9.apply(MetastoreDataSourcesSuite.scala:246) > [info] at > org.apache.spark.sql.hive.MetastoreDataSourcesSuite$$anonfun$9.apply(MetastoreDataSourcesSuite.scala:246) > [info] at > org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) > [info] at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) > [info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) > [info] at org.scalatest.Transformer.apply(Transformer.scala:22) > [info] at org.scalatest.Transformer.apply(Transformer.scala:20) > [info] at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166) > [info] at org.scalatest.Suite$class.withFixture(Suite.scala:1122) > [info] at org.scalatest.FunSuite.withFixture(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) > [info] at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175) > [info] at > org.apache.spark.sql.hive.MetastoreDataSourcesSuite.org$scalatest$BeforeAndAfterEach$$super$runTest(MetastoreDataSourcesSuite.scala:36) > [info] at > org.scalatest.BeforeAndAfterEach$class.runTest(BeforeAndAfterEach.scala:255) > [info] at > org.apache.spark.sql.hive.MetastoreDataSourcesSuite.runTest(MetastoreDataSourcesSuite.scala:36) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) > [info] at scala.collection.immutable.List.foreach(List.scala:318) > [info] at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) > [info] at > org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) > [info] at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) > [info] at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208) > [info] at org.scalatest.FunSuite.runTests(FunSuite.scala:1555) > [info] at org.scalatest.Suite$class.run(Suite.scala:1424) > [info] at > org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at org.scalatest.SuperEngine.runImpl(Engine.scala:545) > [info] at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212) > [info] at org.scalatest.FunSuite.run(FunSuite.scala:1555) > [info] at > org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:462) > [info] at > org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:671) > [info] at sbt.ForkMain$Run$2.call(ForkMain.java:294) > [info] at sbt.ForkMain$Run$2.call(ForkMain.java:284) > [info] at java.util.concurrent.FutureTask.run(FutureTask.java:262) > [info] at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > [info] at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > [info] at java.lang.Thread.run(Thread.java:745) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org