From 3460a5e345f50ffcdd03a896b4410acbbe3b7711 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 5 Nov 2010 19:36:06 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 3 +++ src/java/org/apache/hadoop/io/MapFile.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2bafda35435..6a1c958d44b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -303,6 +303,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 diff --git a/src/java/org/apache/hadoop/io/MapFile.java b/src/java/org/apache/hadoop/io/MapFile.java index ad36730a136..8250145b8b7 100644 --- a/src/java/org/apache/hadoop/io/MapFile.java +++ b/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.");