Created
September 5, 2013 15:04
-
-
Save tomtau/6451411 to your computer and use it in GitHub Desktop.
Generated job using the new Matrix API
This file contains 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
import com.twitter.scalding._ | |
import cascading.pipe.joiner._ | |
import com.twitter.scalding.mathematics.Matrix2 | |
import com.twitter.scalding.mathematics.FiniteHint | |
import com.twitter.algebird.Group | |
class BenchNewJob(args : Args) extends Job(args) { | |
import Matrix2._ | |
import com.twitter.scalding.mathematics.MatrixLiteral | |
import cascading.pipe.Pipe | |
import cascading.tuple.Fields | |
import com.twitter.scalding.TDsl._ | |
val p0 = Tsv("/home/ttauber/scalding-bench/a0.tsv", ('x, 'y, 'v) ) | |
.read | |
val tp0 = p0.toTypedPipe[(Int, Int, Double)](('x,'y,'v)) | |
val a0 = MatrixLiteral(tp0, FiniteHint(300, 300)) | |
val p1 = Tsv("/home/ttauber/scalding-bench/a1.tsv", ('x, 'y, 'v) ) | |
.read | |
val tp1 = p1.toTypedPipe[(Int, Int, Double)](('x,'y,'v)) | |
val a1 = MatrixLiteral(tp1, FiniteHint(300, 300)) | |
val p2 = Tsv("/home/ttauber/scalding-bench/a2.tsv", ('x, 'y, 'v) ) | |
.read | |
val tp2 = p2.toTypedPipe[(Int, Int, Double)](('x,'y,'v)) | |
val a2 = MatrixLiteral(tp2, FiniteHint(300, 300)) | |
val p3 = Tsv("/home/ttauber/scalding-bench/a3.tsv", ('x, 'y, 'v) ) | |
.read | |
val tp3 = p3.toTypedPipe[(Int, Int, Double)](('x,'y,'v)) | |
val a3 = MatrixLiteral(tp3, FiniteHint(300, 300)) | |
val p4 = Tsv("/home/ttauber/scalding-bench/a4.tsv", ('x, 'y, 'v) ) | |
.read | |
val tp4 = p4.toTypedPipe[(Int, Int, Double)](('x,'y,'v)) | |
val a4 = MatrixLiteral(tp4, FiniteHint(300, 300)) | |
(a0 + a1 + a2 + a3 + a4).toTypedPipe.write( TypedTsv[(Int, Int, Double)]("/home/ttauber/scalding-bench/anew.tsv")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment