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

Eric Yang commented on YARN-8299:
---------------------------------

[~csingh] Thanks for the patch, a few suggestions:
{code:java}
    if (conf.get("hadoop.http.authentication.type").equalsIgnoreCase(
        "simple")) {
      builder.queryParam("user.name", UrlEncoded
              .encodeString(System.getProperty("user.name")));
    }{code}
This part of code has been repeated frequently.  It might be worth while to 
create a method for this.

It would be nice the newly introduced getInstancesPath(String appName, 
List<String> components, + String version, List<String> containerStates) method 
depends on existing getInstancesPath(String appName) to improve code reuse.

If user input a state that is not in the defined list, it throws ERROR 500 
error.  It would be nice to report ERROR 400 BAD REQUEST, and display possible 
states.  Since user can only input one state, would it make sense to change 
-states to -state?

> Yarn Service Upgrade: Add GET APIs that returns instances matching query 
> params
> -------------------------------------------------------------------------------
>
>                 Key: YARN-8299
>                 URL: https://issues.apache.org/jira/browse/YARN-8299
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Chandni Singh
>            Assignee: Chandni Singh
>            Priority: Major
>         Attachments: YARN-8299.001.patch
>
>
> We need APIs that returns containers that match the query params. These are 
> needed so that we can find out what containers have been upgraded.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to