Skip to content

Commit 6b34161

Browse files
committed
Merge pull request #17 from tabdulradi/patch-1
Fix warn filter in union example
2 parents 13dca89 + 1a3e765 commit 6b34161

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/com/oreilly/learningsparkexamples/scala/BasicFilterUnionCombo.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ object BasicFilterUnionCombo {
1313
val sc = new SparkContext(conf)
1414
val inputRDD = sc.textFile(args(1))
1515
val errorsRDD = inputRDD.filter(_.contains("error"))
16-
val warningsRDD = inputRDD.filter(_.contains("error"))
16+
val warningsRDD = inputRDD.filter(_.contains("warn"))
1717
val badLinesRDD = errorsRDD.union(warningsRDD)
1818
println(badLinesRDD.collect().mkString("\n"))
1919
}

0 commit comments

Comments
 (0)