[ https://issues.apache.org/jira/browse/SPARK-8333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17056710#comment-17056710 ]
Saeed Hassanvand edited comment on SPARK-8333 at 3/11/20, 7:35 AM: ------------------------------------------------------------------- Hi, It seems that this bug still exists! I encountered this issue in JavaSparkContext, not HiveContext. {{20/03/10 15:28:12 INFO SparkUI: Stopped Spark web UI at [http://DESKTOP-0H2AC9E:4040|http://desktop-0h2ac9e:4040/]}} {{20/03/10 15:28:12 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!}} {{20/03/10 15:28:12 INFO MemoryStore: MemoryStore cleared}} {{20/03/10 15:28:12 INFO BlockManager: BlockManager stopped}} {{20/03/10 15:28:12 INFO BlockManagerMaster: BlockManagerMaster stopped}} {{20/03/10 15:28:12 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!}} {{20/03/10 15:28:12 WARN SparkEnv: Exception while deleting Spark temp dir: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49}} {{java.io.IOException: Failed to delete: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49\simple-spark-app-1.0-SNAPSHOT.jar}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:144)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:128)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:91)}} \{{ at org.apache.spark.util.Utils$.deleteRecursively(Utils.scala:1062)}} \{{ at org.apache.spark.SparkEnv.stop(SparkEnv.scala:103)}} \{{ at org.apache.spark.SparkContext$$anonfun$stop$11.apply$mcV$sp(SparkContext.scala:1974)}} \{{ at org.apache.spark.util.Utils$.tryLogNonFatalError(Utils.scala:1340)}} \{{ at org.apache.spark.SparkContext.stop(SparkContext.scala:1973)}} \{{ at org.apache.spark.sql.SparkSession.stop(SparkSession.scala:712)}} \{{ at org.example.Application.main(Application.java:18)}} \{{ 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.JavaMainApplication.start(SparkApplication.scala:52)}} \{{ at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:845)}} \{{ at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:161)}} \{{ at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:184)}} \{{ at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)}} \{{ at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:920)}} \{{ at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:929)}} \{{ at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)}} {{20/03/10 15:28:12 INFO SparkContext: Successfully stopped SparkContext}} {{20/03/10 15:28:12 INFO ShutdownHookManager: Shutdown hook called}} {{20/03/10 15:28:12 INFO ShutdownHookManager: Deleting directory C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49}} {{20/03/10 15:28:12 ERROR ShutdownHookManager: Exception while deleting Spark temp dir: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49}} {{java.io.IOException: Failed to delete: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49\simple-spark-app-1.0-SNAPSHOT.jar}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:144)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:128)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:91)}} \{{ at org.apache.spark.util.Utils$.deleteRecursively(Utils.scala:1062)}} \{{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1$$anonfun$apply$mcV$sp$3.apply(ShutdownHookManager.scala:65)}} \{{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1$$anonfun$apply$mcV$sp$3.apply(ShutdownHookManager.scala:62)}} \{{ at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)}} \{{ at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)}} \{{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1.apply$mcV$sp(ShutdownHookManager.scala:62)}} \{{ at org.apache.spark.util.SparkShutdownHook.run(ShutdownHookManager.scala:216)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1945)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply$mcV$sp(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:188)}} \{{ at scala.util.Try$.apply(Try.scala:192)}} \{{ at org.apache.spark.util.SparkShutdownHookManager.runAll(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anon$2.run(ShutdownHookManager.scala:178)}} \{{ at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:54)}} {{20/03/10 15:28:12 INFO ShutdownHookManager: Deleting directory C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36}} {{20/03/10 15:28:12 ERROR ShutdownHookManager: Exception while deleting Spark temp dir: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36}} {{java.io.IOException: Failed to delete: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49\simple-spark-app-1.0-SNAPSHOT.jar}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:144)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:128)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:128)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} \{{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:91)}} \{{ at org.apache.spark.util.Utils$.deleteRecursively(Utils.scala:1062)}} \{{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1$$anonfun$apply$mcV$sp$3.apply(ShutdownHookManager.scala:65)}} \{{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1$$anonfun$apply$mcV$sp$3.apply(ShutdownHookManager.scala:62)}} \{{ at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)}} \{{ at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)}} \{{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1.apply$mcV$sp(ShutdownHookManager.scala:62)}} \{{ at org.apache.spark.util.SparkShutdownHook.run(ShutdownHookManager.scala:216)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1945)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply$mcV$sp(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:188)}} \{{ at scala.util.Try$.apply(Try.scala:192)}} \{{ at org.apache.spark.util.SparkShutdownHookManager.runAll(ShutdownHookManager.scala:188)}} \{{ at org.apache.spark.util.SparkShutdownHookManager$$anon$2.run(ShutdownHookManager.scala:178)}} \{{ at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:54)}} $HADOOP_HOME: C:\winutils\bin\winutils.exe Spark Version: spark-2.4.5-bin-hadoop2.7 Windows 10 Tnx. was (Author: saeedhassanvand): Hi, It seems that this bug still exists! I encountered this issue in javaSparkContext, not hiveContext. {{20/03/10 15:28:12 INFO SparkUI: Stopped Spark web UI at http://DESKTOP-0H2AC9E:4040}} {{20/03/10 15:28:12 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!}} {{20/03/10 15:28:12 INFO MemoryStore: MemoryStore cleared}} {{20/03/10 15:28:12 INFO BlockManager: BlockManager stopped}} {{20/03/10 15:28:12 INFO BlockManagerMaster: BlockManagerMaster stopped}} {{20/03/10 15:28:12 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!}} {{20/03/10 15:28:12 WARN SparkEnv: Exception while deleting Spark temp dir: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49}} {{java.io.IOException: Failed to delete: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49\simple-spark-app-1.0-SNAPSHOT.jar}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:144)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:128)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:91)}} {{ at org.apache.spark.util.Utils$.deleteRecursively(Utils.scala:1062)}} {{ at org.apache.spark.SparkEnv.stop(SparkEnv.scala:103)}} {{ at org.apache.spark.SparkContext$$anonfun$stop$11.apply$mcV$sp(SparkContext.scala:1974)}} {{ at org.apache.spark.util.Utils$.tryLogNonFatalError(Utils.scala:1340)}} {{ at org.apache.spark.SparkContext.stop(SparkContext.scala:1973)}} {{ at org.apache.spark.sql.SparkSession.stop(SparkSession.scala:712)}} {{ at org.example.Application.main(Application.java:18)}} {{ 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.JavaMainApplication.start(SparkApplication.scala:52)}} {{ at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:845)}} {{ at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:161)}} {{ at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:184)}} {{ at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)}} {{ at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:920)}} {{ at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:929)}} {{ at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)}} {{20/03/10 15:28:12 INFO SparkContext: Successfully stopped SparkContext}} {{20/03/10 15:28:12 INFO ShutdownHookManager: Shutdown hook called}} {{20/03/10 15:28:12 INFO ShutdownHookManager: Deleting directory C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49}} {{20/03/10 15:28:12 ERROR ShutdownHookManager: Exception while deleting Spark temp dir: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49}} {{java.io.IOException: Failed to delete: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49\simple-spark-app-1.0-SNAPSHOT.jar}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:144)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:128)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:91)}} {{ at org.apache.spark.util.Utils$.deleteRecursively(Utils.scala:1062)}} {{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1$$anonfun$apply$mcV$sp$3.apply(ShutdownHookManager.scala:65)}} {{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1$$anonfun$apply$mcV$sp$3.apply(ShutdownHookManager.scala:62)}} {{ at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)}} {{ at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)}} {{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1.apply$mcV$sp(ShutdownHookManager.scala:62)}} {{ at org.apache.spark.util.SparkShutdownHook.run(ShutdownHookManager.scala:216)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1945)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply$mcV$sp(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:188)}} {{ at scala.util.Try$.apply(Try.scala:192)}} {{ at org.apache.spark.util.SparkShutdownHookManager.runAll(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anon$2.run(ShutdownHookManager.scala:178)}} {{ at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:54)}} {{20/03/10 15:28:12 INFO ShutdownHookManager: Deleting directory C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36}} {{20/03/10 15:28:12 ERROR ShutdownHookManager: Exception while deleting Spark temp dir: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36}} {{java.io.IOException: Failed to delete: C:\Users\pc-monster\AppData\Local\Temp\spark-e5bd78e4-5161-471c-9a51-4cafd16ffd36\userFiles-624b6e50-2079-46eb-b703-a121925a4e49\simple-spark-app-1.0-SNAPSHOT.jar}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:144)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:128)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursivelyUsingJavaIO(JavaUtils.java:128)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:118)}} {{ at org.apache.spark.network.util.JavaUtils.deleteRecursively(JavaUtils.java:91)}} {{ at org.apache.spark.util.Utils$.deleteRecursively(Utils.scala:1062)}} {{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1$$anonfun$apply$mcV$sp$3.apply(ShutdownHookManager.scala:65)}} {{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1$$anonfun$apply$mcV$sp$3.apply(ShutdownHookManager.scala:62)}} {{ at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)}} {{ at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)}} {{ at org.apache.spark.util.ShutdownHookManager$$anonfun$1.apply$mcV$sp(ShutdownHookManager.scala:62)}} {{ at org.apache.spark.util.SparkShutdownHook.run(ShutdownHookManager.scala:216)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1945)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply$mcV$sp(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:188)}} {{ at scala.util.Try$.apply(Try.scala:192)}} {{ at org.apache.spark.util.SparkShutdownHookManager.runAll(ShutdownHookManager.scala:188)}} {{ at org.apache.spark.util.SparkShutdownHookManager$$anon$2.run(ShutdownHookManager.scala:178)}} {{ at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:54)}} $HADOOP_HOME: C:\winutils\bin\winutils.exe Spark Version: spark-2.4.5-bin-hadoop2.7 Windows 10 Tnx. > Spark failed to delete temp directory created by HiveContext > ------------------------------------------------------------ > > Key: SPARK-8333 > URL: https://issues.apache.org/jira/browse/SPARK-8333 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 1.4.0 > Environment: Windows7 64bit > Reporter: sheng > Priority: Minor > Labels: Hive, bulk-closed, metastore, sparksql > Attachments: test.tar > > > Spark 1.4.0 failed to stop SparkContext. > {code:title=LocalHiveTest.scala|borderStyle=solid} > val sc = new SparkContext("local", "local-hive-test", new SparkConf()) > val hc = Utils.createHiveContext(sc) > ... // execute some HiveQL statements > sc.stop() > {code} > sc.stop() failed to execute, it threw the following exception: > {quote} > 15/06/13 03:19:06 INFO Utils: Shutdown hook called > 15/06/13 03:19:06 INFO Utils: Deleting directory > C:\Users\moshangcheng\AppData\Local\Temp\spark-d6d3c30e-512e-4693-a436-485e2af4baea > 15/06/13 03:19:06 ERROR Utils: Exception while deleting Spark temp dir: > C:\Users\moshangcheng\AppData\Local\Temp\spark-d6d3c30e-512e-4693-a436-485e2af4baea > java.io.IOException: Failed to delete: > C:\Users\moshangcheng\AppData\Local\Temp\spark-d6d3c30e-512e-4693-a436-485e2af4baea > at org.apache.spark.util.Utils$.deleteRecursively(Utils.scala:963) > at > org.apache.spark.util.Utils$$anonfun$1$$anonfun$apply$mcV$sp$5.apply(Utils.scala:204) > at > org.apache.spark.util.Utils$$anonfun$1$$anonfun$apply$mcV$sp$5.apply(Utils.scala:201) > at scala.collection.mutable.HashSet.foreach(HashSet.scala:79) > at org.apache.spark.util.Utils$$anonfun$1.apply$mcV$sp(Utils.scala:201) > at org.apache.spark.util.SparkShutdownHook.run(Utils.scala:2292) > at > org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(Utils.scala:2262) > at > org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(Utils.scala:2262) > at > org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(Utils.scala:2262) > at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1772) > at > org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply$mcV$sp(Utils.scala:2262) > at > org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(Utils.scala:2262) > at > org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(Utils.scala:2262) > at scala.util.Try$.apply(Try.scala:161) > at > org.apache.spark.util.SparkShutdownHookManager.runAll(Utils.scala:2262) > at > org.apache.spark.util.SparkShutdownHookManager$$anon$6.run(Utils.scala:2244) > at > org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:54) > {quote} > It seems this bug is introduced by this SPARK-6907. In SPARK-6907, a local > hive metastore is created in a temp directory. The problem is the local hive > metastore is not shut down correctly. At the end of application, if > SparkContext.stop() is called, it tries to delete the temp directory which is > still used by the local hive metastore, and throws an exception. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org