Skip to content

Commit

Permalink
HDDS-11865. Remove tests for non-Ratis OM
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai committed Dec 5, 2024
1 parent fc63710 commit 379056f
Show file tree
Hide file tree
Showing 38 changed files with 14 additions and 626 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ abstract class AbstractOzoneFileSystemTest {
p -> !p.toUri().getPath().startsWith(TRASH_ROOT.toString());
private String fsRoot;

AbstractOzoneFileSystemTest(boolean setDefaultFs, boolean enableOMRatis, BucketLayout layout) {
AbstractOzoneFileSystemTest(boolean setDefaultFs, BucketLayout layout) {
enabledFileSystemPaths = setDefaultFs;
omRatisEnabled = enableOMRatis;
bucketLayout = layout;
}

Expand All @@ -161,7 +160,6 @@ abstract class AbstractOzoneFileSystemTest {

private final BucketLayout bucketLayout;
private final boolean enabledFileSystemPaths;
private final boolean omRatisEnabled;

private MiniOzoneCluster cluster;
private OzoneClient client;
Expand All @@ -186,7 +184,6 @@ void init() throws Exception {
conf.setFloat(FS_TRASH_INTERVAL_KEY, TRASH_INTERVAL);
conf.setFloat(FS_TRASH_CHECKPOINT_INTERVAL_KEY, TRASH_INTERVAL / 2);
conf.setInt(OZONE_OM_SERVER_LIST_MAX_SIZE, 2);
conf.setBoolean(OMConfigKeys.OZONE_OM_RATIS_ENABLE_KEY, omRatisEnabled);
conf.setBoolean(OZONE_ACL_ENABLED, true);
conf.setBoolean(OzoneConfigKeys.OZONE_HBASE_ENHANCEMENTS_ALLOWED, true);
conf.setBoolean("ozone.client.hbase.enhancements.allowed", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ abstract class AbstractOzoneFileSystemTestWithFSO extends AbstractOzoneFileSyste
private static final Logger LOG =
LoggerFactory.getLogger(AbstractOzoneFileSystemTestWithFSO.class);

AbstractOzoneFileSystemTestWithFSO(boolean enableOMRatis) {
super(true, enableOMRatis, BucketLayout.FILE_SYSTEM_OPTIMIZED);
AbstractOzoneFileSystemTestWithFSO() {
super(true, BucketLayout.FILE_SYSTEM_OPTIMIZED);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,10 @@ abstract class AbstractRootedOzoneFileSystemTest {
private OzoneClient client;

AbstractRootedOzoneFileSystemTest(BucketLayout bucketLayout, boolean setDefaultFs,
boolean enableOMRatis, boolean isAclEnabled, boolean noFlush) {
boolean isAclEnabled, boolean noFlush) {
// Initialize the cluster before EACH set of parameters
this.bucketLayout = bucketLayout;
enabledFileSystemPaths = setDefaultFs;
omRatisEnabled = enableOMRatis;
enableAcl = isAclEnabled;
useOnlyCache = noFlush;
isBucketFSOptimized = bucketLayout.isFileSystemOptimized();
Expand Down Expand Up @@ -202,7 +201,6 @@ public Path getBucketPath() {
}

private final boolean enabledFileSystemPaths;
private final boolean omRatisEnabled;
private final boolean isBucketFSOptimized;
private final boolean enableAcl;

Expand Down Expand Up @@ -236,7 +234,6 @@ void initClusterAndEnv() throws IOException, InterruptedException, TimeoutExcept
conf.setFloat(OMConfigKeys.OZONE_FS_TRASH_INTERVAL_KEY, TRASH_INTERVAL);
conf.setFloat(FS_TRASH_INTERVAL_KEY, TRASH_INTERVAL);
conf.setFloat(FS_TRASH_CHECKPOINT_INTERVAL_KEY, TRASH_INTERVAL / 2);
conf.setBoolean(OMConfigKeys.OZONE_OM_RATIS_ENABLE_KEY, omRatisEnabled);
conf.setBoolean(OzoneConfigKeys.OZONE_HBASE_ENHANCEMENTS_ALLOWED, true);
conf.setBoolean("ozone.client.hbase.enhancements.allowed", true);
conf.setBoolean(OzoneConfigKeys.OZONE_FS_HSYNC_ENABLED, true);
Expand Down Expand Up @@ -284,7 +281,7 @@ void initClusterAndEnv() throws IOException, InterruptedException, TimeoutExcept
-> (RootedOzoneFileSystem) FileSystem.get(conf));

if (useOnlyCache) {
cluster.getOzoneManager().getOmServerProtocol().setShouldFlushCache(omRatisEnabled);
cluster.getOzoneManager().getOmServerProtocol().setShouldFlushCache(true);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ abstract class AbstractRootedOzoneFileSystemTestWithFSO extends AbstractRootedOz
LoggerFactory.getLogger(AbstractRootedOzoneFileSystemTestWithFSO.class);

AbstractRootedOzoneFileSystemTestWithFSO(boolean enableOMRatis, boolean isAclEnabled, boolean noFlush) {
super(BucketLayout.FILE_SYSTEM_OPTIMIZED, true, enableOMRatis, isAclEnabled, noFlush);
super(BucketLayout.FILE_SYSTEM_OPTIMIZED, true, isAclEnabled, noFlush);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ public class TestDirectoryDeletingServiceWithFSO {
private static final Logger LOG =
LoggerFactory.getLogger(TestDirectoryDeletingServiceWithFSO.class);

private static boolean omRatisEnabled = true;

private static MiniOzoneCluster cluster;
private static FileSystem fs;
private static String volumeName;
Expand All @@ -120,7 +118,6 @@ public static void init() throws Exception {
conf.setTimeDuration(OZONE_BLOCK_DELETING_SERVICE_INTERVAL, 100,
TimeUnit.MILLISECONDS);
conf.setTimeDuration(OZONE_SNAPSHOT_DELETING_SERVICE_INTERVAL, 1000, TimeUnit.MILLISECONDS);
conf.setBoolean(OMConfigKeys.OZONE_OM_RATIS_ENABLE_KEY, omRatisEnabled);
conf.setBoolean(OZONE_ACL_ENABLED, true);
cluster = MiniOzoneCluster.newBuilder(conf)
.setNumDatanodes(3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
import static org.apache.hadoop.ozone.TestDataUtil.cleanupOpenKeyTable;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_DEFAULT_BUCKET_LAYOUT;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_ADDRESS_KEY;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_RATIS_ENABLE_KEY;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_DIR_DELETING_SERVICE_INTERVAL;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_OPEN_KEY_CLEANUP_SERVICE_INTERVAL;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_OPEN_KEY_EXPIRE_THRESHOLD;
Expand Down Expand Up @@ -181,7 +180,6 @@ public class TestHSync {
public static void init() throws Exception {
final BucketLayout layout = BUCKET_LAYOUT;

CONF.setBoolean(OZONE_OM_RATIS_ENABLE_KEY, false);
CONF.set(OZONE_DEFAULT_BUCKET_LAYOUT, layout.name());
CONF.setBoolean(OzoneConfigKeys.OZONE_HBASE_ENHANCEMENTS_ALLOWED, true);
CONF.setBoolean("ozone.client.hbase.enhancements.allowed", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_LEASE_HARD_LIMIT;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_OPEN_KEY_CLEANUP_SERVICE_INTERVAL;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_OPEN_KEY_EXPIRE_THRESHOLD;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_RATIS_ENABLE_KEY;
import static org.apache.hadoop.ozone.om.OmUpgradeConfig.ConfigStrings.OZONE_OM_INIT_DEFAULT_LAYOUT_VERSION;
import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.NOT_SUPPORTED_OPERATION_PRIOR_FINALIZATION;
import static org.apache.ozone.test.LambdaTestUtils.await;
Expand Down Expand Up @@ -105,7 +104,6 @@ public class TestHSyncUpgrade {
public void init() throws Exception {
final BucketLayout layout = BUCKET_LAYOUT;

conf.setBoolean(OZONE_OM_RATIS_ENABLE_KEY, false);
conf.set(OZONE_DEFAULT_BUCKET_LAYOUT, layout.name());
conf.setBoolean(OzoneConfigKeys.OZONE_HBASE_ENHANCEMENTS_ALLOWED, true);
conf.setBoolean("ozone.client.hbase.enhancements.allowed", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_URI_DELIMITER;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_DEFAULT_BUCKET_LAYOUT;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_ADDRESS_KEY;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_RATIS_ENABLE_KEY;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down Expand Up @@ -119,7 +118,6 @@ public void init() throws IOException, InterruptedException,
final int blockSize = 2 * maxFlushSize;
final BucketLayout layout = BucketLayout.FILE_SYSTEM_OPTIMIZED;

conf.setBoolean(OZONE_OM_RATIS_ENABLE_KEY, false);
conf.setBoolean(OzoneConfigKeys.OZONE_HBASE_ENHANCEMENTS_ALLOWED, true);
conf.setBoolean("ozone.client.hbase.enhancements.allowed", true);
conf.setBoolean(OzoneConfigKeys.OZONE_FS_HSYNC_ENABLED, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestO3FS extends AbstractOzoneFileSystemTest {
TestO3FS() {
super(false, false, BucketLayout.LEGACY);
super(false, BucketLayout.LEGACY);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestO3FSWithFSO extends AbstractOzoneFileSystemTestWithFSO {
TestO3FSWithFSO() {
super(false);
super();
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestO3FSWithFSPaths extends AbstractOzoneFileSystemTest {
TestO3FSWithFSPaths() {
super(true, false, BucketLayout.LEGACY);
super(true, BucketLayout.LEGACY);
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestOFS extends AbstractRootedOzoneFileSystemTest {
TestOFS() {
super(BucketLayout.LEGACY, false, false, false, false);
super(BucketLayout.LEGACY, false, false, false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestOFSWithCacheOnly extends AbstractRootedOzoneFileSystemTest {
TestOFSWithCacheOnly() {
super(BucketLayout.LEGACY, false, false, false, true);
super(BucketLayout.LEGACY, false, false, true);
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestOFSWithFSPaths extends AbstractRootedOzoneFileSystemTest {
TestOFSWithFSPaths() {
super(BucketLayout.LEGACY, true, false, false, false);
super(BucketLayout.LEGACY, true, false, false);
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit 379056f

Please sign in to comment.