TEZ-3981. UnorderedPartitionedKVWriter.getInitialMemoryRequirement may return negativ...
authorJaume M <jmarhuenda@hortonworks.com>
Mon, 24 Sep 2018 23:13:24 +0000 (16:13 -0700)
committerJonathan Eagles <jeagles@yahoo-inc.com>
Mon, 24 Sep 2018 23:13:24 +0000 (16:13 -0700)
tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/UnorderedPartitionedKVWriter.java

index 948417d..0486ddc 100644 (file)
@@ -670,7 +670,7 @@ public class UnorderedPartitionedKVWriter extends BaseUnorderedPartitionedKVWrit
   }
 
   public static long getInitialMemoryRequirement(Configuration conf, long maxAvailableTaskMemory) {
-    int initialMemRequestMb = conf.getInt(
+    long initialMemRequestMb = conf.getInt(
         TezRuntimeConfiguration.TEZ_RUNTIME_UNORDERED_OUTPUT_BUFFER_SIZE_MB,
         TezRuntimeConfiguration.TEZ_RUNTIME_UNORDERED_OUTPUT_BUFFER_SIZE_MB_DEFAULT);
     Preconditions.checkArgument(initialMemRequestMb != 0,