diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java index 30de8936fe..39e163e54e 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java @@ -114,8 +114,6 @@ public void init() { @Override public void shutdown() { - // Shutdown the volumes - volumeSet.shutdown(); } /** diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genesis/BenchMarkDatanodeDispatcher.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genesis/BenchMarkDatanodeDispatcher.java index 91d096815c..c05ecb966b 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genesis/BenchMarkDatanodeDispatcher.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genesis/BenchMarkDatanodeDispatcher.java @@ -87,6 +87,7 @@ public class BenchMarkDatanodeDispatcher { private List containers; private List keys; private List chunks; + private VolumeSet volumeSet; @Setup(Level.Trial) public void initialize() throws IOException { @@ -103,7 +104,7 @@ public void initialize() throws IOException { conf.set("dfs.datanode.data.dir", baseDir + File.separator + "data"); ContainerSet containerSet = new ContainerSet(); - VolumeSet volumeSet = new VolumeSet(datanodeUuid, conf); + volumeSet = new VolumeSet(datanodeUuid, conf); StateContext context = new StateContext( conf, DatanodeStates.RUNNING, null); ContainerMetrics metrics = ContainerMetrics.create(conf); @@ -161,7 +162,7 @@ public void initialize() throws IOException { @TearDown(Level.Trial) public void cleanup() throws IOException { - dispatcher.shutdown(); + volumeSet.shutdown(); FileUtils.deleteDirectory(new File(baseDir)); }