Skip to content

Instantly share code, notes, and snippets.

@kzk
Created July 27, 2011 03:34
Show Gist options
  • Save kzk/1108620 to your computer and use it in GitHub Desktop.
Save kzk/1108620 to your computer and use it in GitHub Desktop.
mapred.patch
/usr/src/hadoop-0.20$ diff -u ./mapred/org/apache/hadoop/mapred/ReduceTask.java.orig ./mapred/org/apache/hadoop/mapred/ReduceTask.java.new
--- ./mapred/org/apache/hadoop/mapred/ReduceTask.java.orig 2011-07-27 03:32:11.000000000 +0000
+++ ./mapred/org/apache/hadoop/mapred/ReduceTask.java.new 2011-07-27 03:32:35.000000000 +0000
@@ -1014,8 +1014,8 @@
maxInMemCopyUse);
}
// Allow unit tests to fix Runtime memory
- maxSize = (int)(conf.getInt("mapred.job.reduce.total.mem.bytes",
- (int)Math.min(Runtime.getRuntime().maxMemory(), Integer.MAX_VALUE))
+ maxSize = (long)(conf.getLong("mapred.job.reduce.total.mem.bytes",
+ (long)Math.min(Runtime.getRuntime().maxMemory(), Integer.MAX_VALUE))
* maxInMemCopyUse);
maxSingleShuffleLimit = (long)(maxSize * MAX_SINGLE_SHUFFLE_SEGMENT_FRACTION);
LOG.info("ShuffleRamManager: MemoryLimit=" + maxSize +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment