<?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: API to manage YARN Capacity Queue in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150811#M28510</link>
    <description>&lt;P&gt;I started there but didn't see anything that looked like what i needed. There are a few options to PUT or POST but i didn't see anything that mapped users to queues.  Lets see what else we can find.&lt;/P&gt;</description>
    <pubDate>Tue, 17 May 2016 02:07:31 GMT</pubDate>
    <dc:creator>tveil</dc:creator>
    <dc:date>2016-05-17T02:07:31Z</dc:date>
    <item>
      <title>API to manage YARN Capacity Queue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150808#M28507</link>
      <description>&lt;P&gt;Is there a Java or REST API for mapping users to capacity queues similar to what is accomplished by setting "yarn.scheduler.capacity.queue-mappings" in "capacity-scheduler.xml".  Looking for a programatic approach to manage queues as new users are added to the system.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 01:53:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150808#M28507</guid>
      <dc:creator>tveil</dc:creator>
      <dc:date>2016-05-17T01:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: API to manage YARN Capacity Queue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150809#M28508</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/404/tveil.html" nodeid="404"&gt;@Tim Veil&lt;/A&gt; I believe the REST API for the scheduler only supports GET operations as per &lt;A href="https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html" target="_blank"&gt;https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 02:01:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150809#M28508</guid>
      <dc:creator>iroberts</dc:creator>
      <dc:date>2016-05-17T02:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: API to manage YARN Capacity Queue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150810#M28509</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/404/tveil.html" nodeid="404"&gt;@Tim Veil&lt;/A&gt;&lt;P&gt;I could not find REST API to update queue mappings however I could think of using /var/lib/ambari-server/resources/scripts/configs.sh to update queue mapping(yarn.scheduler.capacity.queue-mappings) programmatically&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 02:04:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150810#M28509</guid>
      <dc:creator>KuldeepK</dc:creator>
      <dc:date>2016-05-17T02:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: API to manage YARN Capacity Queue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150811#M28510</link>
      <description>&lt;P&gt;I started there but didn't see anything that looked like what i needed. There are a few options to PUT or POST but i didn't see anything that mapped users to queues.  Lets see what else we can find.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 02:07:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150811#M28510</guid>
      <dc:creator>tveil</dc:creator>
      <dc:date>2016-05-17T02:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: API to manage YARN Capacity Queue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150812#M28511</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/404/tveil.html" nodeid="404"&gt;@Tim Veil&lt;/A&gt; It is possible to use the Ambari REST API to change that config.  Below is an example:&lt;/P&gt;&lt;P&gt;curl -v -u admin:admin -H "Content-Type: application/json" -H "X-Requested-By:ambari" -X PUT &lt;A href="http://&amp;lt;AMBARI-SERVER&amp;gt;:8080/api/v1/views/CAPACITY-SCHEDULER/versions/1.0.0/instances/AUTO_CS_INSTANCE/resources/scheduler/configuration" target="_blank"&gt;http://&amp;lt;AMBARI-SERVER&amp;gt;:8080/api/v1/views/CAPACITY-SCHEDULER/versions/1.0.0/instances/AUTO_CS_INSTANCE/resources/scheduler/configuration&lt;/A&gt; --data '{ 
