Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
sarvekshayr committed Dec 2, 2024
1 parent d943b11 commit 0730947
Showing 1 changed file with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.apache.hadoop.ozone.om.helpers.BucketLayout;
import org.apache.hadoop.ozone.om.helpers.OmDirectoryInfo;
import org.apache.hadoop.ozone.repair.OzoneRepair;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -68,10 +67,10 @@ public class TestFSORepairTool {
private static final PrintStream OLD_OUT = System.out;
private static final PrintStream OLD_ERR = System.err;
private static final String DEFAULT_ENCODING = UTF_8.name();
private static MiniOzoneCluster cluster;
private static FileSystem fs;
private static OzoneClient client;
private static OzoneConfiguration conf = null;
private MiniOzoneCluster cluster;
private FileSystem fs;
private OzoneClient client;
private OzoneConfiguration conf = null;

@BeforeEach
public void init() throws Exception {
Expand Down Expand Up @@ -101,10 +100,7 @@ public void reset() throws IOException {
// restore system streams
System.setOut(OLD_OUT);
System.setErr(OLD_ERR);
}

@AfterAll
public static void teardown() {
if (cluster != null) {
cluster.shutdown();
}
Expand Down Expand Up @@ -417,9 +413,9 @@ private String extractRelevantSection(String cliOutput) {

private String serializeReport(FSORepairTool.Report report) {
return String.format(
"Reachable:\n\tDirectories: %d\n\tFiles: %d\n\tBytes: %d\n" +
"Unreachable:\n\tDirectories: %d\n\tFiles: %d\n\tBytes: %d\n" +
"Unreferenced:\n\tDirectories: %d\n\tFiles: %d\n\tBytes: %d",
"Reachable:%n\tDirectories: %d%n\tFiles: %d%n\tBytes: %d%n" +
"Unreachable:%n\tDirectories: %d%n\tFiles: %d%n\tBytes: %d%n" +
"Unreferenced:%n\tDirectories: %d%n\tFiles: %d%n\tBytes: %d",
report.getReachable().getDirs(),
report.getReachable().getFiles(),
report.getReachable().getBytes(),
Expand Down

0 comments on commit 0730947

Please sign in to comment.