HADOOP-13386. Upgrade Avro to 1.9.2 (#3990)

Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
This commit is contained in:
PJ Fanning 2022-03-26 12:31:16 +01:00 committed by GitHub
parent da09d68056
commit 61e809b245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 47 additions and 103 deletions

View File

@ -283,7 +283,7 @@ log4j:log4j:1.2.17
net.java.dev.jna:jna:5.2.0 net.java.dev.jna:jna:5.2.0
net.minidev:accessors-smart:1.2 net.minidev:accessors-smart:1.2
net.minidev:json-smart:2.4.7 net.minidev:json-smart:2.4.7
org.apache.avro:avro:1.7.7 org.apache.avro:avro:1.9.2
org.apache.commons:commons-collections4:4.2 org.apache.commons:commons-collections4:4.2
org.apache.commons:commons-compress:1.21 org.apache.commons:commons-compress:1.21
org.apache.commons:commons-configuration2:2.1.1 org.apache.commons:commons-configuration2:2.1.1

View File

@ -41,7 +41,7 @@ public class AvroTestUtil {
// check that schema matches expected // check that schema matches expected
Schema s = ReflectData.get().getSchema(type); Schema s = ReflectData.get().getSchema(type);
assertEquals(Schema.parse(schema), s); assertEquals(new Schema.Parser().parse(schema), s);
// check that value is serialized correctly // check that value is serialized correctly
ReflectDatumWriter<Object> writer = new ReflectDatumWriter<Object>(s); ReflectDatumWriter<Object> writer = new ReflectDatumWriter<Object>(s);

View File

@ -119,7 +119,7 @@ public class TestEnumSetWritable {
public void testAvroReflect() throws Exception { public void testAvroReflect() throws Exception {
String schema = "{\"type\":\"array\",\"items\":{\"type\":\"enum\"," String schema = "{\"type\":\"array\",\"items\":{\"type\":\"enum\","
+ "\"name\":\"TestEnumSet\"," + "\"name\":\"TestEnumSet\","
+ "\"namespace\":\"org.apache.hadoop.io.TestEnumSetWritable$\"," + "\"namespace\":\"org.apache.hadoop.io.TestEnumSetWritable\","
+ "\"symbols\":[\"CREATE\",\"OVERWRITE\",\"APPEND\"]}," + "\"symbols\":[\"CREATE\",\"OVERWRITE\",\"APPEND\"]},"
+ "\"java-class\":\"org.apache.hadoop.io.EnumSetWritable\"}"; + "\"java-class\":\"org.apache.hadoop.io.EnumSetWritable\"}";
Type type = Type type =

View File

@ -291,6 +291,14 @@
<Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" /> <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
</Match> </Match>
<!--
Ignore untidy code generated by Avro
-->
<Match>
<Class name="org.apache.hadoop.mapreduce.jobhistory.JobSubmitted" />
<Bug pattern="NP_NULL_INSTANCEOF" />
</Match>
<Match> <Match>
<Class name="org.apache.hadoop.mapred.Task" /> <Class name="org.apache.hadoop.mapred.Task" />
<Method name="reportFatalError" /> <Method name="reportFatalError" />

View File

@ -63,7 +63,7 @@
<java.security.egd>file:///dev/urandom</java.security.egd> <java.security.egd>file:///dev/urandom</java.security.egd>
<!-- avro version --> <!-- avro version -->
<avro.version>1.7.7</avro.version> <avro.version>1.9.2</avro.version>
<!-- jersey version --> <!-- jersey version -->
<jersey.version>1.19</jersey.version> <jersey.version>1.19</jersey.version>

View File

@ -95,24 +95,6 @@
<groupId>com.sun.jersey</groupId> <groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId> <artifactId>jersey-json</artifactId>
<version>${jersey.version}</version> <version>${jersey.version}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -158,24 +158,6 @@
<dependency> <dependency>
<groupId>com.sun.jersey</groupId> <groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId> <artifactId>jersey-json</artifactId>
<exclusions>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sun.jersey.contribs</groupId> <groupId>com.sun.jersey.contribs</groupId>

View File

@ -93,30 +93,20 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sun.jersey</groupId> <groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId> <artifactId>jersey-core</artifactId>
<exclusions> </dependency>
<exclusion> <dependency>
<groupId>org.codehaus.jackson</groupId> <groupId>com.sun.jersey</groupId>
<artifactId>jackson-core-asl</artifactId> <artifactId>jersey-client</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sun.jersey.contribs</groupId> <groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-guice</artifactId> <artifactId>jersey-guice</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
</dependency>
<!-- 'mvn dependency:analyze' fails to detect use of this dependency --> <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
<dependency> <dependency>
<groupId>org.apache.hadoop</groupId> <groupId>org.apache.hadoop</groupId>
@ -142,14 +132,6 @@
<groupId>org.codehaus.jettison</groupId> <groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId> <artifactId>jettison</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.thirdparty</groupId> <groupId>org.apache.hadoop.thirdparty</groupId>
<artifactId>hadoop-shaded-guava</artifactId> <artifactId>hadoop-shaded-guava</artifactId>

View File

@ -90,6 +90,26 @@
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId> <artifactId>protobuf-java</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>

View File

@ -154,24 +154,6 @@
<dependency> <dependency>
<groupId>com.sun.jersey</groupId> <groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId> <artifactId>jersey-json</artifactId>
<exclusions>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sun.jersey.contribs</groupId> <groupId>com.sun.jersey.contribs</groupId>

View File

@ -109,24 +109,6 @@
<dependency> <dependency>
<groupId>com.sun.jersey</groupId> <groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId> <artifactId>jersey-json</artifactId>
<exclusions>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sun.jersey.contribs</groupId> <groupId>com.sun.jersey.contribs</groupId>

View File

@ -188,6 +188,12 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency> <dependency>
<groupId>com.sun.jersey</groupId> <groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId> <artifactId>jersey-client</artifactId>