Apache9 commented on code in PR #6109:
URL: https://github.com/apache/hbase/pull/6109#discussion_r1688229452


##########
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionTool.java:
##########
@@ -97,4 +112,32 @@ private void putAndFlush(int key) throws Exception {
     region.flush(true);
   }
 
+  @Test
+  public void testCompactedFilesArchivedMapRed() throws Exception {
+    for (int i = 0; i < 10; i++) {
+      this.putAndFlush(i);
+    }
+    HStore store = region.getStore(HBaseTestingUtility.fam1);
+    assertEquals(10, store.getStorefilesCount());
+    Path tableDir = CommonFSUtils.getTableDir(rootDir, 
region.getRegionInfo().getTable());
+    FileSystem fs = store.getFileSystem();
+    String storePath = tableDir + "/" + 
region.getRegionInfo().getEncodedName() + "/"
+      + Bytes.toString(HBaseTestingUtility.fam1);
+    FileStatus[] regionDirFiles = fs.listStatus(new Path(storePath));
+    assertEquals(10, regionDirFiles.length);
+    String defaultFS = 
testUtil.getMiniHBaseCluster().getConfiguration().get("fs.defaultFS");
+    testUtil.startMiniMapReduceCluster();
+    try {
+      Configuration config = 
HBaseConfiguration.create(testUtil.getConfiguration());
+      config.setBoolean(MemStoreLAB.USEMSLAB_KEY, true);

Review Comment:
   Do we still need to do this after parameterized?



##########
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionTool.java:
##########
@@ -65,6 +79,7 @@ public void setUp() throws Exception {
   public void tearDown() throws Exception {
     this.testUtil.shutdownMiniCluster();
     testUtil.cleanupTestDir();
+    ChunkCreator.instance = null;

Review Comment:
   Will this cause memory leak? And since we will always reset USEMSLAB_KEY to 
false, do we really need to do this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to