belugabehr commented on a change in pull request #1933: URL: https://github.com/apache/hive/pull/1933#discussion_r568000803
########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/MemoryInfo.java ########## @@ -53,11 +54,16 @@ public MemoryInfo(Configuration conf) { this.maxExecutorMemory = memPerInstance / numExecutors; } } else if (isTez) { - int containerSizeMb = StatsUtils.getAvailableMemory(conf, true); + long containerSizeMb = DagUtils.getContainerResource(conf).getMemorySize(); float heapFraction = HiveConf.getFloatVar(conf, HiveConf.ConfVars.TEZ_CONTAINER_MAX_JAVA_HEAP_FRACTION); this.maxExecutorMemory = (long) ((containerSizeMb * 1024L * 1024L) * heapFraction); } else { - this.maxExecutorMemory = StatsUtils.getAvailableMemory(conf, false) * 1024L * 1024L; + this.maxExecutorMemory = + conf.getInt(MRJobConfig.MAP_MEMORY_MB, MRJobConfig.DEFAULT_MAP_MEMORY_MB) * 1024L * 1024L; + // this can happen when config is explicitly set to "-1", in which case defaultValue also does not work + if (maxExecutorMemory < 0) { + maxExecutorMemory = MRJobConfig.DEFAULT_MAP_MEMORY_MB * 1024L * 1024L; Review comment: Log message please ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org