[
https://issues.apache.org/jira/browse/YARN-7248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16179392#comment-16179392
]
Jason Lowe commented on YARN-7248:
----------------------------------
Maybe I'm missing something, but it looks like containers can be in the
SCHEDULED state for quite a long time depending upon how long it takes for them
to localize:
{noformat}
public org.apache.hadoop.yarn.api.records.ContainerState getCurrentState() {
switch (stateMachine.getCurrentState()) {
case NEW:
return org.apache.hadoop.yarn.api.records.ContainerState.NEW;
case LOCALIZING:
case LOCALIZATION_FAILED:
case SCHEDULED:
case PAUSED:
case RESUMING:
return org.apache.hadoop.yarn.api.records.ContainerState.SCHEDULED;
{noformat}
Another way to tackle this is to move the subset of states related to RUNNING
into another enum rather than extending the existing one. Of course when
someone later wants to modify that to add a new substate we'll run into this
type of problem again. In general any time we modify an enum that appears in a
protobuf we could have issues like this.
> 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
> Priority: Blocker
>
> 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]