<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Hive tez memory error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125870#M88614</link>
    <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/1234/sreesrinu38.html"&gt;Srinivasarao Darun&lt;/A&gt;a, can you give details of the HW and Spark config&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2017 02:28:41 GMT</pubDate>
    <dc:creator>mqadri</dc:creator>
    <dc:date>2017-07-13T02:28:41Z</dc:date>
    <item>
      <title>Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125860#M88604</link>
      <description>&lt;P&gt;Running in HDP 2.4&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; SELECT COUNT(*) from tweets;&lt;/PRE&gt;&lt;P&gt;I get &lt;/P&gt;&lt;PRE&gt;Error: Failure while running task:java.lang.IllegalArgumentException: tez.runtime.io.sort.mb 859 should be larger than 0 and should be less than the available task memory (MB):789&lt;/PRE&gt;&lt;P&gt;I have tried setting tez.runtime.io.sort.mb to 789 and also to 600. &lt;/P&gt;&lt;P&gt;I have tried running hive thus:&lt;/P&gt;&lt;PRE&gt;hive --hiveconf hive.tez.container.size=1024
&lt;/PRE&gt;&lt;P&gt;Always the same error.&lt;/P&gt;&lt;P&gt;My config is:&lt;/P&gt;&lt;PRE&gt; Using cores=16 memory=64GB disks=4 hbase=True
 Profile: cores=16 memory=49152MB reserved=16GB usableMem=48GB disks=4
 Num Container=8
 Container Ram=6144MB
 Used Ram=48GB
 Unused Ram=16GB
 ***** mapred-site.xml *****
 mapreduce.map.memory.mb=6144
 mapreduce.map.java.opts=-Xmx4096m
 mapreduce.reduce.memory.mb=6144
 mapreduce.reduce.java.opts=-Xmx4096m
 mapreduce.task.io.sort.mb=1792
 ***** yarn-site.xml *****
 yarn.scheduler.minimum-allocation-mb=6144
 yarn.scheduler.maximum-allocation-mb=49152
 yarn.nodemanager.resource.memory-mb=49152
 yarn.app.mapreduce.am.resource.mb=6144
 yarn.app.mapreduce.am.command-opts=-Xmx4096m
 ***** tez-site.xml *****
 tez.am.resource.memory.mb=6144
 tez.am.java.opts=-Xmx4096m
 ***** hive-site.xml *****
 hive.tez.container.size=6144
 hive.tez.java.opts=-Xmx4096m
 hive.auto.convert.join.noconditionaltask.size=1342177000
&lt;/PRE&gt;&lt;P&gt;Any help is much appreciated.  TIA!!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 04:05:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125860#M88604</guid>
      <dc:creator>ed_day</dc:creator>
      <dc:date>2017-01-12T04:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125861#M88605</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11394/edday.html" nodeid="11394"&gt;@ed day&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Could you check the value for property 'tez.task.resource.memory.mb'?&lt;/P&gt;&lt;P&gt;And try increasing the value of the property tez.task.resource.memory.mb=2048 and check.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 04:27:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125861#M88605</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2017-01-12T04:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125862#M88606</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11394/edday.html" nodeid="11394"&gt;@ed day&lt;/A&gt; You can also look at (tez-config) tez.task.launch.cmd-opts via Ambari to see the amount of heap set for -Xmx and also ensure it matches the value in hive.tez.java.opts (hive config)&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 05:37:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125862#M88606</guid>
      <dc:creator>srai1</dc:creator>
      <dc:date>2017-01-12T05:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125863#M88607</link>
      <description>&lt;P&gt;Thanks Sindhu.  I upped it from 1024 to 2048 but still same error.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 18:11:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125863#M88607</guid>
      <dc:creator>ed_day</dc:creator>
      <dc:date>2017-01-12T18:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125864#M88608</link>
      <description>&lt;P&gt;Thanks srai. There is  no -Xmx in either of these. For me, tez.task.launch.cmd-opts is: &lt;/P&gt;&lt;PRE&gt;-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseParallelGC
