zeekling commented on code in PR #7065:
URL: https://github.com/apache/hadoop/pull/7065#discussion_r1779503372
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java:
##########
@@ -757,10 +757,9 @@ private void completeOustandingUpdatesWhichAreReserved(
RMContainer rmContainer, ContainerStatus containerStatus,
RMContainerEventType event) {
N schedulerNode = getSchedulerNode(rmContainer.getNodeId());
- if (schedulerNode != null &&
- schedulerNode.getReservedContainer() != null) {
+ if (schedulerNode != null) {
RMContainer resContainer = schedulerNode.getReservedContainer();
- if (resContainer.getReservedSchedulerKey() != null) {
+ if (resContainer != null && resContainer.getReservedSchedulerKey() !=
null) {
Review Comment:
It is recommended to add a try catch module. I have made this change in the
production environment before, but it still reports a null pointer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]