<?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: Pig script execution on Tez gets hung in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163739#M126113</link>
    <description>&lt;P&gt;I guess there is some problem with Tez config. As when I execute by checking ''Execute on Tez" it hungs and when unchecked (running as MapReduce) it works fine (attaching the log while executed as MapReduce).&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/13781-pig-script-success-when-exec-as-mapreduce.txt"&gt;pig-script-success-when-exec-as-mapreduce.txt&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 19 Mar 2017 22:33:42 GMT</pubDate>
    <dc:creator>subrata_bandyop</dc:creator>
    <dc:date>2017-03-19T22:33:42Z</dc:date>
    <item>
      <title>Pig script execution on Tez gets hung</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163735#M126109</link>
      <description>&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/13737-pig-script-error.txt"&gt;pig-script-error.txt&lt;/A&gt;&lt;P&gt;I'm trying to execute a pig script from Hortontonworks tutorial "Lab 3 - Pig Risk Factor Analysis Introduction". I'm trying with 'Execute on Tez' option checked. But the script shows running for long time and finally I had to kill the job (after more than 30Mins of execution).&lt;/P&gt;&lt;P&gt;I did syntax check before executing and no errors found. I didn't executed the script from shell yet.&lt;/P&gt;&lt;P&gt;Does anybody give me an idea that what might be causing this issue ?&lt;/P&gt;&lt;P&gt;Attached is the log and the script as as below :&lt;/P&gt;&lt;P&gt;a = LOAD 'geolocation' USING org.apache.hive.hcatalog.pig.HCatLoader();
b = FILTER a BY event != 'normal';
c = FOREACH b GENERATE driverid, event, (int) '1' as occurance;
d = GROUP c BY driverid;
e = FOREACH d GENERATE group as driverid, SUM(c.occurance) as t_occ;
g = LOAD 'driver_mileage' USING org.apache.hive.hcatalog.pig.HCatLoader();
h = JOIN e BY driverid, g BY driverid;
final_data = foreach h generate $0 as driverid, $1 as events, $3 as totmiles, (float) $3/$1 as riskfactor;
STORE final_data INTO 'riskfactor' using org.apache.hive.hcatalog.pig.HCatStorer();&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2017 01:26:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163735#M126109</guid>
      <dc:creator>subrata_bandyop</dc:creator>
      <dc:date>2017-03-19T01:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Pig script execution on Tez gets hung</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163736#M126110</link>
      <description>&lt;P&gt;Can you please post the yarn application logs for application_1489855879213_0002 &lt;/P&gt;&lt;P&gt;Use the below command to get the application logs: &lt;/P&gt;&lt;PRE&gt; yarn logs -applicationId application_1489855879213_0002 &lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Mar 2017 02:37:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163736#M126110</guid>
      <dc:creator>namaheshwari</dc:creator>
      <dc:date>2017-03-19T02:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pig script execution on Tez gets hung</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163737#M126111</link>
      <description>&lt;P&gt;It looks like Tez AM container cannot be scheduled. Typically this is caused by not enough resource. Please check your cluster capacity to ensure you have enough resource for Tez container.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2017 13:31:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163737#M126111</guid>
      <dc:creator>zyang</dc:creator>
      <dc:date>2017-03-19T13:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pig script execution on Tez gets hung</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163738#M126112</link>
      <description>&lt;P&gt;Thanks for replying.  Attaching the yarn log retrieved from shell.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2017 21:59:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163738#M126112</guid>
      <dc:creator>subrata_bandyop</dc:creator>
      <dc:date>2017-03-19T21:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Pig script execution on Tez gets hung</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163739#M126113</link>
      <description>&lt;P&gt;I guess there is some problem with Tez config. As when I execute by checking ''Execute on Tez" it hungs and when unchecked (running as MapReduce) it works fine (attaching the log while executed as MapReduce).&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/13781-pig-script-success-when-exec-as-mapreduce.txt"&gt;pig-script-success-when-exec-as-mapreduce.txt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2017 22:33:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163739#M126113</guid>
      <dc:creator>subrata_bandyop</dc:creator>
      <dc:date>2017-03-19T22:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Pig script execution on Tez gets hung</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163740#M126114</link>
      <description>&lt;P&gt;There are no explicit errors in the application logs. Can you reproduce the issue?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 05:12:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163740#M126114</guid>
      <dc:creator>namaheshwari</dc:creator>
      <dc:date>2017-03-20T05:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Pig script execution on Tez gets hung</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163741#M126115</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;PRE&gt;2017-03-18 22:43:27,002 [PigTezLauncher-0] INFO  org.apache.hadoop.yarn.client.api.impl.YarnClientImpl - Submitted application application_1489855879213_0002
2017-03-18 22:43:27,005 [PigTezLauncher-0] INFO  org.apache.tez.client.TezClient - The url to track the Tez Session: &lt;A href="http://pc-1.thenet.edu:8088/proxy/application_1489855879213_0002/" target="_blank"&gt;http://pc-1.thenet.edu:8088/proxy/application_1489855879213_0002/&lt;/A&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;I agree with zyang. Looking at the logs, it appears that there isn't enough capacity to launch. Can you verify the queue configs and cluster capacity?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 10:52:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163741#M126115</guid>
      <dc:creator>rbalamohan</dc:creator>
      <dc:date>2017-03-20T10:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Pig script execution on Tez gets hung</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163742#M126116</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/311/rbalamohan.html" nodeid="311"&gt;@Rajesh Balamohan&lt;/A&gt; - The below apache jira talks about the issue when Pig on Tez AM use too much memory on a small cluster:&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/PIG-4948" target="_blank"&gt;https://issues.apache.org/jira/browse/PIG-4948&lt;/A&gt;&lt;/P&gt;&lt;P&gt;To resolve this, as mentioned in the jira try setting below properties:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Set &lt;STRONG&gt;&lt;EM&gt;tez.am.resource.memory.mb &lt;/EM&gt;&lt;/STRONG&gt;to be the same as &lt;EM&gt;&lt;STRONG&gt;yarn.scheduler.minimum-allocation-mb&lt;/STRONG&gt;&lt;/EM&gt; the YARN minimum container size.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;pig.tez.configure.am.memory&lt;/STRONG&gt; to true&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 20 Mar 2017 12:04:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163742#M126116</guid>
      <dc:creator>namaheshwari</dc:creator>
      <dc:date>2017-03-20T12:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pig script execution on Tez gets hung</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163743#M126117</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/102/nmaheshwari.html" nodeid="102"&gt;@Namit Maheshwari&lt;/A&gt;Thank you very much for the guidance and appropriate answer. With the above settings the issue got resolved.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 23:27:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Pig-script-execution-on-Tez-gets-hung/m-p/163743#M126117</guid>
      <dc:creator>subrata_bandyop</dc:creator>
      <dc:date>2017-03-20T23:27:38Z</dc:date>
    </item>
  </channel>
</rss>

