GitHub user YanTangZhai opened a pull request:
https://github.com/apache/spark/pull/1281
[SPARK-2325] Utils.getLocalDir had better check the directory and choose a
good one instead of choosing the first one directly
If the first directory of spark.local.dir is bad, application will exit
with the exception:
Exception in thread "main" java.io.IOException: Failed to create a temp
directory (under /data1/sparkenv/local) after 10 attempts!
at org.apache.spark.util.Utils$.createTempDir(Utils.scala:258)
at
org.apache.spark.broadcast.HttpBroadcast$.createServer(HttpBroadcast.scala:154)
at
org.apache.spark.broadcast.HttpBroadcast$.initialize(HttpBroadcast.scala:127)
at
org.apache.spark.broadcast.HttpBroadcastFactory.initialize(HttpBroadcastFactory.scala:31)
at
org.apache.spark.broadcast.BroadcastManager.initialize(BroadcastManager.scala:48)
at
org.apache.spark.broadcast.BroadcastManager.<init>(BroadcastManager.scala:35)
at org.apache.spark.SparkEnv$.create(SparkEnv.scala:218)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:202)
at JobTaskJoin$.main(JobTaskJoin.scala:9)
at JobTaskJoin.main(JobTaskJoin.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:292)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:55)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Utils.getLocalDir had better check the directory and choose a good one
instead of choosing the first one directly. For example, spark.local.dir is
/data1/sparkenv/local,/data2/sparkenv/local. The disk data1 is bad while the
disk data2 is good, we could choose the data2 not data1.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/YanTangZhai/spark SPARK-2325
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/1281.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1281
----
commit 08424ce408b5e1ee679d15e46ea5b08979511fae
Author: yantangzhai <[email protected]>
Date: 2014-07-02T06:55:39Z
[SPARK-2325] Utils.getLocalDir had better check the directory and choose a
good one instead of choosing the first one directly
----
---
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.
---