HDFS-17607. Reduce the number of times conf is loaded when DataNode startUp (#7012). Contributed by lei w.
Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
This commit is contained in:
parent
4f3abd2f48
commit
e4789a2fd3
@ -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(
|
||||
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user