HDDS-12040. ozone freon cr fails with NPE in ReplicationSupervisor#7776
HDDS-12040. ozone freon cr fails with NPE in ReplicationSupervisor#7776adoroszlai merged 10 commits intoapache:masterfrom
ozone freon cr fails with NPE in ReplicationSupervisor#7776Conversation
|
Thanks @len548 for the patch. Please update your branch by merging |
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/ClosedContainerReplicator.java
Outdated
Show resolved
Hide resolved
...rvice/src/main/java/org/apache/hadoop/ozone/container/replication/ReplicationSupervisor.java
Outdated
Show resolved
Hide resolved
ozone freon cr fails with NPE in ReplicationSupervisor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @len548 for updating the patch.
...rvice/src/main/java/org/apache/hadoop/ozone/container/replication/ReplicationSupervisor.java
Outdated
Show resolved
Hide resolved
...rvice/src/main/java/org/apache/hadoop/ozone/container/replication/ReplicationSupervisor.java
Outdated
Show resolved
Hide resolved
...rvice/src/main/java/org/apache/hadoop/ozone/container/replication/ReplicationSupervisor.java
Outdated
Show resolved
Hide resolved
...rvice/src/main/java/org/apache/hadoop/ozone/container/replication/ReplicationSupervisor.java
Outdated
Show resolved
Hide resolved
|
@adoroszlai, thank you for the review and correction! |
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @len548 for iterating on this.
Sorry for nitpicking about method order and whitespace. If you look at the changes in ReplicationSupervisor you may see why it was important: makes review much easier. Now it's clear that addTask was just split into 3 methods, instead of having to inspect blocks of code line-by-line.
|
@adoroszlai thank you for teaching this practice throughly and sorry for causing unnecessary changes again and again. I often miss these, especially the unnecessary whitespaces because the changes are not visually obvious on the IntelliJ ;( |
What changes were proposed in this pull request?
"ozone freon cr" command runs into exceptions because
requestCountermap inReplicationSupervisorclass is not initiated during the following reproducing steps.addTaskmethod in the class is supposed to initiate it but it is not called, so I extracted that part into a new method calledinitCountersand call this new method before running the task.How to reproduce the error:
Also this PR handles the followings to make it work:
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-12040
How was this patch tested?
Manually tested