diff --git a/pom.xml b/pom.xml index 66458e203281b33c7ea1feb6a8e0429779b078f0..931d5fcd23f95d87ecbfdcf27938a10457c3fd2c 100644 --- a/pom.xml +++ b/pom.xml @@ -133,6 +133,7 @@ <chill.version>0.3.6</chill.version> <codahale.metrics.version>3.0.0</codahale.metrics.version> <avro.version>1.7.6</avro.version> + <avro.mapred.classifier></avro.mapred.classifier> <jets3t.version>0.7.1</jets3t.version> <aws.java.sdk.version>1.8.3</aws.java.sdk.version> <aws.kinesis.client.version>1.1.0</aws.kinesis.client.version> @@ -607,6 +608,7 @@ <groupId>org.apache.avro</groupId> <artifactId>avro-mapred</artifactId> <version>${avro.version}</version> + <classifier>${avro.mapred.classifier}</classifier> <exclusions> <exclusion> <groupId>io.netty</groupId> @@ -1079,6 +1081,7 @@ <properties> <hadoop.version>2.2.0</hadoop.version> <protobuf.version>2.5.0</protobuf.version> + <avro.mapred.classifier>hadoop2</avro.mapred.classifier> </properties> </profile> @@ -1088,6 +1091,7 @@ <hadoop.version>2.3.0</hadoop.version> <protobuf.version>2.5.0</protobuf.version> <jets3t.version>0.9.0</jets3t.version> + <avro.mapred.classifier>hadoop2</avro.mapred.classifier> </properties> </profile> @@ -1097,6 +1101,7 @@ <hadoop.version>2.4.0</hadoop.version> <protobuf.version>2.5.0</protobuf.version> <jets3t.version>0.9.0</jets3t.version> + <avro.mapred.classifier>hadoop2</avro.mapred.classifier> </properties> </profile> diff --git a/sql/hive/pom.xml b/sql/hive/pom.xml index 1e689e6d6dcf276d07bad0dce08204103014c205..2f07029064a1f2468ec5ad5f56dc888ec4220602 100644 --- a/sql/hive/pom.xml +++ b/sql/hive/pom.xml @@ -94,6 +94,15 @@ <dependency> <groupId>org.apache.avro</groupId> <artifactId>avro</artifactId> + <version>${avro.version}</version> + </dependency> + <!-- use the build matching the hadoop api of avro-mapred (i.e. no classifier for hadoop 1 API, + hadoop2 classifier for hadoop 2 API. avro-mapred is a dependency of org.spark-project.hive:hive-serde --> + <dependency> + <groupId>org.apache.avro</groupId> + <artifactId>avro-mapred</artifactId> + <version>${avro.version}</version> + <classifier>${avro.mapred.classifier}</classifier> </dependency> <dependency> <groupId>org.scalatest</groupId>