[ 
https://issues.apache.org/jira/browse/SPARK-534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14044023#comment-14044023
 ] 

Hans Uhlig edited comment on SPARK-534 at 6/25/14 8:49 PM:
-----------------------------------------------------------

Specific use case for threadsafe Context. Executing jobs from Tomcat or other 
web container based on user requests.


was (Author: huhlig):
Specific usecase. Executing jobs from Tomcat or other web container based on 
user requests.

> Make SparkContext thread-safe
> -----------------------------
>
>                 Key: SPARK-534
>                 URL: https://issues.apache.org/jira/browse/SPARK-534
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.7.0, 0.6.2, 0.5.2, 0.7.1, 
> 0.7.2, 0.7.3
>            Reporter: tjhunter
>            Priority: Blocker
>
> SparkEnv (used by SparkContext) is not thread-safe and it causes issues with 
> scala's Futures and parrallel collections.
> For example, this will not work:
> val f = Futures.future({
>   sc.textFile("hdfs://....")
> })
> f.apply()
> Workaround for now:
> val f = Futures.future({
>   SparkEnv.set(sc.env)
>   sc.textFile("hdfs://....")
> })
> f.apply()



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to