Skip to content

Instantly share code, notes, and snippets.

@tomtau
Created September 5, 2013 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomtau/6451382 to your computer and use it in GitHub Desktop.
Save tomtau/6451382 to your computer and use it in GitHub Desktop.
Generated job using the new Matrix API
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(100, 100))
(a0 ^ 8).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