1
0
Quellcode durchsuchen

HDDS-1652. HddsDispatcher should not shutdown volumeSet. Contributed by Xiaoyu Yao. (#916)

Xiaoyu Yao vor 6 Jahren
Ursprung
Commit
76c0183ae3

+ 0 - 2
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java

@@ -114,8 +114,6 @@ public class HddsDispatcher implements ContainerDispatcher, Auditor {
 
 
   @Override
   @Override
   public void shutdown() {
   public void shutdown() {
-    // Shutdown the volumes
-    volumeSet.shutdown();
   }
   }
 
 
   /**
   /**

+ 3 - 2
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genesis/BenchMarkDatanodeDispatcher.java

@@ -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 class BenchMarkDatanodeDispatcher {
     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 class BenchMarkDatanodeDispatcher {
 
 
   @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));
   }
   }