public long getEffectiveThreshold(final long maxMemoryPerExecutor) {
    // guard against poor configuration of noconditional task size. We let hash table grow till 2/3'rd memory
    // available for container/executor
    return (long) Math.max(threshold, (2.0 / 3.0) * maxMemoryPerExecutor);
  }
Contains information required for memory usage monitoring.
ql/src/java/org/apache/hadoop/hive/ql/exec/MemoryMonitorInfo.java