You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ch...@apache.org on 2021/11/23 13:45:29 UTC
[pulsar] branch master updated: Remove Unused variable init and unused method In AdminResource Since 2018 (#12882)
This is an automated email from the ASF dual-hosted git repository.
chenhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 585017b Remove Unused variable init and unused method In AdminResource Since 2018 (#12882)
585017b is described below
commit 585017b6192fdf66e0b7cdf52b8a109233a2769e
Author: ZhangJian He <sh...@gmail.com>
AuthorDate: Tue Nov 23 21:44:30 2021 +0800
Remove Unused variable init and unused method In AdminResource Since 2018 (#12882)
### Modifications
Remove Unused variable init and unused method In AdminResource Since 2018.
And I think the getNamespacePolicies is a bit hot path.
---
.../java/org/apache/pulsar/broker/admin/AdminResource.java | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
index f3a94d2..41f57d2 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
@@ -278,7 +278,6 @@ public abstract class AdminResource extends PulsarWebResource {
protected Policies getNamespacePolicies(NamespaceName namespaceName) {
try {
- final String namespace = namespaceName.toString();
Policies policies = namespaceResources().getPolicies(namespaceName)
.orElseThrow(() -> new RestException(Status.NOT_FOUND, "Namespace does not exist"));
// fetch bundles from LocalZK-policies
@@ -320,17 +319,6 @@ public abstract class AdminResource extends PulsarWebResource {
});
}
- protected void mergeNamespaceWithDefaults(Policies policies, String namespace, String namespacePath) {
- final ServiceConfiguration config = pulsar().getConfiguration();
-
- if (policies.max_consumers_per_subscription < 1) {
- policies.max_consumers_per_subscription = config.getMaxConsumersPerSubscription();
- }
-
- final String cluster = config.getClusterName();
-
- }
-
protected BacklogQuota namespaceBacklogQuota(NamespaceName namespace,
BacklogQuota.BacklogQuotaType backlogQuotaType) {
return pulsar().getBrokerService().getBacklogQuotaManager()