"Clusters": { 
"desired_config": [ 
{ 
"type": "capacity-scheduler", 
"tag": "version14534007568115", 
"service_config_version_note": "To test", 
"properties": { 
"yarn.scheduler.capacity.maximum-am-resource-percent": 0.2, 
"yarn.scheduler.capacity.maximum-applications": 10000, 
"yarn.scheduler.capacity.node-locality-delay": 40, 
"yarn.scheduler.capacity.resource-calculator": "org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator", 
"yarn.scheduler.capacity.queue-mappings-override.enable": false, 
"yarn.scheduler.capacity.root.acl_administer_queue": "*", 
"yarn.scheduler.capacity.root.capacity": 100, 
"yarn.scheduler.capacity.root.queues": "default", 
"yarn.scheduler.capacity.root.accessible-node-labels": "*", 
"yarn.scheduler.capacity.root.default.acl_submit_applications": "*", 
"yarn.scheduler.capacity.root.default.maximum-capacity": 100, 
"yarn.scheduler.capacity.root.default.user-limit-factor": 0.5, 
"yarn.scheduler.capacity.root.default.state": "RUNNING", 
"yarn.scheduler.capacity.root.default.capacity": 100 
} 
} 
] 
} 
}'&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 02:12:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150812#M28511</guid>
      <dc:creator>iroberts</dc:creator>
      <dc:date>2016-05-17T02:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: API to manage YARN Capacity Queue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150813#M28512</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/349/iroberts.html" nodeid="349"&gt;@Ian Roberts&lt;/A&gt; I tried this but I'm getting the Exception below. Any ideas? Im able to hit the URL &lt;A href="http://xxx:8080/api/v1/clusters/AT/"&gt;http://xxx:8080/api/v1/clusters/AT/&lt;/A&gt; and get configuration output on a browser.&lt;/P&gt;&lt;P&gt;{"message":"RA040 I/O error while requesting Ambari","status":500,"trace":"org.apache.ambari.view.utils.ambari.AmbariApiException: RA040 I/O error while requesting Ambari org.apache.ambari.view.utils.ambari.AmbariApi.requestClusterAPI(AmbariApi.java:176) org.apache.ambari.view.capacityscheduler.ConfigurationService.writeConfiguration(ConfigurationService.java:409)...&lt;/P&gt;&lt;P&gt;Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: &lt;A href="http://xxx:8080/api/v1/clusters/AT/"&gt;http://xxx:8080/api/v1/clusters/AT/&lt;/A&gt; sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1627) java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468) org.apache.ambari.server.controller.internal.URLStreamProvider.processURL(URLStreamProvider.java:209)\n\t... 97 more\n"}&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 02:29:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150813#M28512</guid>
      <dc:creator>LINDA_K_MMAYI</dc:creator>
      <dc:date>2016-05-26T02:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: API to manage YARN Capacity Queue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150814#M28513</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/349/iroberts.html" nodeid="349"&gt;@Ian Roberts&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I know this is a bit of an old thread but I was wondering if you know if the syntax has changed at all with the new HDP version. I have been using HDP 2.5 sandbox and calling this gives me a 415 error indicating that application/json requests are not supported. Do you know how I can implement this programatically in the new HDP version?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 07:00:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150814#M28513</guid>
      <dc:creator>john_yawney</dc:creator>
      <dc:date>2016-09-20T07:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: API to manage YARN Capacity Queue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150815#M28514</link>
      <description>&lt;P&gt;I have figured out a solution. For anyone who is
interested in this particular problem the approach that I took was to run the
following commands:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;curl -u admin:admin -H "X-Requested-By:ambari"
-iX PUT -d @&amp;lt;json-file&amp;gt;
&lt;A href="http://&amp;lt;ambari-server&amp;gt;:8080/api/v1/clusters/&amp;lt;cluster-name&amp;gt;" target="_blank"&gt;http://&amp;lt;ambari-server&amp;gt;:8080/api/v1/clusters/&amp;lt;cluster-name&amp;gt;&lt;/A&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;where &amp;lt;json-file&amp;gt; has the same structure as
mentioned in &lt;A rel="user" href="https://community.cloudera.com/users/349/iroberts.html" nodeid="349"&gt;@Ian Roberts&lt;/A&gt; solution. Note that 'tag' needs to have a unique
value. The resource manager in yarn then
needs to be restarted which can be done via:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;curl -u admin:admin -H "X-Requested-By:ambari"
-iX PUT -d
'{"ServiceComponentInfo":{"state":"INSTALLED"}}'
&lt;A href="http://&amp;lt;ambari-server&amp;gt;:8080/api/v1/clusters/&amp;lt;cluster-name&amp;gt;/services/YARN/components/RESOURCEMANAGER" target="_blank"&gt;http://&amp;lt;ambari-server&amp;gt;:8080/api/v1/clusters/&amp;lt;cluster-name&amp;gt;/services/YARN/components/RESOURCEMANAGER&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;curl -u admin:admin -H "X-Requested-By:ambari"
-iX PUT -d
'{"ServiceComponentInfo":{"state":"STARTED"}}'
&lt;A href="http://&amp;lt;ambari-server&amp;gt;:8080/api/v1/clusters/&amp;lt;cluster-name&amp;gt;/services/YARN/components/RESOURCEMANAGER" target="_blank"&gt;http://&amp;lt;ambari-server&amp;gt;:8080/api/v1/clusters/&amp;lt;cluster-name&amp;gt;/services/YARN/components/RESOURCEMANAGER&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 09:44:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150815#M28514</guid>
      <dc:creator>john_yawney</dc:creator>
      <dc:date>2016-09-20T09:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: API to manage YARN Capacity Queue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150816#M28515</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/404/tveil.html" nodeid="404"&gt;@Tim Veil&lt;/A&gt;&lt;P&gt;Please refer link for working command to achieve queue addition using script / in automated way -&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/155903/how-to-add-new-yarn-queue-using-rest-api-ambari-co.html?childToView=174665#answer-174665" target="_blank"&gt;https://community.hortonworks.com/questions/155903/how-to-add-new-yarn-queue-using-rest-api-ambari-co.html?childToView=174665#answer-174665&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 14:25:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-to-manage-YARN-Capacity-Queue/m-p/150816#M28515</guid>
      <dc:creator>sagarshimpi</dc:creator>
      <dc:date>2018-03-01T14:25:10Z</dc:date>
    </item>
  </channel>
</rss>

