diff options
author | Bryan Newbold <bnewbold@archive.org> | 2018-05-21 11:57:25 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2018-05-21 11:57:25 -0700 |
commit | 53c2b11d4d234d933742651051ef57ca3c145382 (patch) | |
tree | 775b33965b54b9a6a7bf0c916ad637a8d2de161a /scald-mvp | |
parent | faad676833e1c4f39c0152fb53c23eb2dc83876c (diff) | |
download | sandcrawler-53c2b11d4d234d933742651051ef57ca3c145382.tar.gz sandcrawler-53c2b11d4d234d933742651051ef57ca3c145382.zip |
remove main function; class name same as file
Diffstat (limited to 'scald-mvp')
-rw-r--r-- | scald-mvp/src/main/scala/example/WordCount.scala | 13 |
1 files changed, 1 insertions, 12 deletions
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 } |