Skip to content

Commit

Permalink
Revert "[improve][admin] Expose the offload threshold in seconds to t…
Browse files Browse the repository at this point in the history
…he amdin (#22101)"

This reverts commit 6e988ef.
  • Loading branch information
heesung-sn committed Feb 29, 2024
1 parent b3b1bfb commit ca35b2e
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1962,8 +1962,7 @@ private class GetOffloadThreshold extends CliCommand {
@Override
void run() throws PulsarAdminException {
String namespace = validateNamespace(params);
print("offloadThresholdInBytes: " + getAdmin().namespaces().getOffloadThreshold(namespace));
print("offloadThresholdInSeconds: " + getAdmin().namespaces().getOffloadThresholdInSeconds(namespace));
print(getAdmin().namespaces().getOffloadThreshold(namespace));
}
}

Expand All @@ -1981,18 +1980,11 @@ private class SetOffloadThreshold extends CliCommand {
required = true)
private String thresholdStr = "-1";

@Parameter(names = {"--time", "-t"},
description = "Maximum number of seconds stored on the pulsar cluster for a topic"
+ " before the broker will start offloading to longterm storage (eg: 10m, 5h, 3d, 2w).",
converter = TimeUnitToSecondsConverter.class)
private Long thresholdInSeconds = -1L;

@Override
void run() throws PulsarAdminException {
String namespace = validateNamespace(params);
long threshold = validateSizeString(thresholdStr);
getAdmin().namespaces().setOffloadThreshold(namespace, threshold);
getAdmin().namespaces().setOffloadThresholdInSeconds(namespace, thresholdInSeconds);
}
}

Expand Down

0 comments on commit ca35b2e

Please sign in to comment.