<?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 getting error while submitting spark job in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/getting-error-while-submitting-spark-job/m-p/129955#M31315</link>
    <description>&lt;P&gt;getting error while submitting spark job from command line&lt;/P&gt;&lt;P&gt;  Spark Streaming's Kafka libraries not found in class path. Try one of the following.
  1. Include the Kafka library and its dependencies with in the
     spark-submit command as
     $ bin/spark-submit --packages org.apache.spark:spark-streaming-kafka:1.5.2 ...
  2. Download the JAR of the artifact from Maven Central &lt;A href="http://search.maven.org/" target="_blank"&gt;http://search.maven.org/&lt;/A&gt;,
     Group Id = org.apache.spark, Artifact Id = spark-streaming-kafka-assembly, Version = 1.5.2.
     Then, include the jar in the spark-submit command as
     $ bin/spark-submit --jars &amp;lt;spark-streaming-kafka-assembly.jar&amp;gt; ...&lt;/P&gt;&lt;P&gt;the python code i am running is:&lt;/P&gt;&lt;P&gt;from pyspark.sql import SQLContext
from pyspark import SparkContext, SparkConf
from pyspark.streaming import StreamingContext
from pyspark.streaming.kafka import KafkaUtils
import json
sc = SparkContext(appName="Clickstream_kafka")
stream = StreamingContext(sc, 2)
kafka_stream = KafkaUtils.createStream(stream,"172.16.10.13:2181","raw-event-streaming-consumer",{"event":1})
parsed = kafka_stream.map(lambda (k, v): json.loads(v))
print(parsed.collect())
stream.start()
stream.awaitTermination()&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jun 2016 18:33:44 GMT</pubDate>
    <dc:creator>tajinderdhanjal</dc:creator>
    <dc:date>2016-06-09T18:33:44Z</dc:date>
    <item>
      <title>getting error while submitting spark job</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/getting-error-while-submitting-spark-job/m-p/129955#M31315</link>
      <description>&lt;P&gt;getting error while submitting spark job from command line&lt;/P&gt;&lt;P&gt;  Spark Streaming's Kafka libraries not found in class path. Try one of the following.
  1. Include the Kafka library and its dependencies with in the
     spark-submit command as
     $ bin/spark-submit --packages org.apache.spark:spark-streaming-kafka:1.5.2 ...
  2. Download the JAR of the artifact from Maven Central &lt;A href="http://search.maven.org/" target="_blank"&gt;http://search.maven.org/&lt;/A&gt;,
     Group Id = org.apache.spark, Artifact Id = spark-streaming-kafka-assembly, Version = 1.5.2.
     Then, include the jar in the spark-submit command as
     $ bin/spark-submit --jars &amp;lt;spark-streaming-kafka-assembly.jar&amp;gt; ...&lt;/P&gt;&lt;P&gt;the python code i am running is:&lt;/P&gt;&lt;P&gt;from pyspark.sql import SQLContext
from pyspark import SparkContext, SparkConf
from pyspark.streaming import StreamingContext
from pyspark.streaming.kafka import KafkaUtils
import json
sc = SparkContext(appName="Clickstream_kafka")
stream = StreamingContext(sc, 2)
kafka_stream = KafkaUtils.createStream(stream,"172.16.10.13:2181","raw-event-streaming-consumer",{"event":1})
parsed = kafka_stream.map(lambda (k, v): json.loads(v))
print(parsed.collect())
stream.start()
stream.awaitTermination()&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 18:33:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/getting-error-while-submitting-spark-job/m-p/129955#M31315</guid>
      <dc:creator>tajinderdhanjal</dc:creator>
      <dc:date>2016-06-09T18:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: getting error while submitting spark job</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/getting-error-while-submitting-spark-job/m-p/129956#M31316</link>
      <description>&lt;P&gt;with spark-submit option --jar, are you passing spark-kafka-assembly jar along with kafka_2.10-*.jar from /usr/hdp/2.4.0.0-169/kafka/libs/ location.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 18:48:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/getting-error-while-submitting-spark-job/m-p/129956#M31316</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-06-09T18:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: getting error while submitting spark job</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/getting-error-while-submitting-spark-job/m-p/129957#M31317</link>
      <description>&lt;P&gt;i am only running like this -&lt;/P&gt;&lt;P&gt;spark-submit &amp;lt;file_name.py&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 21:39:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/getting-error-while-submitting-spark-job/m-p/129957#M31317</guid>
      <dc:creator>tajinderdhanjal</dc:creator>
      <dc:date>2016-06-09T21:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: getting error while submitting spark job</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/getting-error-while-submitting-spark-job/m-p/129958#M31318</link>
      <description>&lt;P&gt;The spark job ran fine now. I used&lt;/P&gt;&lt;P&gt;spark-submit --jars spark-assembly-1.5.2.2.3.4.7-4-hadoop2.7.1.2.3.4.7-4.jar,spark-streaming-kafka-assembly_2.10-1.6.1.jar &amp;lt;file.py&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 23:23:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/getting-error-while-submitting-spark-job/m-p/129958#M31318</guid>
      <dc:creator>tajinderdhanjal</dc:creator>
      <dc:date>2016-06-09T23:23:57Z</dc:date>
    </item>
  </channel>
</rss>

