Last active
December 30, 2015 03:08
-
-
Save Chandler/7766963 to your computer and use it in GitHub Desktop.
debug combine files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.chandler | |
import com.twitter.scalding._ | |
import com.twitter.scalding.commons.source._ | |
case class TestLzoSource(p : String) extends FixedPathSource(p) with LzoText | |
class WordCountJob(args : Args) extends Job(args) { | |
TestLzoSource(args("input")) | |
.flatMap('line -> 'word) { line : String => line.split("""\s+""") } | |
.groupBy('word) { _.size } | |
.write( Tsv( args("output") ) ) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment