<?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 run the SparkWordCount.scala file in hdp 2.3? Please help. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112126#M25945</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3805/akilavel.html" nodeid="3805"&gt;@AKILA VEL&lt;/A&gt; &lt;/P&gt;&lt;P&gt;you can run the .scala file directly on spark-shell .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;:load PATH_TO_FILE&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 22 Apr 2016 21:35:04 GMT</pubDate>
    <dc:creator>jyadav</dc:creator>
    <dc:date>2016-04-22T21:35:04Z</dc:date>
    <item>
      <title>How to run the SparkWordCount.scala file in hdp 2.3? Please help.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112123#M25942</link>
      <description />
      <pubDate>Fri, 22 Apr 2016 21:10:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112123#M25942</guid>
      <dc:creator>akilavel</dc:creator>
      <dc:date>2016-04-22T21:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the SparkWordCount.scala file in hdp 2.3? Please help.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112124#M25943</link>
      <description>&lt;P&gt;Try to execute below command and once you get the spark sc context shell prompt then run sparkwordcount.scala on it.&lt;/P&gt;&lt;P&gt;bash# spark-shell --master yarn-client &lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 21:15:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112124#M25943</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-04-22T21:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the SparkWordCount.scala file in hdp 2.3? Please help.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112125#M25944</link>
      <description>&lt;P&gt;Do i need to compile it or spark-submit the scala file?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 21:28:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112125#M25944</guid>
      <dc:creator>akilavel</dc:creator>
      <dc:date>2016-04-22T21:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the SparkWordCount.scala file in hdp 2.3? Please help.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112126#M25945</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3805/akilavel.html" nodeid="3805"&gt;@AKILA VEL&lt;/A&gt; &lt;/P&gt;&lt;P&gt;you can run the .scala file directly on spark-shell .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;:load PATH_TO_FILE&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Apr 2016 21:35:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112126#M25945</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-04-22T21:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the SparkWordCount.scala file in hdp 2.3? Please help.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112127#M25946</link>
      <description>&lt;P&gt;
	&lt;A rel="user" href="https://community.cloudera.com/users/3805/akilavel.html" nodeid="3805"&gt;@AKILA VEL&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
	Here is a sample program.&lt;/P&gt;&lt;PRE&gt;import org.apache.spark._
import org.apache.spark.SparkContext._
object WordCount {
    def main(args: Array[String]) {  
      val conf = new SparkConf().setAppName("wordCount")
      // Create a Scala Spark Context.
      val sc = new SparkContext(conf)
      // Load our input data.
      val input =  sc.textFile("/user/test/input/data.txt")
      // Split up into words.
      val words = input.flatMap(line =&amp;gt; line.split(" "))
      // Transform into word and count.
      val counts = words.map(word =&amp;gt; (word, 1)).reduceByKey{case (x, y) =&amp;gt; x + y}
      // Save the word count back out to a text file, causing evaluation.
      counts.saveAsTextFile("/user/test/output")
    }
}

&lt;/PRE&gt;&lt;PRE&gt;spark-shell --master yarn-client
scala&amp;gt;:load &amp;lt;file path&amp;gt;
scala&amp;gt;WordCount.main(null)

&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Apr 2016 21:56:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112127#M25946</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-04-22T21:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the SparkWordCount.scala file in hdp 2.3? Please help.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112128#M25947</link>
      <description>&lt;P&gt;you need to compile it. spark-submit wants the jar file, see &lt;A href="http://spark.apache.org/docs/latest/quick-start.html#self-contained-applications" target="_blank"&gt;http://spark.apache.org/docs/latest/quick-start.html#self-contained-applications&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 22:02:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112128#M25947</guid>
      <dc:creator>bwalter1</dc:creator>
      <dc:date>2016-04-22T22:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the SparkWordCount.scala file in hdp 2.3? Please help.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112129#M25948</link>
      <description>&lt;P&gt;Thanks a lot. It worked.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 23:53:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112129#M25948</guid>
      <dc:creator>akilavel</dc:creator>
      <dc:date>2016-04-22T23:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the SparkWordCount.scala file in hdp 2.3? Please help.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112130#M25949</link>
      <description>&lt;P&gt;can you pls explain how to make jar file out of it. &lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 23:55:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112130#M25949</guid>
      <dc:creator>akilavel</dc:creator>
      <dc:date>2016-04-22T23:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the SparkWordCount.scala file in hdp 2.3? Please help.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112131#M25950</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/3805/akilavel.html" nodeid="3805"&gt;@AKILA VEL&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Please check this tutorial on how you can do a wordcount with Spark on HDP 2.3: &lt;A href="http://fr.hortonworks.com/hadoop-tutorial/a-lap-around-apache-spark/" target="_blank"&gt;http://fr.hortonworks.com/hadoop-tutorial/a-lap-around-apache-spark/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Section 1 shows how to upgrade Spark to 1.6 version. You can ignore it and go directly to section 2. &lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2016 00:05:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112131#M25950</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2016-04-23T00:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the SparkWordCount.scala file in hdp 2.3? Please help.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112132#M25951</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3805/akilavel.html" nodeid="3805"&gt;@AKILA VEL&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thanks for confirming, can you please click on accept button on my answer?&lt;/P&gt;&lt;P&gt;Regarding build jar, I have provided my answer on your another question here&lt;/P&gt;&lt;P&gt; &lt;A href="https://community.hortonworks.com/questions/28962/how-to-create-jar-file-from-spark-scala-file.html#answer-28966"&gt;https://community.hortonworks.com/questions/28962/how-to-create-jar-file-from-spark-scala-file.html#answer-28966&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2016 02:03:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-the-SparkWordCount-scala-file-in-hdp-2-3-Please/m-p/112132#M25951</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-04-23T02:03:01Z</dc:date>
    </item>
  </channel>
</rss>

