<?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: Obtain the actual query run on Hive when using hive.execution.engine=mr in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtain-the-actual-query-run-on-Hive-when-using-hive/m-p/139056#M39918</link>
    <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/738/markpetronic.html"&gt;Mark Petronic&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One option is to monitor the hive log located at /var/log/hive&lt;/P&gt;&lt;P&gt;I usually run a continuous tail and grep for keywords specific for SQL (you can build a file and read those keywords from the file and then grep, use a few pipes to achieve this)&lt;/P&gt;&lt;PRE&gt;tail -f hiveserver2.log | grep SELECT FROM&lt;/PRE&gt;&lt;P&gt;or run post-mortem a cat command with grep on the same file knowing the approximate timestamps. One can build an intelligent script to parse the logs if each query executed starts and ends with setting a sort of tag variable.&lt;/P&gt;&lt;P&gt;Unfortunately, this is a bit ugly. That's where HiveSQL was before Tez. &lt;/P&gt;&lt;P&gt;If any of the responses to your question addressed the problem don't forget to vote and accept the answer. If you fix the issue on your own, don't forget to post the answer to your own question. A moderator will review it and accept it.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2016 08:31:09 GMT</pubDate>
    <dc:creator>cstanca</dc:creator>
    <dc:date>2016-09-07T08:31:09Z</dc:date>
    <item>
      <title>Obtain the actual query run on Hive when using hive.execution.engine=mr</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtain-the-actual-query-run-on-Hive-when-using-hive/m-p/139055#M39917</link>
      <description>&lt;P&gt;As an administrator, you can easily use the Tez view in Ambari to see the actual full HQL query that was executed by any user. How do you obtain the actual query that was run when hive.execution.engine=mr?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 03:22:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtain-the-actual-query-run-on-Hive-when-using-hive/m-p/139055#M39917</guid>
      <dc:creator>Mark_Petronic</dc:creator>
      <dc:date>2016-09-07T03:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain the actual query run on Hive when using hive.execution.engine=mr</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtain-the-actual-query-run-on-Hive-when-using-hive/m-p/139056#M39918</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/738/markpetronic.html"&gt;Mark Petronic&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One option is to monitor the hive log located at /var/log/hive&lt;/P&gt;&lt;P&gt;I usually run a continuous tail and grep for keywords specific for SQL (you can build a file and read those keywords from the file and then grep, use a few pipes to achieve this)&lt;/P&gt;&lt;PRE&gt;tail -f hiveserver2.log | grep SELECT FROM&lt;/PRE&gt;&lt;P&gt;or run post-mortem a cat command with grep on the same file knowing the approximate timestamps. One can build an intelligent script to parse the logs if each query executed starts and ends with setting a sort of tag variable.&lt;/P&gt;&lt;P&gt;Unfortunately, this is a bit ugly. That's where HiveSQL was before Tez. &lt;/P&gt;&lt;P&gt;If any of the responses to your question addressed the problem don't forget to vote and accept the answer. If you fix the issue on your own, don't forget to post the answer to your own question. A moderator will review it and accept it.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 08:31:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtain-the-actual-query-run-on-Hive-when-using-hive/m-p/139056#M39918</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-09-07T08:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain the actual query run on Hive when using hive.execution.engine=mr</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtain-the-actual-query-run-on-Hive-when-using-hive/m-p/139057#M39919</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/3486/cstanca.html" nodeid="3486"&gt;@Constantin Stanca&lt;/A&gt;. Parsing that log will work just fine for my use case. Appreciate your help!!! &lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2016 05:18:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtain-the-actual-query-run-on-Hive-when-using-hive/m-p/139057#M39919</guid>
      <dc:creator>Mark_Petronic</dc:creator>
      <dc:date>2016-09-10T05:18:59Z</dc:date>
    </item>
  </channel>
</rss>

