public static long getMaxHeapSize() {
    return getMaxHeapSize(ManagementFactory.getMemoryMXBean());
  }
Constructor expects a LogHelper object in addition to the max percent
of heap memory which can be consumed before a MapJoinMemoryExhaustionException
is thrown.
ql/src/java/org/apache/hadoop/hive/ql/exec/mapjoin/MapJoinMemoryExhaustionHandler.java