<?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 query  OutOfMemoryError: Java heap space in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166335#M29569</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/2337/kvasko.html" nodeid="2337"&gt;@Kevin Vasko&lt;/A&gt;&lt;P&gt;Can you give me the output of ps -ef | grep hiveserver2 ?&lt;/P&gt;</description>
    <pubDate>Wed, 25 May 2016 09:14:26 GMT</pubDate>
    <dc:creator>divakarreddy_a</dc:creator>
    <dc:date>2016-05-25T09:14:26Z</dc:date>
    <item>
      <title>Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166334#M29568</link>
      <description>&lt;P&gt;I am issuing a command that is executing about 1500 xpaths on a single XML file (it is about 10MB in size).&lt;/P&gt;&lt;P&gt;I am getting the error in the title. I have tried increasing just about every configuration setting I know related to Hive/Tez's java heap space. &lt;/P&gt;&lt;P&gt;e.g. &lt;A href="https://community.hortonworks.com/questions/5780/hive-on-tez-query-map-output-outofmemoryerror-java.html" target="_blank"&gt;https://community.hortonworks.com/questions/5780/hive-on-tez-query-map-output-outofmemoryerror-java.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Nothing seems to work. I restart the server after every configuration change.&lt;/P&gt;&lt;P&gt;I also went and changed hive-env.sh to -Xmx8g and it still doesn't seem to fix the issue. I ran -verbose:gc and see that the gc stops at ~1000MB. Why wouldn't that go on up to 8G if I changed -Xmx to be 8g?&lt;/P&gt;&lt;P&gt;Is there anyway to tell if it is the client breaking and needing more heap or the map jobs? &lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 08:48:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166334#M29568</guid>
      <dc:creator>kvasko</dc:creator>
      <dc:date>2016-05-25T08:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166335#M29569</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/2337/kvasko.html" nodeid="2337"&gt;@Kevin Vasko&lt;/A&gt;&lt;P&gt;Can you give me the output of ps -ef | grep hiveserver2 ?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 09:14:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166335#M29569</guid>
      <dc:creator>divakarreddy_a</dc:creator>
      <dc:date>2016-05-25T09:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166336#M29570</link>
      <description>&lt;P&gt;hive  24964  0.2  1.7 2094636 566148 ?  Sl  17:03  0:56 /usr/lib/jvm/ja  va-1.7.0-openjdk-1.7.0.91.x86_64/bin/java -Xmx1024m -Dhdp.version=2.3.2.0-2950 -  Djava.net.preferIPv4Stack=true -Dhdp.version=2.3.2.0-2950 -Dhadoop.log.dir=/var/  log/hadoop/hive -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/usr/hdp/2.3.2.0-  2950/hadoop -Dhadoop.id.str=hive -Dhadoop.root.logger=INFO,console -Djava.librar  y.path=:/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64:/usr/hdp/2.3.2.  0-2950/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.prefe  rIPv4Stack=true -Xmx1024m -XX:MaxPermSize=512m -Dhadoop.security.logger=INFO,Nul  lAppender org.apache.hadoop.util.RunJar /usr/hdp/2.3.2.0-2950/hive/lib/hive-serv  ice-1.2.1.2.3.2.0-2950.jar org.apache.hive.service.server.HiveServer2 --hiveconf  hive.aux.jars.path=file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hca  talog-core.jar -hiveconf hive.metastore.uris=  -hiveconf hive.log.file=hiveserve  r2.log -hiveconf hive.log.dir=/var/log/hive&lt;/P&gt;&lt;P&gt;So I can see that it is set at 1024m, however it is set to some really large value. &lt;/P&gt;&lt;P&gt;&lt;A href="http://imgur.com/3oXfpPj" target="_blank"&gt;http://imgur.com/3oXfpPj&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 10:27:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166336#M29570</guid>
      <dc:creator>kvasko</dc:creator>
      <dc:date>2016-05-25T10:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166337#M29571</link>
      <description>&lt;P&gt;Xmx1024m means it's just 1 GB, please increase it to 4 or 6 or 8 GB based on available Memory.&lt;/P&gt;&lt;P&gt;Go to Ambari -Hive-search for heap (hive.heapsize) and update the value to 8192 and then re-start affected services.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 11:06:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166337#M29571</guid>
      <dc:creator>divakarreddy_a</dc:creator>
      <dc:date>2016-05-25T11:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166338#M29572</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2348/divakarreddya.html" nodeid="2348"&gt;@Divakar Annapureddy&lt;/A&gt;Correct but if you look at my comments i posted a picture and it shows, it is changed to 12GB in the UI. The services have been restarted (complete server has been restarted).&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 11:09:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166338#M29572</guid>
      <dc:creator>kvasko</dc:creator>
      <dc:date>2016-05-25T11:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166339#M29573</link>
      <description>&lt;P&gt;your GUI is showing around 12 GB but it's not showing in your ps -ef script. it means your 12 GB doesn't take an effect..&lt;/P&gt;&lt;P&gt;May be ambari issue or some hard coded value is not allowing to update.&lt;/P&gt;&lt;P&gt;I would recommend to increase 6 GB or 8 GB instead of 12GB, 12 GB is very high number.  &lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 11:21:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166339#M29573</guid>
      <dc:creator>divakarreddy_a</dc:creator>
      <dc:date>2016-05-25T11:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166340#M29574</link>
      <description>&lt;P&gt;The configuration of hive.heapsize does not exist in my hive-site.xml for some reason and whenever I add it to the file it keeps getting overwritten.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 11:49:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166340#M29574</guid>
      <dc:creator>kvasko</dc:creator>
      <dc:date>2016-05-25T11:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166341#M29575</link>
      <description>&lt;P&gt;yes, we have to make changes through Ambari only if your cluster managed by Ambari.  Ambari will overwrite the changes if we make any changes at command level.&lt;/P&gt;&lt;P&gt;nothing to do with hive-site.xml , we have to check in hive-env.sh&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 12:08:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166341#M29575</guid>
      <dc:creator>divakarreddy_a</dc:creator>
      <dc:date>2016-05-25T12:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166342#M29576</link>
      <description>&lt;P&gt;what do I need to set in hive-env.sh? It seems that anything I touch it gets overwritten. This has to be a bug in ambari where it won't save the hive.heapsize value. How can I get it to persist?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 12:34:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166342#M29576</guid>
      <dc:creator>kvasko</dc:creator>
      <dc:date>2016-05-25T12:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166343#M29577</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2337/kvasko.html" nodeid="2337"&gt;@Kevin Vasko&lt;/A&gt;
