ソースを参照

HADOOP-4425. Fix EditLogInputStream to overload the bulk read method.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@705417 13f79535-47bb-0310-9956-ffa450edef68
Christopher Douglas 16 年 前
コミット
c1a9f20c0d

+ 3 - 0
CHANGES.txt

@@ -947,6 +947,9 @@ Release 0.19.0 - Unreleased
     TaskCompletionEvents on TaskTracker re-init. (Dhruba Borthakur via
     acmurthy) 
 
+    HADOOP-4425. Fix EditLogInputStream to overload the bulk read method.
+    (cdouglas)
+
 Release 0.18.2 - Unreleased
 
   BUG FIXES

+ 3 - 0
src/hdfs/org/apache/hadoop/hdfs/server/namenode/EdlitLogInputStream.java → src/hdfs/org/apache/hadoop/hdfs/server/namenode/EditLogInputStream.java

@@ -41,6 +41,9 @@ abstract class EditLogInputStream extends InputStream {
   /** {@inheritDoc} */
   public abstract int read() throws IOException;
 
+  /** {@inheritDoc} */
+  public abstract int read(byte[] b, int off, int len) throws IOException;
+
   /** {@inheritDoc} */
   public abstract void close() throws IOException;
 

+ 5 - 0
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java

@@ -271,6 +271,11 @@ public class FSEditLog {
       return fStream.read();
     }
 
+    @Override
+    public int read(byte[] b, int off, int len) throws IOException {
+      return fStream.read(b, off, len);
+    }
+
     @Override
     public void close() throws IOException {
       fStream.close();