Skip to content

Commit 3b5c5a5

Browse files
committed
MAPREDUCE-1556. upgrade to Avro 1.3.0. Contributed by cutting.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/mapreduce/trunk@922047 13f79535-47bb-0310-9956-ffa450edef68
1 parent 969ed39 commit 3b5c5a5

File tree

7 files changed

+13
-29
lines changed

7 files changed

+13
-29
lines changed

.eclipse.templates/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/hadoop-core-test-0.22.0-SNAPSHOT.jar"/>
3131
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/hadoop-hdfs-0.22.0-SNAPSHOT.jar"/>
3232
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/test/hadoop-hdfs-test-0.22.0-SNAPSHOT.jar"/>
33-
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/avro-1.2.0.jar"/>
33+
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/avro-1.3.0.jar"/>
3434
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/commons-cli-1.2.jar"/>
3535
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/commons-codec-1.4.jar"/>
3636
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/commons-el-1.0.jar"/>

CHANGES.txt

+2
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ Trunk (unreleased changes)
231231
MAPREDUCE-1501. FileInputFormat supports multi-level, recursive
232232
directory listing. (Zheng Shao via dhruba)
233233

234+
MAPREDUCE-1556. upgrade to Avro 1.3.0. (cutting via tomwhite)
235+
234236
BUG FIXES
235237

236238
MAPREDUCE-1258. Fix fair scheduler event log not logging job info.

ivy/hadoop-mapred-template.xml

-15
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,5 @@
3030
<artifactId>hadoop-core</artifactId>
3131
<version>0.22.0-dev-SNAPSHOT</version>
3232
</dependency>
33-
<dependency>
34-
<groupId>org.codehaus.jackson</groupId>
35-
<artifactId>jackson-mapper-asl</artifactId>
36-
<version>1.0.1</version>
37-
</dependency>
38-
<dependency>
39-
<groupId>org.codehaus.jackson</groupId>
40-
<artifactId>jackson-core-asl</artifactId>
41-
<version>1.0.1</version>
42-
</dependency>
43-
<dependency>
44-
<groupId>com.thoughtworks.paranamer</groupId>
45-
<artifactId>paranamer</artifactId>
46-
<version>1.5</version>
47-
</dependency>
4833
</dependencies>
4934
</project>

ivy/ivysettings.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
checkmodified="true" changingPattern=".*SNAPSHOT"/>
4444

4545
<filesystem name="fs" m2compatible="true" force="true">
46-
<artifact pattern="${repo.dir}/org/apache/hadoop/[module]/[revision]/[module]-[revision].[ext]"/>
47-
<ivy pattern="${repo.dir}/org/apache/hadoop/[module]/[revision]/[module]-[revision].pom"/>
46+
<artifact pattern="${repo.dir}/[organisation]/[module]/[revision]/[module]-[revision].[ext]"/>
47+
<ivy pattern="${repo.dir}/[organisation]/[module]/[revision]/[module]-[revision].pom"/>
4848
</filesystem>
4949

5050
<chain name="default" dual="true" checkmodified="true" changingPattern=".*SNAPSHOT">

ivy/libraries.properties

+1-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ant-task.version=2.0.10
2020
#Aspectj depedency for Fault injection
2121
aspectj.version=1.6.5
2222

23-
avro.version=1.2.0
23+
avro.version=1.3.0
2424

2525
checkstyle.version=4.2
2626

@@ -49,8 +49,6 @@ hsqldb.version=1.8.0.10
4949
#ivy.version=2.0.0-beta2
5050
ivy.version=2.0.0-rc2
5151

52-
jackson.version=1.0.1
53-
5452
jasper.version=5.5.12
5553
jsp.version=2.1
5654
jsp-api.version=5.5.12
@@ -71,8 +69,6 @@ mockito-all.version=1.8.0
7169

7270
oro.version=2.0.8
7371

74-
paranamer.version=1.5
75-
7672
rats-lib.version=0.6
7773

7874
servlet.version=4.0.6

src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public HistoryEvent getNextEvent() throws IOException {
8383
Event wrapper;
8484
try {
8585
wrapper = (Event)reader.read(null, decoder);
86-
} catch (AvroRuntimeException e) { // at EOF
86+
} catch (EOFException e) { // at EOF
8787
return null;
8888
}
8989
HistoryEvent result;

src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@ class EventWriter {
4444
static final String VERSION = "Avro-Json";
4545

4646
private FSDataOutputStream out;
47-
private DatumWriter<Object> writer = new SpecificDatumWriter(Event.class);
47+
private DatumWriter<Event> writer =
48+
new SpecificDatumWriter<Event>(Event.class);
4849
private Encoder encoder;
4950

5051
EventWriter(FSDataOutputStream out) throws IOException {
5152
this.out = out;
5253
out.writeBytes(VERSION);
5354
out.writeBytes("\n");
54-
out.writeBytes(Event._SCHEMA.toString());
55+
out.writeBytes(Event.SCHEMA$.toString());
5556
out.writeBytes("\n");
56-
this.encoder = new JsonEncoder(Event._SCHEMA, out);
57+
this.encoder = new JsonEncoder(Event.SCHEMA$, out);
5758
}
5859

5960
synchronized void write(HistoryEvent event) throws IOException {
@@ -75,10 +76,10 @@ void close() throws IOException {
7576
}
7677

7778
private static final Schema GROUPS =
78-
Schema.createArray(JhCounterGroup._SCHEMA);
79+
Schema.createArray(JhCounterGroup.SCHEMA$);
7980

8081
private static final Schema COUNTERS =
81-
Schema.createArray(JhCounter._SCHEMA);
82+
Schema.createArray(JhCounter.SCHEMA$);
8283

8384
static JhCounters toAvro(Counters counters) {
8485
return toAvro(counters, "COUNTERS");

0 commit comments

Comments
 (0)