Hi Kevin, can you export the below in hive-env.sh file from Ambari then restart the affected components :&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;export HADOOP_CLIENT_OPTS="-Xmx6144m"&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;Then run the below command on the node where HS2 is running as hive user, to check the heap size (MaxHeapSize):&lt;/P&gt;&lt;P&gt;# jmap -heap &amp;lt;PID-of-HS2&amp;gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 14:25:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166343#M29577</guid>
      <dc:creator>krajguru</dc:creator>
      <dc:date>2016-05-25T14:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Hive query  OutOfMemoryError: Java heap space</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166344#M29578</link>
      <description>&lt;P&gt;I have faced same issue .Please increase the memory before running the hive query .But if you are not able to do  grep on xml then you have to split your file  on the basis of tags by using gawk.&lt;/P&gt;&lt;P&gt;set mapreduce.map.memory.mb=9000; &lt;/P&gt;&lt;P&gt;set mapreduce.map.java.opts=-Xmx7200m;&lt;/P&gt;&lt;P&gt;
set mapreduce.reduce.memory.mb=9000; &lt;/P&gt;&lt;P&gt;set mapreduce.reduce.java.opts=-Xmx7200m; &lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 01:05:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-query-OutOfMemoryError-Java-heap-space/m-p/166344#M29578</guid>
      <dc:creator>harkirat_singh2</dc:creator>
      <dc:date>2017-11-29T01:05:17Z</dc:date>
    </item>
  </channel>
</rss>

