<?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 Hive long time running &amp;quot;select * from categories&amp;quot;, Impala works ok in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hive-long-time-running-quot-select-from-categories-quot/m-p/64528#M4193</link>
    <description>&lt;P&gt;Hello, I have a problem with Hive and I don't know how to fix it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With Impala I can do a &lt;EM&gt;select * from categories&lt;/EM&gt;&amp;nbsp;(from "&lt;EM&gt;Get Started&lt;/EM&gt;" tutorial) with no problems, but I can't do it with Hive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With Hive, first I tried &lt;EM&gt;show tables&lt;/EM&gt;&amp;nbsp;command correctly. It shows the log and all the tables in &lt;EM&gt;Results&amp;nbsp;&lt;/EM&gt;output. This is the log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;INFO  : Compiling command(queryId=hive_20180212042222_7e9c76e8-1e88-43f7-92ac-f5cecb1d224d): show tables
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, type:string, comment:from deserializer)], properties:null)
INFO  : Completed compiling command(queryId=hive_20180212042222_7e9c76e8-1e88-43f7-92ac-f5cecb1d224d); Time taken: 0.011 seconds
INFO  : Executing command(queryId=hive_20180212042222_7e9c76e8-1e88-43f7-92ac-f5cecb1d224d): show tables
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing command(queryId=hive_20180212042222_7e9c76e8-1e88-43f7-92ac-f5cecb1d224d); Time taken: 0.024 seconds
INFO  : OK&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When trying to &lt;SPAN&gt;do a&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;select * from categories&lt;/EM&gt; the query keeps running with no end. In a few seconds it shows the log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;INFO  : Compiling command(queryId=hive_20180212042727_e0dd0e0d-b229-4824-bb23-b46fd4d87d15): select * from categories
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:categories.category_id, type:int, comment:null), FieldSchema(name:categories.category_department_id, type:int, comment:null), FieldSchema(name:categories.category_name, type:string, comment:null)], properties:null)
INFO  : Completed compiling command(queryId=hive_20180212042727_e0dd0e0d-b229-4824-bb23-b46fd4d87d15); Time taken: 0.087 seconds&lt;/PRE&gt;&lt;P&gt;But&amp;nbsp;doesn't show any data from the table in &lt;EM&gt;Results&lt;/EM&gt; output. It keeps running the query (in &lt;EM&gt;Query history&lt;/EM&gt; it says Query running in the yellow icon) and also the time of execution keeps increasing, with no end (or maybe till 2-3h).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I restarted all the services multiple times with no luck. Even I set the VM's RAM to 12GB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you give me a hand in order to fix the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 12:51:04 GMT</pubDate>
    <dc:creator>rvilla87</dc:creator>
    <dc:date>2022-09-16T12:51:04Z</dc:date>
    <item>
      <title>Hive long time running "select * from categories", Impala works ok</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-long-time-running-quot-select-from-categories-quot/m-p/64528#M4193</link>
      <description>&lt;P&gt;Hello, I have a problem with Hive and I don't know how to fix it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With Impala I can do a &lt;EM&gt;select * from categories&lt;/EM&gt;&amp;nbsp;(from "&lt;EM&gt;Get Started&lt;/EM&gt;" tutorial) with no problems, but I can't do it with Hive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With Hive, first I tried &lt;EM&gt;show tables&lt;/EM&gt;&amp;nbsp;command correctly. It shows the log and all the tables in &lt;EM&gt;Results&amp;nbsp;&lt;/EM&gt;output. This is the log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;INFO  : Compiling command(queryId=hive_20180212042222_7e9c76e8-1e88-43f7-92ac-f5cecb1d224d): show tables
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, type:string, comment:from deserializer)], properties:null)
INFO  : Completed compiling command(queryId=hive_20180212042222_7e9c76e8-1e88-43f7-92ac-f5cecb1d224d); Time taken: 0.011 seconds
INFO  : Executing command(queryId=hive_20180212042222_7e9c76e8-1e88-43f7-92ac-f5cecb1d224d): show tables
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing command(queryId=hive_20180212042222_7e9c76e8-1e88-43f7-92ac-f5cecb1d224d); Time taken: 0.024 seconds
INFO  : OK&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When trying to &lt;SPAN&gt;do a&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;select * from categories&lt;/EM&gt; the query keeps running with no end. In a few seconds it shows the log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;INFO  : Compiling command(queryId=hive_20180212042727_e0dd0e0d-b229-4824-bb23-b46fd4d87d15): select * from categories
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:categories.category_id, type:int, comment:null), FieldSchema(name:categories.category_department_id, type:int, comment:null), FieldSchema(name:categories.category_name, type:string, comment:null)], properties:null)
INFO  : Completed compiling command(queryId=hive_20180212042727_e0dd0e0d-b229-4824-bb23-b46fd4d87d15); Time taken: 0.087 seconds&lt;/PRE&gt;&lt;P&gt;But&amp;nbsp;doesn't show any data from the table in &lt;EM&gt;Results&lt;/EM&gt; output. It keeps running the query (in &lt;EM&gt;Query history&lt;/EM&gt; it says Query running in the yellow icon) and also the time of execution keeps increasing, with no end (or maybe till 2-3h).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I restarted all the services multiple times with no luck. Even I set the VM's RAM to 12GB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you give me a hand in order to fix the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:51:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-long-time-running-quot-select-from-categories-quot/m-p/64528#M4193</guid>
      <dc:creator>rvilla87</dc:creator>
      <dc:date>2022-09-16T12:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hive long time running "select * from categories", Impala works ok</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-long-time-running-quot-select-from-categories-quot/m-p/64639#M4194</link>
      <description>&lt;P&gt;I really don't understand what's going on. In case I broke some config, I have reset the VM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone can test this SQL sentence with Hive in &lt;SPAN&gt;Cloudera Quick Start VM 5.12 (VirtualBox format)&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;select * from customers;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are the steps I just have done:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Download &lt;STRONG&gt;Cloudera Quick Start VM 5.12&lt;/STRONG&gt; from here (&lt;STRONG&gt;VirtualBox&lt;/STRONG&gt; format): &lt;A href="https://www.cloudera.com/downloads/quickstart_vms/5-12.html" target="_blank"&gt;https://www.cloudera.com/downloads/quickstart_vms/5-12.html&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Configure the VM in order to have 2 CPU processes and 12GB of RAM (required to launch&amp;nbsp;&lt;STRONG&gt;Cloudera Express&lt;/STRONG&gt;).&lt;/LI&gt;&lt;LI&gt;Launch the VM.&lt;/LI&gt;&lt;LI&gt;Launch&amp;nbsp;&lt;STRONG&gt;Cloudera Express&lt;/STRONG&gt; with no problems.&lt;/LI&gt;&lt;LI&gt;In &lt;STRONG&gt;Cloudera Manager&lt;/STRONG&gt; I launch with no problem: &lt;STRONG&gt;HDFS&lt;/STRONG&gt;, &lt;STRONG&gt;Hive&lt;/STRONG&gt;, &lt;STRONG&gt;HUE&lt;/STRONG&gt;, &lt;STRONG&gt;Impala &lt;/STRONG&gt;and&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;YARN&lt;/STRONG&gt;, but they have some&amp;nbsp;warnings. Hive says "&lt;EM&gt;1 is less than the recommended minimum of 4.&lt;/EM&gt;" regarding&amp;nbsp;&lt;STRONG&gt;Spark Executor Cores&lt;/STRONG&gt; in &lt;EM&gt;Hive&lt;/EM&gt; and &lt;EM&gt;HiveServer2&lt;/EM&gt;.&lt;/LI&gt;&lt;LI&gt;In Linux terminal I launch the&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;sqoop&lt;/STRONG&gt; import-all-tables&lt;/EM&gt; indicated in&amp;nbsp;&lt;STRONG&gt;Tutorial Exercise 1&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;In &lt;FONT color="#339966"&gt;&lt;STRONG&gt;Impala&lt;/STRONG&gt; &lt;/FONT&gt;I execute&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;invalidate metadata;&lt;/EM&gt; and&amp;nbsp;&lt;EM&gt;select * from customers;&lt;/EM&gt;&lt;/SPAN&gt;&amp;nbsp;with no problems, and &lt;STRONG&gt;&lt;FONT color="#339966"&gt;returning all the records of the table in less than&amp;nbsp;1&amp;nbsp;second&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;In&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Hive&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;I execute&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;select * from customers;&lt;/EM&gt;&lt;/SPAN&gt;&amp;nbsp;and &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;the query keeps running with no end &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;(more than 30 min at least).&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Hive's log ("&lt;EM&gt;Show Logs&lt;/EM&gt;" icon in Hue) says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;INFO : Compiling command(queryId=hive_20180215091515_596862e0-3749-4b30-aa1c-4bdd4f7c76a8): select * from customers&lt;BR /&gt;INFO : Semantic Analysis Completed&lt;BR /&gt;INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:customers.customer_id, type:int, comment:null), FieldSchema(name:customers.customer_fname, type:string, comment:null), FieldSchema(name:customers.customer_lname, type:string, comment:null), FieldSchema(name:customers.customer_email, type:string, comment:null), FieldSchema(name:customers.customer_password, type:string, comment:null), FieldSchema(name:customers.customer_street, type:string, comment:null), FieldSchema(name:customers.customer_city, type:string, comment:null), FieldSchema(name:customers.customer_state, type:string, comment:null), FieldSchema(name:customers.customer_zipcode, type:string, comment:null)], properties:null)&lt;BR /&gt;INFO : Completed compiling command(queryId=hive_20180215091515_596862e0-3749-4b30-aa1c-4bdd4f7c76a8); Time taken: 0.05 seconds&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, what's happening? All seems ok but Hive doesn't return any record.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe this info can help to identify the problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other day I executed the query It took 3:30h and gave the next error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Error while processing statement: FAILED: Error in acquiring locks: Locks on the underlying objects cannot be acquired. retry after some time&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, when I execute the query "&lt;EM&gt;SHOW LOCKS customers;&lt;/EM&gt;"&amp;nbsp;it returns "&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Done. 0 results.&lt;/STRONG&gt;&lt;/FONT&gt;" but &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;it takes 57 seconds&lt;/STRONG&gt;.&lt;/FONT&gt; Is this normal? Maybe there is some performance problem with Hive?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested also to&amp;nbsp;change the&amp;nbsp;&lt;STRONG&gt;Spark Executor Cores&lt;/STRONG&gt; in Hive from 1 to 4 (in order to avoid the warning), to redeploy and restart Hive, Impala and Hue... but&amp;nbsp;it didn't fix the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me with this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At least saying something like "&lt;EM&gt;no one use VM in Virtualbox format, use Docker/VMWare/KVM instead&lt;/EM&gt;" or "&lt;EM&gt;I have no problem with Hive using&amp;nbsp;&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;Cloudera Quick Start VM 5.12 with VirtualBox format&lt;/EM&gt;".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 17:50:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-long-time-running-quot-select-from-categories-quot/m-p/64639#M4194</guid>
      <dc:creator>rvilla87</dc:creator>
      <dc:date>2018-02-15T17:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hive long time running "select * from categories", Impala works ok</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-long-time-running-quot-select-from-categories-quot/m-p/64655#M4195</link>
      <description>&lt;P&gt;I think I fixed the problem, I don't know exactly how.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing is, I really have a problem with &lt;STRONG&gt;Hive's performance&lt;/STRONG&gt;, the &lt;STRONG&gt;querys are running too slow&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Show tables&lt;/EM&gt;; takes 64-67 seconds the first time I execute the sentence with Hive just started. The next times it takes less than a second. But, trying to show 16k lines from customers takes too much and when running for 3:30h it gives the lock error (it's really a timeout, there are no locks).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried restarting the services according to&amp;nbsp;&lt;EM&gt;Showing Big Data Value&amp;nbsp;&lt;/EM&gt;(previous to exercise 2): &lt;STRONG&gt;HDFS&lt;/STRONG&gt;, &lt;STRONG&gt;Hive&lt;/STRONG&gt;, &lt;STRONG&gt;Hue&lt;/STRONG&gt; and &lt;STRONG&gt;Impala&lt;/STRONG&gt;, in the correct order with no luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But as last option I tried &lt;STRONG&gt;restarting all Cloudera Quickstart services and now Hive works OK&lt;/STRONG&gt;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe YARN, Zookeeper, Ozzie, or some other service is needed in order to Hive gain performance?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, at least now I can finish exercise 2... I hope Hive doesn't bring me more problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 03:14:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-long-time-running-quot-select-from-categories-quot/m-p/64655#M4195</guid>
      <dc:creator>rvilla87</dc:creator>
      <dc:date>2018-02-16T03:14:21Z</dc:date>
    </item>
  </channel>
</rss>

