adoroszlai commented on code in PR #9216:
URL: https://github.com/apache/ozone/pull/9216#discussion_r2594611283
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/repair/om/TestFSORepairTool.java:
##########
@@ -189,7 +191,7 @@ public void
testUnreachableObjectsWithParentInDeletedTable() {
void testConnectedTreeOneBucket(boolean dryRun) {
String expectedOutput = serializeReport(vol1Report);
- int exitCode = execute(dryRun, "-v", "/vol1", "-b", "bucket1");
+ int exitCode = execute(null, dryRun, "-v", "/vol1", "-b", "bucket1");
Review Comment:
Pass `dbPath` instead of `null`. It's easier to read and less error-prone.
```suggestion
int exitCode = execute(dbPath, dryRun, "-v", "/vol1", "-b", "bucket1");
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/repair/om/TestFSORepairTool.java:
##########
@@ -360,15 +381,17 @@ public void validateClusterAfterRestart() throws
Exception {
}
private int repair(String... args) {
- return execute(false, args);
+ return execute(null, false, args);
Review Comment:
```suggestion
return execute(dbPath, false, args);
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/repair/om/TestFSORepairTool.java:
##########
@@ -360,15 +381,17 @@ public void validateClusterAfterRestart() throws
Exception {
}
private int repair(String... args) {
- return execute(false, args);
+ return execute(null, false, args);
}
private int dryRun(String... args) {
- return execute(true, args);
+ return execute(null, true, args);
}
- private int execute(boolean dryRun, String... args) {
- List<String> argList = new ArrayList<>(Arrays.asList("om", "fso-tree",
"--db", dbPath));
+ private int execute(String customDbPath, boolean dryRun, String... args) {
+ String effectiveDbPath = customDbPath != null ? customDbPath : dbPath;
Review Comment:
```suggestion
private int execute(String effectiveDbPath, boolean dryRun, String...
args) {
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/repair/om/TestFSORepairTool.java:
##########
@@ -360,15 +381,17 @@ public void validateClusterAfterRestart() throws
Exception {
}
private int repair(String... args) {
- return execute(false, args);
+ return execute(null, false, args);
}
private int dryRun(String... args) {
- return execute(true, args);
+ return execute(null, true, args);
Review Comment:
```suggestion
return execute(dbPath, true, args);
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]