You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2017/04/26 04:51:04 UTC

[jira] [Created] (SPARK-20465) Throws a proper exception rather than ArrayIndexOutOfBoundsException when temp directories could not be got/created

Hyukjin Kwon created SPARK-20465:
------------------------------------

             Summary: Throws a proper exception rather than ArrayIndexOutOfBoundsException when temp directories could not be got/created
                 Key: SPARK-20465
                 URL: https://issues.apache.org/jira/browse/SPARK-20465
             Project: Spark
          Issue Type: Improvement
          Components: Spark Submit
    Affects Versions: 2.2.0
            Reporter: Hyukjin Kwon
            Priority: Trivial


If none of temp directories could not be created, it throws an {{ArrayIndexOutOfBoundsException}} as below:

{code}
./bin/spark-shell --conf spark.local.dir=/NONEXISTENT_DIR_ONE,/NONEXISTENT_DIR_TWO
17/04/26 13:11:06 ERROR Utils: Failed to create dir in /NONEXISTENT_DIR_ONE. Ignoring this directory.
17/04/26 13:11:06 ERROR Utils: Failed to create dir in /NONEXISTENT_DIR_TWO. Ignoring this directory.
Exception in thread "main" java.lang.ExceptionInInitializerError
	at org.apache.spark.repl.Main.main(Main.scala)
	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:497)
	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:756)
	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:179)
	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:204)
	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:118)
	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
	at org.apache.spark.util.Utils$.getLocalDir(Utils.scala:743)
	at org.apache.spark.repl.Main$$anonfun$1.apply(Main.scala:37)
	at org.apache.spark.repl.Main$$anonfun$1.apply(Main.scala:37)
	at scala.Option.getOrElse(Option.scala:121)
	at org.apache.spark.repl.Main$.<init>(Main.scala:37)
	at org.apache.spark.repl.Main$.<clinit>(Main.scala)
	... 10 more
{code}

It seems we should throw a proper exception with better message.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org