<?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: How to check a correct install of spark? ( Whether spark is working as expected!) in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136124#M39732</link>
    <description>&lt;P&gt;A good way to sanity check Spark is to start Spark shell with YARN (spark-shell --master yarn) and run something like this:&lt;/P&gt;&lt;PRE&gt;val x = sc.textFile("some hdfs path to a text file or directory of text files")

x.count()&lt;/PRE&gt;&lt;P&gt;This will basically do a distributed line count.&lt;/P&gt;&lt;P&gt;If that looks good, another sanity check is for Hive integration. Run spark-sql (spark-sql --master yarn) and try to query a table that you know can be queried via Hive.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2016 21:57:18 GMT</pubDate>
    <dc:creator>clukasik</dc:creator>
    <dc:date>2016-09-05T21:57:18Z</dc:date>
    <item>
      <title>How to check a correct install of spark? ( Whether spark is working as expected!)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136122#M39730</link>
      <description />
      <pubDate>Mon, 05 Sep 2016 21:32:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136122#M39730</guid>
      <dc:creator>jigar_patel</dc:creator>
      <dc:date>2016-09-05T21:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to check a correct install of spark? ( Whether spark is working as expected!)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136123#M39731</link>
      <description>&lt;P&gt;You may want to launch a spark-shell, check the version 'sc.version', check the instantiation of contexts/session and run some SQL queries.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 21:36:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136123#M39731</guid>
      <dc:creator>pvillard</dc:creator>
      <dc:date>2016-09-05T21:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to check a correct install of spark? ( Whether spark is working as expected!)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136124#M39732</link>
      <description>&lt;P&gt;A good way to sanity check Spark is to start Spark shell with YARN (spark-shell --master yarn) and run something like this:&lt;/P&gt;&lt;PRE&gt;val x = sc.textFile("some hdfs path to a text file or directory of text files")

x.count()&lt;/PRE&gt;&lt;P&gt;This will basically do a distributed line count.&lt;/P&gt;&lt;P&gt;If that looks good, another sanity check is for Hive integration. Run spark-sql (spark-sql --master yarn) and try to query a table that you know can be queried via Hive.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 21:57:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136124#M39732</guid>
      <dc:creator>clukasik</dc:creator>
      <dc:date>2016-09-05T21:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to check a correct install of spark? ( Whether spark is working as expected!)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136125#M39733</link>
      <description>&lt;P&gt;The Spark version will be displayed in the console log output...&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 21:57:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136125#M39733</guid>
      <dc:creator>clukasik</dc:creator>
      <dc:date>2016-09-05T21:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to check a correct install of spark? ( Whether spark is working as expected!)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136126#M39734</link>
      <description>&lt;PRE&gt;# Check Commands
# --------------

# Spark Scala
# -----------

# Optionally export Spark Home
export SPARK_HOME=/usr/hdp/current/spark-client

# Spark submit example in local mode
spark-submit --class org.apache.spark.examples.SparkPi --driver-memory 512m --executor-memory 512m --executor-cores 1 $SPARK_HOME/lib/spark-examples*.jar 10

# Spark submit example in client mode
spark-submit --class org.apache.spark.examples.SparkPi --master yarn-client --num-executors 3 --driver-memory 512m --executor-memory 512m --executor-cores 1 $SPARK_HOME/lib/spark-examples*.jar 10

# Spark submit example in cluster mode
spark-submit --class org.apache.spark.examples.SparkPi --master yarn-cluster --num-executors 3 --driver-memory 512m --executor-memory 512m --executor-cores 1 $SPARK_HOME/lib/spark-examples*.jar 10


# Spark shell with yarn client
spark-shell --master yarn-client --num-executors 3 --driver-memory 512m --executor-memory 512m --executor-cores 1


# Pyspark
# -------


# Optionally export Hadoop COnf and PySpark Python
export HADOOP_CONF_DIR=/etc/hadoop/conf
export PYSPARK_PYTHON=/opath/to/bin/python


# PySpark submit example in local mode
spark-submit --verbose /usr/hdp/2.3.0.0-2557/spark/examples/src/main/python/pi.py 100


# PySpark submit example in client mode
spark-submit --verbose --master yarn-client /usr/hdp/2.3.0.0-2557/spark/examples/src/main/python/pi.py 100


# PySpark submit example in cluster mode
spark-submit --verbose --master yarn-cluster /usr/hdp/2.3.0.0-2557/spark/examples/src/main/python/pi.py 100


# PySpark shell with yarn client
pyspark --master yarn-client


&lt;/PRE&gt;&lt;P&gt;@jigar.patel&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 22:50:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-check-a-correct-install-of-spark-Whether-spark-is/m-p/136126#M39734</guid>
      <dc:creator>anandi</dc:creator>
      <dc:date>2016-09-05T22:50:25Z</dc:date>
    </item>
  </channel>
</rss>

