Last active
August 29, 2015 14:23
-
-
Save gavinwhyte/8fe13ab450410d474494 to your computer and use it in GitHub Desktop.
ExecutionAppSample
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.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