Skip to content

Commit c32ce59

Browse files
committed
SPARK-3039: Allow spark to be built using avro-mapred for hadoop2
1 parent 6b8de0e commit c32ce59

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
<chill.version>0.3.6</chill.version>
134134
<codahale.metrics.version>3.0.0</codahale.metrics.version>
135135
<avro.version>1.7.6</avro.version>
136+
<avro.mapred.classifier></avro.mapred.classifier>
136137
<jets3t.version>0.7.1</jets3t.version>
137138
<aws.java.sdk.version>1.8.3</aws.java.sdk.version>
138139
<aws.kinesis.client.version>1.1.0</aws.kinesis.client.version>
@@ -607,6 +608,7 @@
607608
<groupId>org.apache.avro</groupId>
608609
<artifactId>avro-mapred</artifactId>
609610
<version>${avro.version}</version>
611+
<classifier>${avro.mapred.classifier}</classifier>
610612
<exclusions>
611613
<exclusion>
612614
<groupId>io.netty</groupId>
@@ -1079,6 +1081,7 @@
10791081
<properties>
10801082
<hadoop.version>2.2.0</hadoop.version>
10811083
<protobuf.version>2.5.0</protobuf.version>
1084+
<avro.mapred.classifier>hadoop2</avro.mapred.classifier>
10821085
</properties>
10831086
</profile>
10841087

@@ -1088,6 +1091,7 @@
10881091
<hadoop.version>2.3.0</hadoop.version>
10891092
<protobuf.version>2.5.0</protobuf.version>
10901093
<jets3t.version>0.9.0</jets3t.version>
1094+
<avro.mapred.classifier>hadoop2</avro.mapred.classifier>
10911095
</properties>
10921096
</profile>
10931097

@@ -1097,6 +1101,7 @@
10971101
<hadoop.version>2.4.0</hadoop.version>
10981102
<protobuf.version>2.5.0</protobuf.version>
10991103
<jets3t.version>0.9.0</jets3t.version>
1104+
<avro.mapred.classifier>hadoop2</avro.mapred.classifier>
11001105
</properties>
11011106
</profile>
11021107

sql/hive/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@
9090
<dependency>
9191
<groupId>org.apache.avro</groupId>
9292
<artifactId>avro</artifactId>
93+
<version>${avro.version}</version>
94+
</dependency>
95+
<!-- use the build matching the hadoop api of avro-mapred (i.e. no classifier for hadoop 1 API,
96+
hadoop2 classifier for hadoop 2 API. avro-mapred is a dependency of org.spark-project.hive:hive-serde -->
97+
<dependency>
98+
<groupId>org.apache.avro</groupId>
99+
<artifactId>avro-mapred</artifactId>
100+
<version>${avro.version}</version>
101+
<classifier>${avro.mapred.classifier}</classifier>
93102
</dependency>
94103
<dependency>
95104
<groupId>org.scalatest</groupId>

0 commit comments

Comments
 (0)