Skip to content

Commit 05ee5a9

Browse files
committed
local -> local[*] in SparkConf
1 parent 20a4a90 commit 05ee5a9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stackoverflow/src/main/scala/stackoverflow/StackOverflow.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ case class Posting(postingType: Int, id: Int, acceptedAnswer: Option[Int], paren
1414
/** The main class */
1515
object StackOverflow extends StackOverflow {
1616

17-
@transient lazy val conf: SparkConf = new SparkConf().setMaster("local").setAppName("StackOverflow")
17+
@transient lazy val conf: SparkConf = new SparkConf().setMaster("local[*]").setAppName("StackOverflow")
1818
@transient lazy val sc: SparkContext = new SparkContext(conf)
1919

2020
/** Main function */

wikipedia/src/main/scala/wikipedia/WikipediaRanking.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ object WikipediaRanking {
2020
"JavaScript", "Java", "PHP", "Python", "C#", "C++", "Ruby", "CSS",
2121
"Objective-C", "Perl", "Scala", "Haskell", "MATLAB", "Clojure", "Groovy")
2222

23-
val conf: SparkConf = new SparkConf().setMaster("local").setAppName("Wikipedia")
23+
val conf: SparkConf = new SparkConf().setMaster("local[*]").setAppName("Wikipedia")
2424
val sc: SparkContext = new SparkContext(conf)
2525
// Hint: use a combination of `sc.textFile`, `WikipediaData.filePath` and `WikipediaData.parse`
2626
val wikiRdd: RDD[WikipediaArticle] = sc.textFile(WikipediaData.filePath).map(WikipediaData.parse)//.cache()

0 commit comments

Comments
 (0)