HDDS-1652. HddsDispatcher should not shutdown volumeSet. Contributed by Xiaoyu Yao. (#916)
This commit is contained in:
parent
fe069570d8
commit
76c0183ae3
@ -114,8 +114,6 @@ public void init() {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void shutdown() {
|
public void shutdown() {
|
||||||
// Shutdown the volumes
|
|
||||||
volumeSet.shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,6 +87,7 @@ public class BenchMarkDatanodeDispatcher {
|
|||||||
private List<Long> containers;
|
private List<Long> containers;
|
||||||
private List<Long> keys;
|
private List<Long> keys;
|
||||||
private List<String> chunks;
|
private List<String> chunks;
|
||||||
|
private VolumeSet volumeSet;
|
||||||
|
|
||||||
@Setup(Level.Trial)
|
@Setup(Level.Trial)
|
||||||
public void initialize() throws IOException {
|
public void initialize() throws IOException {
|
||||||
@ -103,7 +104,7 @@ public void initialize() throws IOException {
|
|||||||
conf.set("dfs.datanode.data.dir", baseDir + File.separator + "data");
|
conf.set("dfs.datanode.data.dir", baseDir + File.separator + "data");
|
||||||
|
|
||||||
ContainerSet containerSet = new ContainerSet();
|
ContainerSet containerSet = new ContainerSet();
|
||||||
VolumeSet volumeSet = new VolumeSet(datanodeUuid, conf);
|
volumeSet = new VolumeSet(datanodeUuid, conf);
|
||||||
StateContext context = new StateContext(
|
StateContext context = new StateContext(
|
||||||
conf, DatanodeStates.RUNNING, null);
|
conf, DatanodeStates.RUNNING, null);
|
||||||
ContainerMetrics metrics = ContainerMetrics.create(conf);
|
ContainerMetrics metrics = ContainerMetrics.create(conf);
|
||||||
@ -161,7 +162,7 @@ public void initialize() throws IOException {
|
|||||||
|
|
||||||
@TearDown(Level.Trial)
|
@TearDown(Level.Trial)
|
||||||
public void cleanup() throws IOException {
|
public void cleanup() throws IOException {
|
||||||
dispatcher.shutdown();
|
volumeSet.shutdown();
|
||||||
FileUtils.deleteDirectory(new File(baseDir));
|
FileUtils.deleteDirectory(new File(baseDir));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user