You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Akira Ajisaka (Jira)" <ji...@apache.org> on 2020/02/26 02:17:00 UTC

[jira] [Commented] (YARN-10095) Fix help message for yarn rmadmin

    [ https://issues.apache.org/jira/browse/YARN-10095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17045085#comment-17045085 ] 

Akira Ajisaka commented on YARN-10095:
--------------------------------------

Thanks [~risyomei] for providing the patch.
"can only be used when RM HA is enabled" message is missing after the patch. Would you check this?

* before
{noformat}
$ yarn rmadmin -help -getServiceState
Usage: yarn rmadmin [-getServiceState <serviceId>]
-getServiceState can only be used when RM HA is enabled
{noformat}
* after
{noformat}
$ yarn rmadmin -help -getServiceState 
Usage: yarn rmadmin [-getServiceState <serviceId>]

   -getServiceState <serviceId>: Returns the state of the service
{noformat}

Nit:
Now we can use AssertJ for unit test. For example, the following code
{code}
assertTrue(errOut.contains("transitionToObserver: Unknown command"));
{code}
can be changed to
{code}
assertThat(errOut).contains("transitionToObserver: Unknown command");
{code}
After the change, the error message will be more understandable when the error occurs.

> Fix help message for yarn rmadmin
> ---------------------------------
>
>                 Key: YARN-10095
>                 URL: https://issues.apache.org/jira/browse/YARN-10095
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Xieming Li
>            Assignee: Xieming Li
>            Priority: Minor
>         Attachments: YARN-10095.000.patch
>
>
> (This issue is identified by [~aajisaka] in https://issues.apache.org/jira/browse/HADOOP-16753)
> The help message of yarn rmadmin seems broken.
> Current:  
> {code:java}
> $ yarn rmadmin -Dyarn.resourcemanager.ha.enabled=true -help -refreshNodesResources
> Usage: yarn rmadmin [-refreshNodesResources]
> Generic options supported are:
> -conf <configuration file>        specify an application configuration file
> -D <property=value>               define a value for a given property
> -fs <file:///|hdfs://namenode:port> specify default filesystem URL to use, overrides 'fs.defaultFS' property from configurations.
> -jt <local|resourcemanager:port>  specify a ResourceManager
> -files <file1,...>                specify a comma-separated list of files to be copied to the map reduce cluster
> -libjars <jar1,...>               specify a comma-separated list of jar files to be included in the classpath
> -archives <archive1,...>          specify a comma-separated list of archives to be unarchived on the compute machines
> The general command line syntax is:
> command [genericOptions] [commandOptions]
> {code}
>  
> Expected: 
> {code:java}
> $ yarn rmadmin -Dyarn.resourcemanager.ha.enabled=true -help -refreshNodesResources 
> Usage: yarn rmadmin [-refreshNodesResources]
>    -refreshNodesResources: Refresh resources of NodeManagers at the ResourceManager.    <==== HERE
> Generic options supported are:
> -conf <configuration file>        specify an application configuration file
> -D <property=value>               define a value for a given property
> -fs <file:///|hdfs://namenode:port> specify default filesystem URL to use, overrides 'fs.defaultFS' property from configurations.
> -jt <local|resourcemanager:port>  specify a ResourceManager
> -files <file1,...>                specify a comma-separated list of files to be copied to the map reduce cluster
> -libjars <jar1,...>               specify a comma-separated list of jar files to be included in the classpath
> -archives <archive1,...>          specify a comma-separated list of archives to be unarchived on the compute machines
> The general command line syntax is: 
> command [genericOptions] [commandOptions]
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org