|
@@ -526,9 +526,11 @@ public class NodeManager extends CompositeService
|
|
DefaultMetricsSystem.shutdown();
|
|
DefaultMetricsSystem.shutdown();
|
|
|
|
|
|
// Cleanup ResourcePluginManager
|
|
// Cleanup ResourcePluginManager
|
|
- ResourcePluginManager rpm = context.getResourcePluginManager();
|
|
|
|
- if (rpm != null) {
|
|
|
|
- rpm.cleanup();
|
|
|
|
|
|
+ if (null != context) {
|
|
|
|
+ ResourcePluginManager rpm = context.getResourcePluginManager();
|
|
|
|
+ if (rpm != null) {
|
|
|
|
+ rpm.cleanup();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} finally {
|
|
} finally {
|
|
// YARN-3641: NM's services stop get failed shouldn't block the
|
|
// YARN-3641: NM's services stop get failed shouldn't block the
|