This is an automated email from the ASF dual-hosted git repository.

heesung pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new ca35b2eb490 Revert "[improve][admin] Expose the offload threshold in 
seconds to the amdin (#22101)"
ca35b2eb490 is described below

commit ca35b2eb4900b9b06ea6fd1363862fd36f615785
Author: Heesung Sohn <[email protected]>
AuthorDate: Thu Feb 29 11:41:26 2024 -0800

    Revert "[improve][admin] Expose the offload threshold in seconds to the 
amdin (#22101)"
    
    This reverts commit 6e988ef347ffdf31e77bc20882d84c4b6eb74adc.
---
 .../main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java   | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git 
a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
 
b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
index 28e8fb8d5f5..998591f8177 100644
--- 
a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
+++ 
b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
@@ -1962,8 +1962,7 @@ public class CmdNamespaces extends CmdBase {
         @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));
         }
     }
 
@@ -1981,18 +1980,11 @@ public class CmdNamespaces extends CmdBase {
                    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);
         }
     }
 

Reply via email to