[
https://issues.apache.org/jira/browse/YARN-1752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13918459#comment-13918459
]
Jian He commented on YARN-1752:
-------------------------------
Patch looks good overall, some minors:
- styling: exceed the 80 column limit,
{code}
public void unregisterAppAttempt(final FinishApplicationMasterRequest
req,boolean waitForStateRunning)
{code}
- we can consolidate the exception comments like this ?
{code}
* This exception is thrown when an ApplicationMaster asks for resources by
* calling {@link ApplicationMasterProtocol#allocate(AllocateRequest)} or tries
* to unregister by calling
* {@link
ApplicationMasterProtocol#finishApplicationMaster(FinishApplicationMasterRequest)}
* without first registering with ResourceManager by calling
* {@link
ApplicationMasterProtocol#registerApplicationMaster(RegisterApplicationMasterRequest)}
* or if it tries to register more than once.
{code}
- Test: we can check the attempt state to be Launched state after this call.
Simply, we can just use MockRM.launchAM
{code}
MockAM am1 = rm.sendAMLaunched(attempt1.getAppAttemptId());
{code}
> Unexpected Unregistered event at Attempt Launched state
> -------------------------------------------------------
>
> Key: YARN-1752
> URL: https://issues.apache.org/jira/browse/YARN-1752
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Jian He
> Assignee: Rohith
> Attachments: YARN-1752.1.patch, YARN-1752.2.patch, YARN-1752.3.patch
>
>
> {code}
> 2014-02-21 14:56:03,453 ERROR
> org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl:
> Can't handle this event at current state
> org.apache.hadoop.yarn.state.InvalidStateTransitonException: Invalid event:
> UNREGISTERED at LAUNCHED
> 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.attempt.RMAppAttemptImpl.handle(RMAppAttemptImpl.java:647)
> at
> org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl.handle(RMAppAttemptImpl.java:103)
> at
> org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$ApplicationAttemptEventDispatcher.handle(ResourceManager.java:733)
> at
> org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$ApplicationAttemptEventDispatcher.handle(ResourceManager.java:714)
> at
> org.apache.hadoop.yarn.event.AsyncDispatcher.dispatch(AsyncDispatcher.java:173)
> at
> org.apache.hadoop.yarn.event.AsyncDispatcher$1.run(AsyncDispatcher.java:106)
> at java.lang.Thread.run(Thread.java:695)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)