Skip to content

Commit

Permalink
HDDS-11396. NPE due to empty Handler#clusterId (apache#7145)
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghuazhu authored Sep 20, 2024
1 parent 40c4001 commit 719bdf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ public Handler getHandler(ContainerProtos.ContainerType containerType) {

@Override
public void setClusterId(String clusterId) {
Preconditions.checkNotNull(clusterId, "clusterId Cannot be null");
Preconditions.checkNotNull(clusterId, "clusterId cannot be null");
if (this.clusterId == null) {
this.clusterId = clusterId;
for (Map.Entry<ContainerType, Handler> handlerMap : handlers.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,10 @@ public void start(String clusterId) throws IOException {
replicationServer.start();
datanodeDetails.setPort(Name.REPLICATION, replicationServer.getPort());

writeChannel.start();
readChannel.start();
hddsDispatcher.init();
hddsDispatcher.setClusterId(clusterId);
writeChannel.start();
readChannel.start();
blockDeletingService.start();
recoveringContainerScrubbingService.start();

Expand Down

0 comments on commit 719bdf9

Please sign in to comment.