hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7663) RMAppImpl:Invalid event: START at KILLED
Date Fri, 05 Jan 2018 22:26:00 GMT

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

Jason Lowe commented on YARN-7663:
----------------------------------

Thanks for updating the patch!

bq. The TODO already exists in system for a long long time, if this TODO is meaningless, it
should be deleted. If it is really needed to implement, I think the implementation can be
placed in new added foo(onInvalidStateTransition).

I think the TODO is still relevant, and I agree it should be moved to the new invalid transition
method.  In that sense, we may want to remove the "for unit test" part of the javadoc for
this method since it may later do something.

Rather than the full boilerplate of a new class, it would be cleaner to just use an anonymous
class to override the method.  For example:
{code}
    RMApp application = new RMAppImpl(application.getApplicationId(),
                      rmContext, conf,application.getName(),
                      application.getUser(), application.getQueue(),
                      application.getApplicationSubmissionContext(),
                      scheduler, masterService,application.getSubmitTime(),
                      "YARN", null,new ArrayList<ResourceRequest>()) {
      @Override
      protected void onInvalidStateTransition(RMAppEventType rmAppEventType,
          RMAppState state) {
        Assert.assertTrue("RMAppImpl: can't handle " + rmAppEventType
            + " at state " + state, false);
      }
    };
{code}

Rather than calling createNewTestApp then throwing away the results, it would be cleaner to
extend createNewTestApp to take a boolean parameter specifying whether to create an app with
invalid state transition detection or without.  Alternatively you could factor out the rmContext,
scheduler, and conf setup from createNewTestApp so the test can leverage it without needing
to do all the other, unrelated stuff in createNewTestApp.

The whitespace and line length checkstyle nits for the newly added code still should be addressed.
 Most of the whitespace nits are lack of whitespace after commas.



> RMAppImpl:Invalid event: START at KILLED
> ----------------------------------------
>
>                 Key: YARN-7663
>                 URL: https://issues.apache.org/jira/browse/YARN-7663
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>    Affects Versions: 2.8.0
>            Reporter: lujie
>            Assignee: lujie
>            Priority: Minor
>              Labels: patch
>         Attachments: YARN-7663_1.patch, YARN-7663_2.patch, YARN-7663_3.patch, YARN-7663_4.patch
>
>
> Send kill to application, the RM log shows:
> {code:java}
> org.apache.hadoop.yarn.state.InvalidStateTransitionException: Invalid event: START at
KILLED
>         at org.apache.hadoop.yarn.state.StateMachineFactory.doTransition(StateMachineFactory.java:305)
>         at org.apache.hadoop.yarn.state.StateMachineFactory.access$300(StateMachineFactory.java:46)
>         at org.apache.hadoop.yarn.state.StateMachineFactory$InternalStateMachine.doTransition(StateMachineFactory.java:448)
>         at org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl.handle(RMAppImpl.java:805)
>         at org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl.handle(RMAppImpl.java:116)
>         at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$ApplicationEventDispatcher.handle(ResourceManager.java:901)
>         at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$ApplicationEventDispatcher.handle(ResourceManager.java:885)
>         at org.apache.hadoop.yarn.event.AsyncDispatcher.dispatch(AsyncDispatcher.java:184)
>         at org.apache.hadoop.yarn.event.AsyncDispatcher$1.run(AsyncDispatcher.java:110)
>         at java.lang.Thread.run(Thread.java:745)
> {code}
> if insert sleep before where the START event was created, this bug will deterministically
reproduce. 



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

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


Mime
View raw message