Skip to content

Commit 515ef86

Browse files
committed
SHDP-218 Add cdh5 build options
1 parent 804e483 commit 515ef86

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed

build.gradle

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,27 @@ def hiveGroup = "org.apache.hive"
5656
// default is Hadoop 1.2.x
5757
switch (hadoopDistro) {
5858

59+
// Cloudera CDH5 YARN 2.2.x base
60+
case "cdh5yarn":
61+
hadoopVersion = cdh5YARNVersion
62+
println "Using Cloudera CDH5 YARN [$hadoopVersion]"
63+
hbaseVersion = cdh5HbaseVersion
64+
hiveVersion = cdh5HiveVersion
65+
pigVersion = cdh5PigVersion
66+
thriftVersion = cdh5ThriftVersion
67+
break;
68+
69+
// Cloudera CDH5 MR1
70+
case "cdh5mr1":
71+
case "cdh5":
72+
hadoopVersion = cdh5MR1Version
73+
println "Using Cloudera CDH5 MR1 [$hadoopVersion]"
74+
hbaseVersion = cdh5HbaseVersion
75+
hiveVersion = cdh5HiveVersion
76+
pigVersion = cdh5PigVersion
77+
thriftVersion = cdh5ThriftVersion
78+
break;
79+
5980
// Cloudera CDH4 YARN
6081
case "cdh4yarn":
6182
hadoopVersion = cdh4YARNVersion
@@ -136,7 +157,7 @@ switch (hadoopDistro) {
136157
println "Using Apache Hadoop 1.2.x [$hadoopVersion]"
137158
} else {
138159
println "Failing build: $hadoopDistro is not a supported distro"
139-
println "Supported distros: hadoop11, hadoop12[*], hadoop22, hdp13, cdh4 and phd1"
160+
println "Supported distros: hadoop11, hadoop12[*], hadoop22, hdp13, cdh4, cdh5, cdh5yarn and phd1"
140161
println "* default"
141162
throw new InvalidUserDataException("$hadoopDistro is not a supported distro")
142163
}
@@ -289,6 +310,31 @@ configure(hadoopProjects()) {
289310
// default is Hadoop 1.2.x
290311
switch (hadoopDistro) {
291312

313+
// Cloudera CDH5 YARN
314+
case "cdh5yarn":
315+
dependencies {
316+
compile("org.apache.hadoop:hadoop-common:$cdh5Version")
317+
compile("org.apache.hadoop:hadoop-mapreduce-client-core:$cdh5Version")
318+
compile("org.apache.hadoop:hadoop-distcp:$cdh5Version")
319+
optional("org.apache.hadoop:hadoop-streaming:$cdh5YARNVersion")
320+
optional("org.apache.hadoop:hadoop-hdfs:$cdh5Version")
321+
testCompile "org.apache.hadoop:hadoop-mapreduce-examples:$hadoopVersion"
322+
testRuntime "org.apache.hadoop:hadoop-mapreduce-client-jobclient:$hadoopVersion"
323+
}
324+
break;
325+
326+
// Cloudera CDH5 MR1
327+
case "cdh5":
328+
case "cdh5mr1":
329+
dependencies {
330+
compile("org.apache.hadoop:hadoop-common:$cdh5Version")
331+
optional("org.apache.hadoop:hadoop-streaming:$cdh5MR1Version")
332+
optional("org.apache.hadoop:hadoop-tools:$cdh5MR1Version")
333+
optional("org.apache.hadoop:hadoop-hdfs:$cdh5Version")
334+
testCompile "org.apache.hadoop:hadoop-examples:$hadoopVersion"
335+
}
336+
break;
337+
292338
// Cloudera CDH4 YARN
293339
case "cdh4yarn":
294340
dependencies {

gradle.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ phd1HiveVersion = 0.11.0-gphd-2.1.0.0
3030
phd1PigVersion = 0.10.1-gphd-2.1.0.0
3131
phd1ThriftVersion = 0.9.0
3232

33+
## Cloudera CDH5
34+
cdh5Version = 2.2.0-cdh5.0.0-beta-1
35+
cdh5MR1Version = 2.2.0-mr1-cdh5.0.0-beta-1
36+
cdh5YARNVersion = 2.2.0-cdh5.0.0-beta-1
37+
cdh5HbaseVersion = 0.95.2-cdh5.0.0-beta-1
38+
cdh5HiveVersion = 0.11.0-cdh5.0.0-beta-1
39+
cdh5PigVersion = 0.11.0-cdh5.0.0-beta-1
40+
cdh5ThriftVersion = 0.9.0
41+
3342
## Cloudera CDH4
3443
cdh4Version = 2.0.0-cdh4.3.1
3544
cdh4MR1Version = 2.0.0-mr1-cdh4.3.1

settings.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ switch (ext.hadoopDistro) {
1212
case "cdh4mr1":
1313
ext.mr2 = false
1414
break
15+
case "cdh5yarn":
16+
ext.mr2 = true
17+
break
18+
case "cdh5":
19+
case "cdh5mr1":
20+
ext.mr2 = false
21+
break
1522
case "phd1":
1623
ext.mr2 = false
1724
break

0 commit comments

Comments
 (0)