Skip to content

Instantly share code, notes, and snippets.

@gavinwhyte
Created June 22, 2015 01:22
Show Gist options
  • Save gavinwhyte/a28cbd3e1f3567bab1a6 to your computer and use it in GitHub Desktop.
Save gavinwhyte/a28cbd3e1f3567bab1a6 to your computer and use it in GitHub Desktop.
ExecutionJobSample
import com.twitter.scalding._
import com.twitter.scalding.typed.IterablePipe
/**
* Run this from the scalding Tool or other executor
*
* @param args
*/
class ExecutionJobSample(args: Args) extends ExecutionJob(args) {
def execution: Execution[Unit] = {
IterablePipe(List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
.writeExecution(TypedCsv("out.csv"))
}
override def config: Map[AnyRef, AnyRef] = {
// We are simply appending to the config here
super.config ++ Map(
"cascading.app.name" -> "ExecutionJobSample",
"cascading.app.tags" -> "cba:sales,cba:engineering"
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment