Skip to content

Commit 509824a

Browse files
HADOOP-18950. Use shaded avro jar
1 parent d12de04 commit 509824a

File tree

44 files changed

+179
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+179
-109
lines changed

hadoop-client-modules/hadoop-client-minicluster/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@
130130
<groupId>org.apache.avro</groupId>
131131
<artifactId>avro</artifactId>
132132
</exclusion>
133+
<exclusion>
134+
<groupId>org.apache.hadoop.thirdparty</groupId>
135+
<artifactId>hadoop-shaded-avro_1_11</artifactId>
136+
</exclusion>
133137
<exclusion>
134138
<groupId>org.apache.curator</groupId>
135139
<artifactId>curator-client</artifactId>

hadoop-client-modules/hadoop-client/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@
114114
<groupId>org.apache.avro</groupId>
115115
<artifactId>avro</artifactId>
116116
</exclusion>
117+
<exclusion>
118+
<groupId>org.apache.hadoop.thirdparty</groupId>
119+
<artifactId>hadoop-shaded-avro_1_11</artifactId>
120+
</exclusion>
117121
<exclusion>
118122
<groupId>org.eclipse.jetty</groupId>
119123
<artifactId>jetty-server</artifactId>
@@ -166,6 +170,10 @@
166170
<groupId>org.apache.avro</groupId>
167171
<artifactId>avro</artifactId>
168172
</exclusion>
173+
<exclusion>
174+
<groupId>org.apache.hadoop.thirdparty</groupId>
175+
<artifactId>hadoop-shaded-avro_1_11</artifactId>
176+
</exclusion>
169177
<exclusion>
170178
<groupId>com.sun.jersey</groupId>
171179
<artifactId>jersey-core</artifactId>
@@ -278,6 +286,10 @@
278286
<groupId>org.apache.avro</groupId>
279287
<artifactId>avro</artifactId>
280288
</exclusion>
289+
<exclusion>
290+
<groupId>org.apache.hadoop.thirdparty</groupId>
291+
<artifactId>hadoop-shaded-avro_1_11</artifactId>
292+
</exclusion>
281293
<exclusion>
282294
<groupId>org.apache.hadoop</groupId>
283295
<artifactId>hadoop-annotations</artifactId>
@@ -314,6 +326,10 @@
314326
<groupId>org.apache.avro</groupId>
315327
<artifactId>avro</artifactId>
316328
</exclusion>
329+
<exclusion>
330+
<groupId>org.apache.hadoop.thirdparty</groupId>
331+
<artifactId>hadoop-shaded-avro_1_11</artifactId>
332+
</exclusion>
317333
<exclusion>
318334
<groupId>org.apache.hadoop</groupId>
319335
<artifactId>hadoop-annotations</artifactId>

hadoop-common-project/hadoop-common/pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@
239239
<scope>test</scope>
240240
</dependency>
241241
<dependency>
242-
<groupId>org.apache.avro</groupId>
243-
<artifactId>avro</artifactId>
242+
<groupId>org.apache.hadoop.thirdparty</groupId>
243+
<artifactId>hadoop-shaded-avro_1_11</artifactId>
244244
<scope>compile</scope>
245245
</dependency>
246246
<dependency>
@@ -511,6 +511,8 @@
511511
<copy toDir="${project.build.directory}/test-classes">
512512
<fileset dir="${basedir}/src/main/conf"/>
513513
</copy>
514+
515+
<replace dir="${project.build.directory}/generated-test-sources/java" token="org.apache.avro" value="org.apache.hadoop.thirdparty.avro"/>
514516
</target>
515517
</configuration>
516518
</execution>

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AvroFSInput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.io.Closeable;
2222
import java.io.IOException;
2323

24-
import org.apache.avro.file.SeekableInput;
24+
import org.apache.hadoop.thirdparty.avro.file.SeekableInput;
2525
import org.apache.hadoop.classification.InterfaceAudience;
2626
import org.apache.hadoop.classification.InterfaceStability;
2727

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.net.URISyntaxException;
2727
import java.util.regex.Pattern;
2828

29-
import org.apache.avro.reflect.Stringable;
29+
import org.apache.hadoop.thirdparty.avro.reflect.Stringable;
3030
import org.apache.commons.lang3.StringUtils;
3131
import org.apache.hadoop.HadoopIllegalArgumentException;
3232
import org.apache.hadoop.classification.InterfaceAudience;

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Display.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
import java.util.LinkedList;
2626
import java.util.zip.GZIPInputStream;
2727

28-
import org.apache.avro.Schema;
29-
import org.apache.avro.file.DataFileReader;
30-
import org.apache.avro.file.FileReader;
31-
import org.apache.avro.generic.GenericDatumReader;
32-
import org.apache.avro.generic.GenericDatumWriter;
33-
import org.apache.avro.io.DatumWriter;
34-
import org.apache.avro.io.EncoderFactory;
35-
import org.apache.avro.io.JsonEncoder;
28+
import org.apache.hadoop.thirdparty.avro.Schema;
29+
import org.apache.hadoop.thirdparty.avro.file.DataFileReader;
30+
import org.apache.hadoop.thirdparty.avro.file.FileReader;
31+
import org.apache.hadoop.thirdparty.avro.generic.GenericDatumReader;
32+
import org.apache.hadoop.thirdparty.avro.generic.GenericDatumWriter;
33+
import org.apache.hadoop.thirdparty.avro.io.DatumWriter;
34+
import org.apache.hadoop.thirdparty.avro.io.EncoderFactory;
35+
import org.apache.hadoop.thirdparty.avro.io.JsonEncoder;
3636
import org.apache.hadoop.classification.InterfaceAudience;
3737
import org.apache.hadoop.classification.InterfaceStability;
3838
import org.apache.hadoop.conf.Configuration;

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Text.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
import java.text.StringCharacterIterator;
3434
import java.util.Arrays;
3535

36-
import org.apache.avro.reflect.Stringable;
37-
36+
import org.apache.hadoop.thirdparty.avro.reflect.Stringable;
3837
import org.apache.hadoop.classification.InterfaceAudience;
3938
import org.apache.hadoop.classification.InterfaceStability;
4039

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/serializer/avro/AvroReflectSerialization.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
import java.util.HashSet;
2222
import java.util.Set;
2323

24-
import org.apache.avro.Schema;
25-
import org.apache.avro.io.DatumReader;
26-
import org.apache.avro.io.DatumWriter;
27-
import org.apache.avro.reflect.ReflectData;
28-
import org.apache.avro.reflect.ReflectDatumReader;
29-
import org.apache.avro.reflect.ReflectDatumWriter;
24+
import org.apache.hadoop.thirdparty.avro.Schema;
25+
import org.apache.hadoop.thirdparty.avro.io.DatumReader;
26+
import org.apache.hadoop.thirdparty.avro.io.DatumWriter;
27+
import org.apache.hadoop.thirdparty.avro.reflect.ReflectData;
28+
import org.apache.hadoop.thirdparty.avro.reflect.ReflectDatumReader;
29+
import org.apache.hadoop.thirdparty.avro.reflect.ReflectDatumWriter;
3030
import org.apache.hadoop.classification.InterfaceAudience;
3131
import org.apache.hadoop.classification.InterfaceStability;
3232

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/serializer/avro/AvroSerialization.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
import java.io.InputStream;
2323
import java.io.OutputStream;
2424

25-
import org.apache.avro.Schema;
26-
import org.apache.avro.io.BinaryDecoder;
27-
import org.apache.avro.io.BinaryEncoder;
28-
import org.apache.avro.io.DatumReader;
29-
import org.apache.avro.io.DatumWriter;
30-
import org.apache.avro.io.DecoderFactory;
31-
import org.apache.avro.io.EncoderFactory;
25+
import org.apache.hadoop.thirdparty.avro.Schema;
26+
import org.apache.hadoop.thirdparty.avro.io.BinaryDecoder;
27+
import org.apache.hadoop.thirdparty.avro.io.BinaryEncoder;
28+
import org.apache.hadoop.thirdparty.avro.io.DatumReader;
29+
import org.apache.hadoop.thirdparty.avro.io.DatumWriter;
30+
import org.apache.hadoop.thirdparty.avro.io.DecoderFactory;
31+
import org.apache.hadoop.thirdparty.avro.io.EncoderFactory;
3232
import org.apache.hadoop.classification.InterfaceAudience;
3333
import org.apache.hadoop.classification.InterfaceStability;
3434
import org.apache.hadoop.conf.Configured;

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/serializer/avro/AvroSpecificSerialization.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818

1919
package org.apache.hadoop.io.serializer.avro;
2020

21-
import org.apache.avro.Schema;
22-
import org.apache.avro.io.DatumReader;
23-
import org.apache.avro.io.DatumWriter;
24-
import org.apache.avro.specific.SpecificDatumReader;
25-
import org.apache.avro.specific.SpecificDatumWriter;
26-
import org.apache.avro.specific.SpecificRecord;
21+
import org.apache.hadoop.thirdparty.avro.Schema;
22+
import org.apache.hadoop.thirdparty.avro.io.DatumReader;
23+
import org.apache.hadoop.thirdparty.avro.io.DatumWriter;
24+
import org.apache.hadoop.thirdparty.avro.specific.SpecificDatumReader;
25+
import org.apache.hadoop.thirdparty.avro.specific.SpecificDatumWriter;
26+
import org.apache.hadoop.thirdparty.avro.specific.SpecificRecord;
2727
import org.apache.hadoop.classification.InterfaceAudience;
2828
import org.apache.hadoop.classification.InterfaceStability;
2929

0 commit comments

Comments
 (0)