Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ public void testNSSummaryCLIOBS() throws UnsupportedEncodingException {
String path = "/" + volumeName + "/" + bucketOBS;
executeAdminCommands(path);
// Should throw warning, since bucket is in OBS bucket layout.
assertThat(getOutContentString()).contains("[Warning] Namespace CLI is not designed for OBS bucket layout.");
assertThat(getOutContentString()).contains("Put more files into it to visualize DU");
assertThat(getOutContentString()).contains("Put more files into it to visualize file size distribution");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.makeHttpCall;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printEmptyPathRequest;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printBucketReminder;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printNewLines;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printPathNotFound;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printSpaces;
Expand Down Expand Up @@ -79,10 +78,6 @@ public Void call() throws Exception {
} else if ("TYPE_NOT_APPLICABLE".equals(distResponse.path("status").asText())) {
printTypeNA("File Size Distribution");
} else {
if (parent.isNotValidBucketOrOBSBucket(path)) {
printBucketReminder();
}

printWithUnderline("File Size Distribution", true);
JsonNode fileSizeDist = distResponse.path("dist");
double sum = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,6 @@ public static void printWithUnderline(String str, boolean newLine) {
}
}

public static void printBucketReminder() {
printNewLines(1);
System.out.println(
"[Warning] Namespace CLI is not designed for OBS bucket layout.\n" +
"Bucket being accessed must be of type FILE_SYSTEM_OPTIMIZED " +
"bucket layout or \nLEGACY bucket layout with " +
"'ozone.om.enable.filesystem.paths' set to true.");
printNewLines(1);
}

public static String parseInputPath(String path) {
if (!path.startsWith("ofs://")) {
return path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.makeHttpCall;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printEmptyPathRequest;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printBucketReminder;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printKVSeparator;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printNewLines;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printPathNotFound;
Expand Down Expand Up @@ -80,10 +79,6 @@ public Void call() throws Exception {
} else if ("TYPE_NOT_APPLICABLE".equals(quotaResponse.path("status").asText())) {
printTypeNA("Quota");
} else {
if (parent.isNotValidBucketOrOBSBucket(path)) {
printBucketReminder();
}

printWithUnderline("Quota", true);

long quotaAllowed = quotaResponse.get("allowed").asLong();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.makeHttpCall;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.parseInputPath;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printEmptyPathRequest;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printBucketReminder;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printKVSeparator;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printNewLines;
import static org.apache.hadoop.ozone.admin.nssummary.NSSummaryCLIUtils.printPathNotFound;
Expand Down Expand Up @@ -76,10 +75,6 @@ public Void call() throws Exception {
if ("PATH_NOT_FOUND".equals(summaryResponse.path("status").asText())) {
printPathNotFound();
} else {
if (parent.isNotValidBucketOrOBSBucket(path)) {
printBucketReminder();
}

printWithUnderline("Entity Type", false);
printKVSeparator();
System.out.println(summaryResponse.get("type"));
Expand Down