Skip to content

Commit

Permalink
HDFS-16704. Datanode return empty response instead of NPE for GetVolu…
Browse files Browse the repository at this point in the history
…meInfo during restarting (apache#4661). Contributed by ZanderXu.

Signed-off-by: Ayush Saxena <[email protected]>
Signed-off-by: He Xiaoqiao <[email protected]>
  • Loading branch information
ZanderXu authored and HarshitGupta11 committed Nov 28, 2022
1 parent 8db5e71 commit ac436dd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3628,7 +3628,10 @@ public String getBPServiceActorInfo() {
*/
@Override // DataNodeMXBean
public String getVolumeInfo() {
Preconditions.checkNotNull(data, "Storage not yet initialized");
if (data == null) {
LOG.debug("Storage not yet initialized.");
return "";
}
return JSON.toString(data.getVolumeInfoMap());
}

Expand Down

0 comments on commit ac436dd

Please sign in to comment.