From 53c2b11d4d234d933742651051ef57ca3c145382 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 21 May 2018 11:57:25 -0700 Subject: remove main function; class name same as file --- scald-mvp/src/main/scala/example/WordCount.scala | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'scald-mvp/src') diff --git a/scald-mvp/src/main/scala/example/WordCount.scala b/scald-mvp/src/main/scala/example/WordCount.scala index f7230c1..0de6ae0 100644 --- a/scald-mvp/src/main/scala/example/WordCount.scala +++ b/scald-mvp/src/main/scala/example/WordCount.scala @@ -3,18 +3,7 @@ package example import com.twitter.scalding._ -object WordCountJob { - - def main(args: Array[String]) { - (new WordCountJob(Args(List("--local", "", "--input", "dummy.txt", "--output", "dummy-out.txt")))).run - - import io.Source - for (line <- Source.fromFile("dummy-out.txt").getLines()) - println(line) - } -} - -class WordCountJob(args : Args) extends Job(args) { +class WordCount(args : Args) extends Job(args) { TypedPipe.from(TextLine(args("input"))) .flatMap { line => line.split("""\s+""") } .groupBy { word => word } -- cgit v1.2.3