Skip to content

Commit af6b63a

Browse files
thangTangtianhang.tang
authored andcommitted
HBASE-27602 Remove the impact of operating env on testHFileCleaning (#5003)
Co-authored-by: tianhang.tang <tianhang.tang@shopee.com> Signed-off-by: Duo Zhang <zhangduo@apache.org> (cherry picked from commit e71253f)
1 parent 9236242 commit af6b63a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestHFileCleaner.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public class TestHFileCleaner {
7171

7272
private static DirScanPool POOL;
7373

74+
private static String MOCK_ARCHIVED_HFILE_DIR =
75+
HConstants.HFILE_ARCHIVE_DIRECTORY + "/namespace/table/region";
76+
7477
@BeforeClass
7578
public static void setupCluster() throws Exception {
7679
// have to use a minidfs cluster because the localfs doesn't modify file times correctly
@@ -162,8 +165,7 @@ public void testHFileCleaning() throws Exception {
162165
+ "org.apache.hadoop.hbase.mob.ManualMobMaintHFileCleaner");
163166
conf.setLong(TimeToLiveHFileCleaner.TTL_CONF_KEY, ttl);
164167
Server server = new DummyServer();
165-
Path archivedHfileDir =
166-
new Path(UTIL.getDataTestDirOnTestFS(), HConstants.HFILE_ARCHIVE_DIRECTORY);
168+
Path archivedHfileDir = new Path(UTIL.getDataTestDirOnTestFS(), MOCK_ARCHIVED_HFILE_DIR);
167169
FileSystem fs = FileSystem.get(conf);
168170
HFileCleaner cleaner = new HFileCleaner(1000, server, conf, fs, archivedHfileDir, POOL);
169171

0 commit comments

Comments
 (0)