You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by cd...@apache.org on 2009/10/14 08:42:37 UTC
svn commit: r825028 - in /hadoop/mapreduce/branches/branch-0.21: CHANGES.txt
src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java
Author: cdouglas
Date: Wed Oct 14 06:42:37 2009
New Revision: 825028
URL: http://svn.apache.org/viewvc?rev=825028&view=rev
Log:
MAPREDUCE-1071. Use DataInputStream rather than FSDataInputStream in the
JobHistory EventReader. Contributed by Hong Tang
Modified:
hadoop/mapreduce/branches/branch-0.21/CHANGES.txt
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java
Modified: hadoop/mapreduce/branches/branch-0.21/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/CHANGES.txt?rev=825028&r1=825027&r2=825028&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/branch-0.21/CHANGES.txt Wed Oct 14 06:42:37 2009
@@ -734,3 +734,5 @@
task per heartbeat in the capacity scheduler.
(Rahul Kumar Singh via yhemanth)
+ MAPREDUCE-1071. Use DataInputStream rather than FSDataInputStream in the
+ JobHistory EventReader. (Hong Tang via cdouglas)
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java?rev=825028&r1=825027&r2=825028&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java Wed Oct 14 06:42:37 2009
@@ -18,10 +18,11 @@
package org.apache.hadoop.mapreduce.jobhistory;
+import java.io.Closeable;
+import java.io.DataInputStream;
import java.io.IOException;
import java.io.EOFException;
-import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapreduce.Counter;
@@ -34,10 +35,10 @@
import org.apache.avro.io.DatumReader;
import org.apache.avro.specific.SpecificDatumReader;
-public class EventReader {
+public class EventReader implements Closeable {
private String version;
private Schema schema;
- private FSDataInputStream in;
+ private DataInputStream in;
private Decoder decoder;
private DatumReader reader;
@@ -57,7 +58,7 @@
* @throws IOException
*/
@SuppressWarnings("deprecation")
- public EventReader(FSDataInputStream in) throws IOException {
+ public EventReader(DataInputStream in) throws IOException {
this.in = in;
this.version = in.readLine();
@@ -153,6 +154,7 @@
* Close the Event reader
* @throws IOException
*/
+ @Override
public void close() throws IOException {
if (in != null) {
in.close();