hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bibin A Chundatt (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4411) ResourceManager IllegalArgumentException error
Date Thu, 28 Jan 2016 06:50:39 GMT

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

Bibin A Chundatt commented on YARN-4411:
----------------------------------------

Thanks [~devaraj.k] for review
{quote}
I don't understand why do we need this, Do you see any problem if we invoke attempt.createApplicationAttemptReport()
when the state is other than RMAppAttemptState.FINAL_SAVING? I think we can we can create
ApplicationAttemptReport irrespective of the state.
{quote}
Only for FINAL_SAVING the previous state will be send for create report.
{{RMAppAttemptImpl#createApplicationAttemptState}}
{noformat}
    // If AppAttempt is in FINAL_SAVING state, return its previous state.
    if (state.equals(RMAppAttemptState.FINAL_SAVING)) {
      state = stateBeforeFinalSaving;
    }
{noformat}
So for RMAppAttemptState=FINAL_SAVING the test is done as below.

{quote}
924	    applicationAttempt.handle(new RMAppAttemptEvent(
925	        applicationAttempt.getAppAttemptId(), RMAppAttemptEventType.KILL));
926	    assertEquals(RMAppAttemptState.FINAL_SAVING,
927	        applicationAttempt.getAppAttemptState());
928	    // ALLOCATED to FINAL_SAVING REPORT
929	    ApplicationAttemptReport attemptreport =
930	        applicationAttempt.createApplicationAttemptReport();
{quote}

For testing createApplicationReport with all other {{RMAppAttemptState}}  except FINAL_SAVING
the check is done
{noformat}
+      if (!rmAppAttemptState.equals(RMAppAttemptState.FINAL_SAVING)) {
{noformat}

Second point will remove assert 

> ResourceManager IllegalArgumentException error
> ----------------------------------------------
>
>                 Key: YARN-4411
>                 URL: https://issues.apache.org/jira/browse/YARN-4411
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>    Affects Versions: 2.7.1
>            Reporter: yarntime
>            Assignee: Bibin A Chundatt
>         Attachments: 0002-YARN-4411.patch, YARN-4411.001.patch
>
>
> in version 2.7.1, line 1914  may cause IllegalArgumentException in RMAppAttemptImpl:
>   YarnApplicationAttemptState.valueOf(this.getState().toString())
> cause by this.getState() returns type RMAppAttemptState which may not be converted to
YarnApplicationAttemptState.
> {noformat}
> java.lang.IllegalArgumentException: No enum constant org.apache.hadoop.yarn.api.records.YarnApplicationAttemptState.LAUNCHED_UNMANAGED_SAVING
>         at java.lang.Enum.valueOf(Enum.java:236)
>         at org.apache.hadoop.yarn.api.records.YarnApplicationAttemptState.valueOf(YarnApplicationAttemptState.java:27)
>         at org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl.createApplicationAttemptReport(RMAppAttemptImpl.java:1870)
>         at org.apache.hadoop.yarn.server.resourcemanager.ClientRMService.getApplicationAttemptReport(ClientRMService.java:355)
>         at org.apache.hadoop.yarn.api.impl.pb.service.ApplicationClientProtocolPBServiceImpl.getApplicationAttemptReport(ApplicationClientProtocolPBServiceImpl.java:355)
>         at org.apache.hadoop.yarn.proto.ApplicationClientProtocol$ApplicationClientProtocolService$2.callBlockingMethod(ApplicationClientProtocol.java:425)
>         at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:619)
>         at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:962)
>         at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2039)
>         at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2035)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:415)
>         at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
>         at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2033)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message