<?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 how to add properties by REST API in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-add-properties-by-REST-API/m-p/208834#M81449</link>
    <description>&lt;P&gt;we have ambari cluster version 2.6.1 with HDP version - 2.6.4&lt;/P&gt;&lt;P&gt;I want to add by API those properties &lt;/P&gt;&lt;P&gt;Ambari dasboard.--&amp;gt; YARN
--&amp;gt; Configs--&amp;gt;Advanced--&amp;gt;Customer yarn-site --&amp;gt; Click on "&lt;STRONG&gt;Add
Property&lt;/STRONG&gt;" &lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;yarn.nodemanager.localizer.cache.target-size-mb
= 10240&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;yarn.nodemanager.localizer.cache.cleanup.interval-ms
= 300000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;so both parameters will be in &lt;STRONG&gt;Customer yarn-site &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;please advice how to do this task with REST API? &lt;/P&gt;</description>
    <pubDate>Tue, 31 Jul 2018 22:24:57 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2018-07-31T22:24:57Z</dc:date>
    <item>
      <title>how to add properties by REST API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-add-properties-by-REST-API/m-p/208834#M81449</link>
      <description>&lt;P&gt;we have ambari cluster version 2.6.1 with HDP version - 2.6.4&lt;/P&gt;&lt;P&gt;I want to add by API those properties &lt;/P&gt;&lt;P&gt;Ambari dasboard.--&amp;gt; YARN
--&amp;gt; Configs--&amp;gt;Advanced--&amp;gt;Customer yarn-site --&amp;gt; Click on "&lt;STRONG&gt;Add
Property&lt;/STRONG&gt;" &lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;yarn.nodemanager.localizer.cache.target-size-mb
= 10240&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;yarn.nodemanager.localizer.cache.cleanup.interval-ms
= 300000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;so both parameters will be in &lt;STRONG&gt;Customer yarn-site &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;please advice how to do this task with REST API? &lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 22:24:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-add-properties-by-REST-API/m-p/208834#M81449</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-07-31T22:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to add properties by REST API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-add-properties-by-REST-API/m-p/208835#M81450</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="#"&gt;@Michael Bronson&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;I see you want to perform this operation via REST API , I see the rest api method is very tough at you need to fetch the whole configs first, add your own configs and use PUT method to save it.&lt;/P&gt;&lt;P&gt;I would suggest you use config.py method.&lt;/P&gt;&lt;P&gt;for ex: below commands worked for me. Please note i use admin/admin and my cluster name is asnaik ,&lt;/P&gt;&lt;PRE&gt;[root@anaik1 ~]# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=anaik1 --cluster=asnaik --config-type=yarn-site --key=yarn.nodemanager.localizer.cache.target-size-mb --value=10240 &lt;/PRE&gt;&lt;PRE&gt;[root@anaik1 ~]# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=anaik1 --cluster=asnaik --config-type=yarn-site --key=yarn.nodemanager.localizer.cache.cleanup.interval-ms --value=300000&lt;/PRE&gt;&lt;P&gt;Please mark the thread as resolved if this answers your query.&lt;/P&gt;&lt;P&gt;Let me know if you need the harder method. can help you with that too. but requires two REST API calls and some shell scripting.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 01:37:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-add-properties-by-REST-API/m-p/208835#M81450</guid>
      <dc:creator>akhilsnaik</dc:creator>
      <dc:date>2018-08-01T01:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to add properties by REST API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-add-properties-by-REST-API/m-p/208836#M81451</link>
      <description>&lt;P&gt;@Akhil thank you so much its works very cool , &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Another question regarding the configs.py&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;lets say we want to add anew line as &lt;STRONG&gt;YARN_TEST=TEST&lt;/STRONG&gt; in yarn-env template ( under &lt;/P&gt;&lt;P&gt;Advanced yarn-env ) &lt;/P&gt;&lt;PRE&gt;YARN_TEST=TEST&lt;/PRE&gt;
&lt;PRE&gt;   &lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Aug 2018 15:03:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-add-properties-by-REST-API/m-p/208836#M81451</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-01T15:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to add properties by REST API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-add-properties-by-REST-API/m-p/208837#M81452</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;sorry i missed the comment as you didnt tag me by name.&lt;/P&gt;&lt;P&gt;you can follow the same method with &lt;STRONG&gt;--action=set  .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;you can refer to this Good document by apache : &lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations#Modifyconfigurations-Editconfigurationusingconfigs.py" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations#Modifyconfigurations-Editconfigurationusingconfigs.py&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please Mark answer as resolved if this helped you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 01:29:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-add-properties-by-REST-API/m-p/208837#M81452</guid>
      <dc:creator>akhilsnaik</dc:creator>
      <dc:date>2018-08-02T01:29:00Z</dc:date>
    </item>
  </channel>
</rss>

