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

Wangda Tan commented on YARN-7248:
----------------------------------

[~asuresh],

I agree we should not add new field to public/stable enum to avoid issues like 
YARN-6570 or old client receives unknown state. 

If we expect more enums will be added, use String should be better than enum. 
Could we add an enum so at least app can know what're the known states. And 
comment need to be added to getExtraStateInformation saying that app should 
prepare to handle unknown string input.

{code}
private enum AdditionalState {
    
    KEY_1("key1"),
    KEY_2("key2");
    
    private final String key;

    AdditionalState(String key) {
      this.key = key;  
    }
  }
{code}

Naming suggestion: getExtraStateInformation -> getExtraContainerState.

> NM returns new SCHEDULED container status to older clients
> ----------------------------------------------------------
>
>                 Key: YARN-7248
>                 URL: https://issues.apache.org/jira/browse/YARN-7248
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 2.9.0, 3.0.0-alpha2
>            Reporter: Jason Lowe
>            Assignee: Arun Suresh
>            Priority: Blocker
>         Attachments: YARN-7248.001.patch
>
>
> YARN-4597 added a new SCHEDULED container state and that state is returned to 
> clients when the container is localizing, etc.  However the client may be 
> running on an older software version that does not have the new SCHEDULED 
> state which could lead the client to crash on the unexpected container state 
> value or make incorrect assumptions like any state != NEW and != RUNNING must 
> be COMPLETED which was true in the older version.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to