Priya,

If you're trying to get unit tests running local spark contexts, you can
just set up your spark context with 'spark.driver.allowMultipleContexts'
set to true.

Example:

def create(seconds : Int, appName : String): StreamingContext = {
  val master = "local[*]"
  val conf = new SparkConf().set("spark.driver.allowMultipleContexts",
"true").setAppName(appName).setMaster(master)
  new StreamingContext(conf, Seconds(seconds))
}

Regards,

Bryan Jeffrey


On Wed, Nov 4, 2015 at 9:49 AM, Ted Yu <yuzhih...@gmail.com> wrote:

> Are you trying to speed up tests where each test suite uses single 
> SparkContext
> ?
>
> You may want to read:
> https://issues.apache.org/jira/browse/SPARK-2243
>
> Cheers
>
> On Wed, Nov 4, 2015 at 4:59 AM, Priya Ch <learnings.chitt...@gmail.com>
> wrote:
>
>> Hello All,
>>
>>   How to use multiple Spark Context in executing multiple test suite of
>> spark code ???
>> Can some one throw light on this ?
>>
>
>

Reply via email to