Skip to content

Commit

Permalink
Code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sarvekshayr committed Jan 31, 2025
1 parent 143e923 commit 27ed6e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public class TestOzoneRepairShell {
private static MiniOzoneCluster cluster = null;
private static OzoneConfiguration conf = null;
private static String om;
private static TransactionInfoRepair transactionInfoRepair;
private static final String TRANSACTION_INFO_TABLE_TERM_INDEX_PATTERN = "([0-9]+#[0-9]+)";

@BeforeAll
Expand All @@ -67,7 +66,6 @@ public static void init() throws Exception {
cluster = MiniOzoneCluster.newBuilder(conf).build();
cluster.waitForClusterToBeReady();
om = conf.get(OZONE_OM_ADDRESS_KEY);
transactionInfoRepair = new TransactionInfoRepair();
}

@BeforeEach
Expand All @@ -92,7 +90,7 @@ static void cleanup() {
public void testUpdateTransactionInfoTable(Component component) throws Exception {
CommandLine cmd = new OzoneRepair().getCmd();
String dbPath = getDbPath(component);
String componentLowerCase = component.toString().toLowerCase();
String componentLowerCase = component.name().toLowerCase();

cluster.getOzoneManager().stop();
cluster.getStorageContainerManager().stop();
Expand Down Expand Up @@ -143,7 +141,7 @@ private String getDbPath(Component component) {
private String scanTransactionInfoTable(String dbPath, Component component) {
CommandLine debugCmd = new OzoneDebug().getCmd();
debugCmd.execute("ldb", "--db", dbPath, "scan", "--column_family",
transactionInfoRepair.getColumnFamily(component).getName());
TransactionInfoRepair.getColumnFamily(component).getName());
return out.get();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected Component serviceToBeOffline() {
}
}

public DBColumnFamilyDefinition<String, TransactionInfo> getColumnFamily(Component component) {
public static DBColumnFamilyDefinition<String, TransactionInfo> getColumnFamily(Component component) {
switch (component) {
case OM:
return OMDBDefinition.TRANSACTION_INFO_TABLE;
Expand Down

0 comments on commit 27ed6e0

Please sign in to comment.