@@ -56,6 +56,27 @@ def hiveGroup = "org.apache.hive"
5656// default is Hadoop 1.2.x
5757switch (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 {
0 commit comments