| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <service role="RESOURCEMANAGER" name="resourcemanager" version="2.5.0"> |
| <metadata> |
| <type>API</type> |
| <context>/resourcemanager</context> |
| <shortDesc>YARN Resource Manager</shortDesc> |
| <description>The YARN Resource Manager Service (RM) is the central controlling authority for resource management and makes allocation decisions ResourceManager has two main components: Scheduler and ApplicationsManager.</description> |
| <samples> |
| <sample> |
| <description>Fetch cluster info</description> |
| <method>GET</method> |
| <path>ws/v1/cluster/info</path> |
| </sample> |
| <sample> |
| <description>Fetch cluster metrics</description> |
| <method>GET</method> |
| <path>ws/v1/cluster/metrics</path> |
| </sample> |
| <sample> |
| <description>You may check out Apache YARN Resource Manager's REST API documentation here</description> |
| <value>https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html</value> |
| </sample> |
| </samples> |
| </metadata> |
| <routes> |
| <route path="/resourcemanager/v1/cluster/"/> |
| <route path="/resourcemanager/v1/cluster/**?**"/> |
| <route path="/resourcemanager/v1/cluster/apps?**"> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/apps/outbound" to="response.body"/> |
| </route> |
| <route path="/resourcemanager/v1/cluster/apps?**"> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/apps/outbound" to="response.body"/> |
| </route> |
| <route path="/resourcemanager/v1/cluster/apps/*?**"> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/app/outbound" to="response.body"/> |
| </route> |
| <route path="/resourcemanager/v1/cluster/apps/*/appattempts?**"> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/appattempts/outbound" to="response.body"/> |
| </route> |
| <route path="/resourcemanager/v1/cluster/nodes?**"> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/nodes/outbound" to="response.body"/> |
| </route> |
| <route path="/resourcemanager/v1/cluster/nodes/*?**"> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/nodeId/inbound" to="request.url"/> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/node/outbound" to="response.body"/> |
| </route> |
| <route path="/resourcemanager/proxy/*/ws/v1/**?**"> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/inbound/proxy" to="request.url"/> |
| </route> |
| <route path="/resourcemanager/proxy/*/ws/v1/mapreduce/jobs/*/jobattempts"> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/proxy/jobattempts/outbound" to="response.body"/> |
| </route> |
| <route path="/resourcemanager/proxy/*/ws/v1/mapreduce/jobs/*/tasks/*/attempts"> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/proxy/taskattempts/outbound" to="response.body"/> |
| </route> |
| <route path="/resourcemanager/proxy/*/ws/v1/mapreduce/jobs/*/tasks/*/attempts/*"> |
| <rewrite apply="RESOURCEMANAGER/resourcemanager/proxy/taskattempt/outbound" to="response.body"/> |
| </route> |
| </routes> |
| <testURLs> |
| <testURL>/resourcemanager/v1/cluster/info</testURL> |
| <testURL>/resourcemanager/v1/cluster/metrics</testURL> |
| <testURL>/resourcemanager/v1/cluster/apps</testURL> |
| </testURLs> |
| <dispatch classname="org.apache.knox.gateway.dispatch.DefaultDispatch" ha-classname="org.apache.knox.gateway.rm.dispatch.RMHaDispatch"/> |
| </service> |