From c31b7b8d525b88cba7079b29d5ed9615286f5f59 Mon Sep 17 00:00:00 2001 From: Konstantin V Shvachko Date: Fri, 24 May 2019 12:34:29 -0700 Subject: [PATCH] HDFS-14502. keepResults option in NNThroughputBenchmark should call saveNamespace(). Contributed by Konstantin V Shvachko. --- .../hadoop/hdfs/server/namenode/NNThroughputBenchmark.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java index e5d9826c3e..653b906e54 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java @@ -288,6 +288,11 @@ void cleanUp() throws IOException { false); if(!keepResults) clientProto.delete(getBaseDir(), true); + else { + clientProto.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_ENTER, + true); + clientProto.saveNamespace(0, 0); + } } int getNumOpsExecuted() {