ソースを参照

commit fec03e0b3e0e7d152f8a95aefa79b21624a7ca25
Author: Thomas White <tomwhite@apache.org>
Date: Fri Nov 5 19:36:06 2010 +0000

HADOOP-6758. MapFile.fix does not allow index interval definition. Contributed by Gianmarco De Francisci Morales.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1031743 13f79535-47bb-0310-9956-ffa450edef68


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/yahoo-merge@1079122 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 年 前
コミット
8f2a9f1881
2 ファイル変更4 行追加1 行削除
  1. 3 0
      CHANGES.txt
  2. 1 1
      src/java/org/apache/hadoop/io/MapFile.java

+ 3 - 0
CHANGES.txt

@@ -308,6 +308,9 @@ Trunk (unreleased changes)
     HADOOP-6975.  Integer overflow in S3InputStream for blocks > 2GB.
     (Patrick Kling via tomwhite)
 
+    HADOOP-6758. MapFile.fix does not allow index interval definition.
+    (Gianmarco De Francisci Morales via tomwhite)
+
 Release 0.21.1 - Unreleased
 
   IMPROVEMENTS

+ 1 - 1
src/java/org/apache/hadoop/io/MapFile.java

@@ -771,7 +771,7 @@ public class MapFile {
     String dr = (dryrun ? "[DRY RUN ] " : "");
     Path data = new Path(dir, DATA_FILE_NAME);
     Path index = new Path(dir, INDEX_FILE_NAME);
-    int indexInterval = 128;
+    int indexInterval = conf.getInt(Writer.INDEX_INTERVAL, 128);
     if (!fs.exists(data)) {
       // there's nothing we can do to fix this!
       throw new Exception(dr + "Missing data file in " + dir + ", impossible to fix this.");