Skip to content

Instantly share code, notes, and snippets.

@gavinwhyte
Last active August 29, 2015 14:23
Show Gist options
  • Save gavinwhyte/8fe13ab450410d474494 to your computer and use it in GitHub Desktop.
Save gavinwhyte/8fe13ab450410d474494 to your computer and use it in GitHub Desktop.
ExecutionAppSample
import com.twitter.scalding.typed.{IterablePipe}
import com.twitter.scalding._
/**
* 1) sbt
* 2) project <project-name>
* 3) run-main ExecutionAppSample --local
* 4) See output in out.csv
*/
object ExecutionAppSample extends ExecutionApp {
def job: Execution[Unit] = {
IterablePipe(List(1, 2, 3, 4, 5,6,7,8,9,10))
.writeExecution(TypedCsv("out.csv"))
}
override def config(inputArgs: Array[String]): (Config, Mode) = {
val current: (Config , Mode) = super.config(inputArgs)
// We are simply appending to the config here
(current._1 +
("cascading.app.name" -> "ExecutionAppSample") +
("cascading.app.tags" -> "cba:sales,cba:engineering"),
current._2)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment