From ce99cc31e9c34504669c30b160eb55c7cacd9966 Mon Sep 17 00:00:00 2001 From: Ayush Saxena Date: Fri, 26 Jul 2019 08:22:22 +0530 Subject: [PATCH] HDFS-14303. Addendum: check block directory logic not correct when there is only meta file, print no meaning warn log. Contributed by qiang Liu. --- .../hadoop/hdfs/server/datanode/TestDirectoryScanner.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java index a6fb1abf00e..67589e31539 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java @@ -1117,8 +1117,9 @@ public class TestDirectoryScanner { @Test public void testDirectoryScannerInFederatedCluster() throws Exception { + HdfsConfiguration conf = new HdfsConfiguration(CONF); // Create Federated cluster with two nameservices and one DN - try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(CONF) + try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf) .nnTopology(MiniDFSNNTopology.simpleHAFederatedTopology(2)) .numDataNodes(1).build()) { cluster.waitActive(); @@ -1134,7 +1135,7 @@ public class TestDirectoryScanner { int bp2Files = 2; writeFile(fs2, bp2Files); // Call the Directory scanner - scanner = new DirectoryScanner(fds, CONF); + scanner = new DirectoryScanner(fds, conf); scanner.setRetainDiffs(true); scanner.reconcile(); // Check blocks in corresponding BP