Skip to content

Commit

Permalink
HBASE-27602 Remove the impact of operating env on testHFileCleaning (#…
Browse files Browse the repository at this point in the history
…5003)

Co-authored-by: tianhang.tang <[email protected]>
Signed-off-by: Duo Zhang <[email protected]>
  • Loading branch information
thangTang and tianhang.tang authored Feb 11, 2023
1 parent 833b10e commit e71253f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public class TestHFileCleaner {

private static DirScanPool POOL;

private static String MOCK_ARCHIVED_HFILE_DIR =
HConstants.HFILE_ARCHIVE_DIRECTORY + "/namespace/table/region";

@BeforeClass
public static void setupCluster() throws Exception {
// have to use a minidfs cluster because the localfs doesn't modify file times correctly
Expand Down Expand Up @@ -158,8 +161,7 @@ public void testHFileCleaning() throws Exception {
+ "org.apache.hadoop.hbase.mob.ManualMobMaintHFileCleaner");
conf.setLong(TimeToLiveHFileCleaner.TTL_CONF_KEY, ttl);
Server server = new DummyServer();
Path archivedHfileDir =
new Path(UTIL.getDataTestDirOnTestFS(), HConstants.HFILE_ARCHIVE_DIRECTORY);
Path archivedHfileDir = new Path(UTIL.getDataTestDirOnTestFS(), MOCK_ARCHIVED_HFILE_DIR);
FileSystem fs = FileSystem.get(conf);
HFileCleaner cleaner = new HFileCleaner(1000, server, conf, fs, archivedHfileDir, POOL);

Expand Down

0 comments on commit e71253f

Please sign in to comment.