&lt;/PRE&gt;&lt;P&gt;hive.tez.java.opts is:&lt;/P&gt;&lt;PRE&gt;-server -Djava.net.preferIPv4Stack=true -XX:NewRatio=8 -XX:+UseNUMA -XX:+UseParallelGC -XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps
&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Jan 2017 18:27:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125864#M88608</guid>
      <dc:creator>ed_day</dc:creator>
      <dc:date>2017-01-12T18:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125865#M88609</link>
      <description>&lt;P&gt;I've tried the following:&lt;/P&gt;&lt;P&gt;Upped hive.tez.container.size to 2048&lt;/P&gt;&lt;P&gt;tez.am.resource.memory.mb = 2048&lt;/P&gt;&lt;P&gt;hive.tez.container.size=4096&lt;/P&gt;&lt;P&gt;tez.runtime.io.sort.mb = 409&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 18:58:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125865#M88609</guid>
      <dc:creator>ed_day</dc:creator>
      <dc:date>2017-01-12T18:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125866#M88610</link>
      <description>&lt;P&gt;tez.runtime.io.sort.mb to 1024&lt;/P&gt;&lt;P&gt;Changed: HADOOP_USER_NAME=hdfs hive --hiveconf hive.tez.container.size=2048&lt;/P&gt;&lt;P&gt;Now a different error. So that is good...ish.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 19:21:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125866#M88610</guid>
      <dc:creator>ed_day</dc:creator>
      <dc:date>2017-01-12T19:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125867#M88611</link>
      <description>&lt;OL&gt;
&lt;LI&gt;You can remove "hive.tez.java.opts=-Xmx4096m". Tez automatically takes up 80% of the container size allocated to it. As per your hive-site.xml and yarn-site.xml, "hive.tez.container.size=6144", "yarn.scheduler.minimum-allocation-mb=6144".  So ~4915MB should be automatically be assigned without specifying any Xmx value in hive.tez.java.opts. &lt;/LI&gt;&lt;LI&gt;Remove "--hiveconf hive.tez.container.size=2048" from hive cli command. By specifying 2048, it would end up under utilizing the memory. &lt;/LI&gt;&lt;LI&gt;After incorporating #1, with the current config in hive-site, yarn-site you have posted, can you run "hive" cli without specifying any option and run the query?&lt;/LI&gt;&lt;LI&gt;For simple like select count(*) from table, it should not launch tez job if it had enough information about the rows in metastore. Run "analyze table tweets compute statistics" and re-run this select count(*) statement. It should fetch information from metastore directly as opposed to launching the tez job.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 13 Jan 2017 00:02:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125867#M88611</guid>
      <dc:creator>rbalamohan</dc:creator>
      <dc:date>2017-01-13T00:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125868#M88612</link>
      <description>&lt;P&gt;This ultimately lead me to the solution. I started by removing hive.tez.java.opts -Xmx200m which gave me a slightly higher value in my error message increased from 192 MB to the 245 MB show below but my sort size was still to big.&lt;/P&gt;&lt;P&gt;tez.runtime.io.sort.mb 3244 should be larger than 0 and should be less than the available task memory (MB):245&lt;/P&gt;&lt;P&gt;Removing it here allows me to leave the sort size and task completes as expected.&lt;/P&gt;&lt;P&gt;tez.task.launch.cmd-opts -Xmx256m{{heap_dump_opts}}  CHANGED TO RECOMMENDED shown next.
-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseParallelGC{{heap_dump_opts}}&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2017 22:25:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125868#M88612</guid>
      <dc:creator>ahoneycutt</dc:creator>
      <dc:date>2017-05-25T22:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125869#M88613</link>
      <description>&lt;P&gt;Thanks, I didn't see this until after the struggle but this worked for me.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2017 22:31:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125869#M88613</guid>
      <dc:creator>ahoneycutt</dc:creator>
      <dc:date>2017-05-25T22:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125870#M88614</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/1234/sreesrinu38.html"&gt;Srinivasarao Darun&lt;/A&gt;a, can you give details of the HW and Spark config&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 02:28:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125870#M88614</guid>
      <dc:creator>mqadri</dc:creator>
      <dc:date>2017-07-13T02:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hive tez memory error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125871#M88615</link>
      <description>&lt;P&gt;Hi Muji, the above solved my problem. Thanks anyway.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 15:26:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-tez-memory-error/m-p/125871#M88615</guid>
      <dc:creator>ed_day</dc:creator>
      <dc:date>2017-07-13T15:26:55Z</dc:date>
    </item>
  </channel>
</rss>

