Github user adamosloizou commented on the pull request:
https://github.com/apache/spark/pull/1230#issuecomment-47508367
@vanzin The shutdown hook was my 1st attempt (it would also take care of
Ctrl-C), but I eventually went for the current solution because the hook
wouldn't exit gracefully. It bombs with a big exception:
```
uncaught exception during compilation: java.lang.AssertionError
Exception in thread "shutdownHook1" java.lang.AssertionError: assertion
failed: Tried to find '$line9' in
'/var/folders/yz/cmjy6vj1787fq0kb202qbms40000gp/T/spark-a0256dbe-b4b0-4fa4-b718-b47e8392d84c'
but it is not a directory
at
scala.reflect.io.AbstractFile.subdirectoryNamed(AbstractFile.scala:254)
at
scala.tools.nsc.backend.jvm.BytecodeWriters$class.getFile(BytecodeWriters.scala:31)
at
scala.tools.nsc.backend.jvm.BytecodeWriters$class.scala$tools$nsc$backend$jvm$BytecodeWriters$$getFile(BytecodeWriters.scala:37)
at
scala.tools.nsc.backend.jvm.BytecodeWriters$ClassBytecodeWriter$class.writeClass(BytecodeWriters.scala:89)
at
scala.tools.nsc.backend.jvm.GenASM$AsmPhase$$anon$4.writeClass(GenASM.scala:67)
at
scala.tools.nsc.backend.jvm.GenASM$JBuilder.writeIfNotTooBig(GenASM.scala:459)
at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genClass(GenASM.scala:1413)
at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.run(GenASM.scala:120)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1553)
at
org.apache.spark.repl.SparkIMain.compileSourcesKeepingRun(SparkIMain.scala:468)
at
org.apache.spark.repl.SparkIMain$ReadEvalPrint.compileAndSaveRun(SparkIMain.scala:859)
at
org.apache.spark.repl.SparkIMain$ReadEvalPrint.compile(SparkIMain.scala:815)
at
org.apache.spark.repl.SparkIMain$Request.compile$lzycompute(SparkIMain.scala:1009)
at
org.apache.spark.repl.SparkIMain$Request.compile(SparkIMain.scala:1004)
at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:644)
at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:609)
at
org.apache.spark.repl.SparkILoop.reallyInterpret$1(SparkILoop.scala:801)
at
org.apache.spark.repl.SparkILoop.interpretStartingWith(SparkILoop.scala:846)
at org.apache.spark.repl.SparkILoop.command(SparkILoop.scala:758)
at
org.apache.spark.repl.SparkILoop$$anonfun$sparkCleanUp$1.apply(SparkILoop.scala:163)
at
org.apache.spark.repl.SparkILoop$$anonfun$sparkCleanUp$1.apply(SparkILoop.scala:163)
at org.apache.spark.repl.SparkIMain.beQuietDuring(SparkIMain.scala:263)
at org.apache.spark.repl.SparkILoop.sparkCleanUp(SparkILoop.scala:162)
at
org.apache.spark.repl.SparkILoop.closeInterpreter(SparkILoop.scala:169)
at
org.apache.spark.repl.SparkILoop$$anonfun$process$1$$anonfun$apply$mcZ$sp$7.apply$mcV$sp(SparkILoop.scala:942)
at scala.sys.ShutdownHookThread$$anon$1.run(ShutdownHookThread.scala:33)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---