Skip to content

Commit

Permalink
HDFS-17607. Reduce the number of times conf is loaded when DataNode s…
Browse files Browse the repository at this point in the history
…tartUp (#7012). Contributed by lei w.

Signed-off-by: He Xiaoqiao <[email protected]>
  • Loading branch information
ThinkerLei authored Nov 4, 2024
1 parent 4f3abd2 commit e4789a2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public VolumeBuilder prepareVolume(DataNode datanode,
VolumeBuilder builder =
new VolumeBuilder(this, sd);
for (NamespaceInfo nsInfo : nsInfos) {
location.makeBlockPoolDir(nsInfo.getBlockPoolID(), null);
location.makeBlockPoolDir(nsInfo.getBlockPoolID(), datanode.getConf());

final BlockPoolSliceStorage bpStorage = getBlockPoolSliceStorage(nsInfo);
final List<StorageDirectory> dirs = bpStorage.loadBpStorageDirectories(
Expand Down Expand Up @@ -457,7 +457,7 @@ private List<StorageDirectory> loadBlockPoolSliceStorage(DataNode datanode,
final List<StorageDirectory> success = Lists.newArrayList();
final List<UpgradeTask> tasks = Lists.newArrayList();
for (StorageLocation dataDir : dataDirs) {
dataDir.makeBlockPoolDir(bpid, null);
dataDir.makeBlockPoolDir(bpid, datanode.getConf());
try {
final List<Callable<StorageDirectory>> sdCallables =
Lists.newArrayList();
Expand Down

0 comments on commit e4789a2

Please sign in to comment.