hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wangda Tan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2308) NPE happened when RM restart after CapacityScheduler queue configuration changed
Date Mon, 11 Aug 2014 00:41:12 GMT

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

Wangda Tan commented on YARN-2308:
----------------------------------

[~lichangleo],
Thanks for working on this,
I took a quick scan at your patch, I think the general approach should be fine. Some minor
suggestions:
1) 
{code}
+    if (application==null) {
+      LOG.info("can't retireve application attempt");
+      return;
+    }
{code}
Please leave a space before and after "==",
Use LOG.error instead of info

2) Test code
2.1
bq. +    System.out.println("testing queue change!!!");
Remove this plz,

2.2
{code}
+    conf.setBoolean(CapacitySchedulerConfiguration.ENABLE_USER_METRICS, true);
+    conf.set(CapacitySchedulerConfiguration.RESOURCE_CALCULATOR_CLASS,
{code}
We may not need this too

2.3
{code}
+    // clear queue metrics
+    rm1.clearQueueMetrics(app1);
{code}
Also this

2.4
It's better to wait and check for app state transition to Failed after it rejected

2.5
I think this test isn't work-preserving restart specific problem, it's better to place the
test in TestRMRestart

Please let me know if you have any comment on them.

Thanks,
Wangda




> NPE happened when RM restart after CapacityScheduler queue configuration changed 
> ---------------------------------------------------------------------------------
>
>                 Key: YARN-2308
>                 URL: https://issues.apache.org/jira/browse/YARN-2308
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager, scheduler
>    Affects Versions: 2.6.0
>            Reporter: Wangda Tan
>            Assignee: chang li
>            Priority: Critical
>         Attachments: jira2308.patch
>
>
> I encountered a NPE when RM restart
> {code}
> 2014-07-16 07:22:46,957 FATAL org.apache.hadoop.yarn.server.resourcemanager.ResourceManager:
Error in handling event type APP_ATTEMPT_ADDED to the scheduler
> java.lang.NullPointerException
>         at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.addApplicationAttempt(CapacityScheduler.java:566)
>         at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.handle(CapacityScheduler.java:922)
>         at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.handle(CapacityScheduler.java:98)
>         at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$SchedulerEventDispatcher$EventProcessor.run(ResourceManager.java:594)
>         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:654)
>         at org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl.handle(RMAppImpl.java:85)
>         at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$ApplicationEventDispatcher.handle(ResourceManager.java:698)
>         at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$ApplicationEventDispatcher.handle(ResourceManager.java:682)
>         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:744)
> {code}
> And RM will be failed to restart.
> This is caused by queue configuration changed, I removed some queues and added new queues.
So when RM restarts, it tries to recover history applications, and when any of queues of these
applications removed, NPE will be raised.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message