Skip to content

Instantly share code, notes, and snippets.

@vmarcinko
Last active December 18, 2015 11:39
Show Gist options
  • Save vmarcinko/5776890 to your computer and use it in GitHub Desktop.
Save vmarcinko/5776890 to your computer and use it in GitHub Desktop.
Example files for my blog post about Hadoop job programmatic submission
apply plugin: 'java'
archivesBaseName = 'bigdatalab'
group = 'bigdatalab'
version = '1.0'
ext {
slf4jVersion = '1.7.5'
hadoopVersion = '1.0.4'
cascadingVersion = '2.1.+'
}
repositories {
mavenCentral();
maven {
url "http://conjars.org/repo"
}
}
configurations {
mapreduce {
description = 'Map reduce jobs dependencies'
}
compile {
extendsFrom mapreduce
}
all*.exclude group: "org.slf4j", module: "slf4j-log4j12"
all*.exclude group: "org.slf4j", module: "slf4j-jcl"
all*.exclude group: "commons-logging", module: "commons-logging"
all*.exclude group: "log4j", module: "log4j"
}
dependencies {
mapreduce (
"cascading:cascading-core:${cascadingVersion}",
"cascading:cascading-local:${cascadingVersion}",
)
mapreduce ("cascading:cascading-hadoop:${cascadingVersion}") {
exclude group: "org.apache.hadoop", module: "hadoop-core"
}
compile (
"org.slf4j:slf4j-api:${slf4jVersion}",
"org.slf4j:jcl-over-slf4j:${slf4jVersion}",
"org.slf4j:log4j-over-slf4j:${slf4jVersion}",
"ch.qos.logback:logback-classic:1.0.+",
"org.apache.hadoop:hadoop-core:${hadoopVersion}",
"commons-io:commons-io:2.1"
)
}
task prepareMapReduceLibs(type: Sync, dependsOn: jar) {
from jar.outputs.files
from configurations.mapreduce.files
into 'mapreducelib'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment