<?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 Passing Global Properties to Hive Action Parameter in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Passing-Global-Properties-to-Hive-Action-Parameter/m-p/128141#M47487</link>
    <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;I would like to pass properties defined in the &amp;lt;global&amp;gt; section by &amp;lt;job-xml&amp;gt; or &amp;lt;configuration&amp;gt; to a Hive Action parameter. But I cannot manage to do so. Example config:&lt;/P&gt;&lt;PRE&gt;&amp;lt;workflow&amp;gt;
&amp;lt;global&amp;gt;
&amp;lt;job-xml&amp;gt;hive_params.xml&amp;lt;/job-xml&amp;gt;
&amp;lt;/global&amp;gt;
...
&amp;lt;hive 0.6&amp;gt;
&amp;lt;script&amp;gt;h_script.hql&amp;lt;/script&amp;gt;
&amp;lt;param&amp;gt;test=${test_from_hive_params_xml}&amp;lt;/param&amp;gt;
&amp;lt;/hive&amp;gt;&lt;/PRE&gt;&lt;P&gt;How can I achive this properly without changing my hive-site.xml? Or to pass a second xml to Hive but I do not want to change my hive-site.xml.&lt;/P&gt;&lt;P&gt;This is needed since I do not want to type all parameters by hand and pass it via the global section.&lt;/P&gt;&lt;P&gt;Looking forward to your help!&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2016 21:55:10 GMT</pubDate>
    <dc:creator>jiiiiken88</dc:creator>
    <dc:date>2016-11-29T21:55:10Z</dc:date>
    <item>
      <title>Passing Global Properties to Hive Action Parameter</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Passing-Global-Properties-to-Hive-Action-Parameter/m-p/128141#M47487</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;I would like to pass properties defined in the &amp;lt;global&amp;gt; section by &amp;lt;job-xml&amp;gt; or &amp;lt;configuration&amp;gt; to a Hive Action parameter. But I cannot manage to do so. Example config:&lt;/P&gt;&lt;PRE&gt;&amp;lt;workflow&amp;gt;
&amp;lt;global&amp;gt;
&amp;lt;job-xml&amp;gt;hive_params.xml&amp;lt;/job-xml&amp;gt;
&amp;lt;/global&amp;gt;
...
&amp;lt;hive 0.6&amp;gt;
&amp;lt;script&amp;gt;h_script.hql&amp;lt;/script&amp;gt;
&amp;lt;param&amp;gt;test=${test_from_hive_params_xml}&amp;lt;/param&amp;gt;
&amp;lt;/hive&amp;gt;&lt;/PRE&gt;&lt;P&gt;How can I achive this properly without changing my hive-site.xml? Or to pass a second xml to Hive but I do not want to change my hive-site.xml.&lt;/P&gt;&lt;P&gt;This is needed since I do not want to type all parameters by hand and pass it via the global section.&lt;/P&gt;&lt;P&gt;Looking forward to your help!&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 21:55:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Passing-Global-Properties-to-Hive-Action-Parameter/m-p/128141#M47487</guid>
      <dc:creator>jiiiiken88</dc:creator>
      <dc:date>2016-11-29T21:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Global Properties to Hive Action Parameter</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Passing-Global-Properties-to-Hive-Action-Parameter/m-p/128142#M47488</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/14229/jiiiiken88.html"&gt;Ken Jiiii&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You could create another file and call it from h_script.hql, or you just add lines to h_script.hql like the following:&lt;/P&gt;&lt;P&gt;This set statements will override the global settings for that specific job session.&lt;/P&gt;&lt;P&gt;Example of line:&lt;/P&gt;&lt;PRE&gt;set mapred.reduce.tasks=32;
&lt;/PRE&gt;&lt;P&gt;Almost anything that is Hive global environments XML is game for override at session level.&lt;/P&gt;&lt;P&gt;Look at this post: &lt;A href="https://community.hortonworks.com/articles/22419/hive-on-tez-performance-tuning-determining-reducer.html" target="_blank"&gt;https://community.hortonworks.com/articles/22419/hive-on-tez-performance-tuning-determining-reducer.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This shows a lot of these &lt;STRONG&gt;set&lt;/STRONG&gt; statements which you can include in your set_h_script.hql invoked from h_script.hql or in the block added the beginning of your h_script.hql. Personally, I prefer a separate file invoked from my job script. &lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2016 08:27:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Passing-Global-Properties-to-Hive-Action-Parameter/m-p/128142#M47488</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-12-29T08:27:43Z</dc:date>
    </item>
  </channel>
</rss>

