org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Toolpublic class RouterCLI
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
| Modifier and Type | Field | Description |
|---|---|---|
protected static java.util.Map<java.lang.String,org.apache.hadoop.yarn.client.cli.RouterCLI.RouterCmdUsageInfos> |
ADMIN_USAGE |
|
protected static org.apache.hadoop.ha.HAAdmin.UsageInfo |
APPLICATION_DELETE_USAGE |
|
protected static java.lang.String |
APPLICATION_DELETE_USAGE_EXAMPLE_1 |
|
protected static java.lang.String |
APPLICATION_DELETE_USAGE_EXAMPLE_DESC |
|
protected static org.apache.hadoop.yarn.client.cli.RouterCLI.RouterCmdUsageInfos |
APPLICATION_USAGEINFOS |
|
protected static java.lang.String |
DEREGISTER_SUBCLUSTER_EXAMPLE_1 |
|
protected static java.lang.String |
DEREGISTER_SUBCLUSTER_EXAMPLE_2 |
|
protected static java.lang.String |
DEREGISTER_SUBCLUSTER_HELP_INFO |
|
protected static org.apache.hadoop.ha.HAAdmin.UsageInfo |
DEREGISTER_SUBCLUSTER_USAGE |
|
protected static java.lang.String |
GET_SUBCLUSTER_EXAMPLE |
|
protected static org.apache.hadoop.ha.HAAdmin.UsageInfo |
GET_SUBCLUSTER_USAGE |
|
protected static org.apache.hadoop.ha.HAAdmin.UsageInfo |
POLICY_BATCH_SAVE_USAGE |
|
protected static java.lang.String |
POLICY_BATCH_SAVE_USAGE_EXAMPLE_1 |
|
protected static java.lang.String |
POLICY_BATCH_SAVE_USAGE_EXAMPLE_2 |
|
protected static java.lang.String |
POLICY_BATCH_SAVE_USAGE_EXAMPLE_DESC |
|
protected static org.apache.hadoop.ha.HAAdmin.UsageInfo |
POLICY_DELETE_USAGE |
|
protected static java.lang.String |
POLICY_DELETE_USAGE_EXAMPLE_DESC |
|
protected static java.lang.String |
POLICY_DELETE_USAGE_EXAMPLE1 |
|
protected static java.lang.String |
POLICY_DELETE_USAGE_EXAMPLE2 |
|
protected static org.apache.hadoop.ha.HAAdmin.UsageInfo |
POLICY_LIST_USAGE |
|
protected static java.lang.String |
POLICY_LIST_USAGE_EXAMPLE_1 |
|
protected static java.lang.String |
POLICY_LIST_USAGE_EXAMPLE_2 |
|
protected static java.lang.String |
POLICY_LIST_USAGE_EXAMPLE_DESC |
|
protected static org.apache.hadoop.ha.HAAdmin.UsageInfo |
POLICY_SAVE_USAGE |
|
protected static java.lang.String |
POLICY_SAVE_USAGE_EXAMPLE_1 |
|
protected static java.lang.String |
POLICY_SAVE_USAGE_EXAMPLE_2 |
|
protected static java.lang.String |
POLICY_SAVE_USAGE_EXAMPLE_DESC |
|
protected static org.apache.hadoop.yarn.client.cli.RouterCLI.RouterCmdUsageInfos |
POLICY_USAGEINFOS |
|
protected static org.apache.hadoop.yarn.client.cli.RouterCLI.RouterCmdUsageInfos |
SUBCLUSTER_USAGEINFOS |
| Constructor | Description |
|---|---|
RouterCLI() |
|
RouterCLI(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method | Description |
|---|---|---|
protected org.apache.hadoop.yarn.server.api.ResourceManagerAdministrationProtocol |
createAdminProtocol() |
|
java.util.Map<java.lang.String,org.apache.hadoop.yarn.client.cli.RouterCLI.RouterCmdUsageInfos> |
getAdminUsage() |
|
static org.apache.hadoop.ha.HAAdmin.UsageInfo |
getPolicyBatchSaveUsage() |
|
protected int |
handDeletePolicy(java.lang.String queue) |
Delete queue weight information.
|
protected int |
handListPolicies(int pageSize,
int currentPage,
java.lang.String queue,
java.util.List<java.lang.String> queues) |
Handles the list federation policies based on the specified parameters.
|
static void |
main(java.lang.String[] args) |
|
protected java.util.List<org.apache.hadoop.yarn.server.api.protocolrecords.FederationQueueWeight> |
parsePoliciesByXml(java.lang.String policiesXml) |
Parse FederationQueueWeight from the xml configuration file.
|
protected org.apache.hadoop.yarn.server.api.protocolrecords.SaveFederationQueuePolicyRequest |
parsePolicy(java.lang.String policy) |
We will parse the policy, and it has specific formatting requirements.
|
protected int |
parseXml2PoliciesAndBatchSavePolicies(java.lang.String policiesXml) |
Parse Policies from XML and save them in batches to FederationStateStore.
|
int |
run(java.lang.String[] args) |
protected static final org.apache.hadoop.ha.HAAdmin.UsageInfo DEREGISTER_SUBCLUSTER_USAGE
protected static final java.lang.String DEREGISTER_SUBCLUSTER_EXAMPLE_1
protected static final java.lang.String DEREGISTER_SUBCLUSTER_EXAMPLE_2
protected static final java.lang.String DEREGISTER_SUBCLUSTER_HELP_INFO
protected static final org.apache.hadoop.ha.HAAdmin.UsageInfo GET_SUBCLUSTER_USAGE
protected static final java.lang.String GET_SUBCLUSTER_EXAMPLE
protected static final org.apache.hadoop.yarn.client.cli.RouterCLI.RouterCmdUsageInfos SUBCLUSTER_USAGEINFOS
protected static final org.apache.hadoop.ha.HAAdmin.UsageInfo POLICY_SAVE_USAGE
protected static final java.lang.String POLICY_SAVE_USAGE_EXAMPLE_DESC
protected static final java.lang.String POLICY_SAVE_USAGE_EXAMPLE_1
protected static final java.lang.String POLICY_SAVE_USAGE_EXAMPLE_2
protected static final org.apache.hadoop.ha.HAAdmin.UsageInfo POLICY_BATCH_SAVE_USAGE
protected static final java.lang.String POLICY_BATCH_SAVE_USAGE_EXAMPLE_DESC
protected static final java.lang.String POLICY_BATCH_SAVE_USAGE_EXAMPLE_1
protected static final java.lang.String POLICY_BATCH_SAVE_USAGE_EXAMPLE_2
protected static final org.apache.hadoop.ha.HAAdmin.UsageInfo POLICY_LIST_USAGE
protected static final java.lang.String POLICY_LIST_USAGE_EXAMPLE_DESC
protected static final java.lang.String POLICY_LIST_USAGE_EXAMPLE_1
protected static final java.lang.String POLICY_LIST_USAGE_EXAMPLE_2
protected static final org.apache.hadoop.ha.HAAdmin.UsageInfo POLICY_DELETE_USAGE
protected static final java.lang.String POLICY_DELETE_USAGE_EXAMPLE_DESC
protected static final java.lang.String POLICY_DELETE_USAGE_EXAMPLE1
protected static final java.lang.String POLICY_DELETE_USAGE_EXAMPLE2
protected static final org.apache.hadoop.yarn.client.cli.RouterCLI.RouterCmdUsageInfos POLICY_USAGEINFOS
protected static final org.apache.hadoop.ha.HAAdmin.UsageInfo APPLICATION_DELETE_USAGE
protected static final java.lang.String APPLICATION_DELETE_USAGE_EXAMPLE_DESC
protected static final java.lang.String APPLICATION_DELETE_USAGE_EXAMPLE_1
protected static final org.apache.hadoop.yarn.client.cli.RouterCLI.RouterCmdUsageInfos APPLICATION_USAGEINFOS
protected static final java.util.Map<java.lang.String,org.apache.hadoop.yarn.client.cli.RouterCLI.RouterCmdUsageInfos> ADMIN_USAGE
public RouterCLI()
public RouterCLI(org.apache.hadoop.conf.Configuration conf)
protected org.apache.hadoop.yarn.server.api.ResourceManagerAdministrationProtocol createAdminProtocol()
throws java.io.IOException
java.io.IOExceptionprotected org.apache.hadoop.yarn.server.api.protocolrecords.SaveFederationQueuePolicyRequest parsePolicy(java.lang.String policy)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationQueueWeight.
2. the sum of weights for all sub-clusters in routerWeight/amrmWeight should be 1.policy - queue weight.org.apache.hadoop.yarn.exceptions.YarnException - exceptions from yarn servers.protected int parseXml2PoliciesAndBatchSavePolicies(java.lang.String policiesXml)
policiesXml - Policies Xml Path.protected java.util.List<org.apache.hadoop.yarn.server.api.protocolrecords.FederationQueueWeight> parsePoliciesByXml(java.lang.String policiesXml)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
We allow users to provide an xml configuration file, which stores the weight information of the queue.
policiesXml - Policies Xml Path.java.io.IOException - an I/O exception of some sort has occurred.org.xml.sax.SAXException - Encapsulate a general SAX error or warning.javax.xml.parsers.ParserConfigurationException - a serious configuration error..protected int handListPolicies(int pageSize,
int currentPage,
java.lang.String queue,
java.util.List<java.lang.String> queues)
pageSize - Records displayed per page.currentPage - The current page number.queue - The name of the queue to be filtered.queues - list of queues to filter.protected int handDeletePolicy(java.lang.String queue)
queue - Queue whose policy needs to be deleted.public int run(java.lang.String[] args)
throws java.lang.Exception
run in interface org.apache.hadoop.util.Tooljava.lang.Exceptionpublic static org.apache.hadoop.ha.HAAdmin.UsageInfo getPolicyBatchSaveUsage()
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception@VisibleForTesting public java.util.Map<java.lang.String,org.apache.hadoop.yarn.client.cli.RouterCLI.RouterCmdUsageInfos> getAdminUsage()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.