vineet4008 commented on code in PR #6109:
URL: https://github.com/apache/hbase/pull/6109#discussion_r1689643083
##########
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:
Base test is about functional verification of the feature. For this issue,
we can add test cases to a new file. I can revert to test code which I have
initially pushed. What is your opinion?
Initial push: New Test was deriving from TestCompactionTool and was
verifying MapReduce and Non-MapReduce flow
--
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]