<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Error: Only one SparkContext may be running in this JVM in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Only-one-SparkContext-may-be-running-in-this-JVM/m-p/143607#M56462</link>
    <description>&lt;P&gt;oh! that worked. Thanks a lot!&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2017 02:25:09 GMT</pubDate>
    <dc:creator>adnanalvee</dc:creator>
    <dc:date>2017-03-08T02:25:09Z</dc:date>
    <item>
      <title>Error: Only one SparkContext may be running in this JVM</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Only-one-SparkContext-may-be-running-in-this-JVM/m-p/143605#M56460</link>
      <description>&lt;P&gt;I am trying to run some spark streaming examples online. But even before I start, I'm getting this error&lt;/P&gt;&lt;PRE&gt;Only one SparkContext may be running in this JVM (see SPARK-2243). To ignore this error, set spark.driver.allowMultipleContexts = true. The currently running SparkContext was created at:
org.apache.spark.SparkContext.&amp;lt;init&amp;gt;(SparkContext.scala:82)&lt;/PRE&gt;&lt;P&gt;I tried this below but doesn't help.&lt;/P&gt;&lt;PRE&gt;conf.set("spark.driver.allowMultipleContexts","true");&lt;/PRE&gt;&lt;P&gt;Sample code I was trying to run in HDP 2.5&lt;/P&gt;&lt;PRE&gt;import org.apache.spark._
import org.apache.spark.streaming._

val conf = new SparkConf().setAppName(appName).setMaster(master)
val ssc = new StreamingContext(conf, Seconds(1))
&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Mar 2017 00:51:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Only-one-SparkContext-may-be-running-in-this-JVM/m-p/143605#M56460</guid>
      <dc:creator>adnanalvee</dc:creator>
      <dc:date>2017-03-08T00:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Only one SparkContext may be running in this JVM</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Only-one-SparkContext-may-be-running-in-this-JVM/m-p/143606#M56461</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/13990/aa474p.html" nodeid="13990"&gt;@Adnan Alvee&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Are you using spark-shell? if yes the spark context is already generated for you (as 'sc') and you don't need to create a new one, you should be able to directly go with:&lt;/P&gt;&lt;PRE&gt;val ssc = new StreamingContext(sc, Seconds(1))&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Mar 2017 01:54:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Only-one-SparkContext-may-be-running-in-this-JVM/m-p/143606#M56461</guid>
      <dc:creator>pvillard</dc:creator>
      <dc:date>2017-03-08T01:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Only one SparkContext may be running in this JVM</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Only-one-SparkContext-may-be-running-in-this-JVM/m-p/143607#M56462</link>
      <description>&lt;P&gt;oh! that worked. Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 02:25:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Only-one-SparkContext-may-be-running-in-this-JVM/m-p/143607#M56462</guid>
      <dc:creator>adnanalvee</dc:creator>
      <dc:date>2017-03-08T02:25:09Z</dc:date>
    </item>
  </channel>
</rss>

