Gopal V created HIVE-16329:
------------------------------

             Summary: TopN: TopNHash totalFreeMemory computation ignores free 
memory
                 Key: HIVE-16329
                 URL: https://issues.apache.org/jira/browse/HIVE-16329
             Project: Hive
          Issue Type: Bug
            Reporter: Gopal V


{code}
      // TODO: For LLAP, assumption is off-heap cache.
      final long memoryUsedPerExecutor = 
(memoryMXBean.getHeapMemoryUsage().getUsed() / numExecutors);
      // this is total free memory available per executor in case of LLAP
      totalFreeMemory = conf.getMaxMemoryAvailable() - memoryUsedPerExecutor;
{code}

{code}
exec.TopNHash: isTez parameters -615768144 = 5312782848 - 71142611912 / 12
{code}

This turns off the TopNHash entirely causing something trivial like 

{code}
select c_custkey, count(1) from customer group by c_custkey limit 10;
{code}

To shuffle 30M rows instead of 10.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to