From bc7ee1ac4b1bb1eac7b266a530e6a8ea027eaca7 Mon Sep 17 00:00:00 2001
From: Xiangying Meng <55571188+liangyepianzhou@users.noreply.github.com>
Date: Wed, 27 Sep 2023 22:30:43 +0800
Subject: [PATCH 1/3] Topic properties support for update and remove (#5911)
(cherry picked from commit 6d7dfcf6e4533a7afc3d00d6a6843a0cb859ab33)
(cherry picked from commit 6564e6e4bd110a24ccdea5c2234a425fd05d7340)
---
buildtools/pom.xml | 12 --
.../function15966267003425740315.tmp | 0
.../function17315915668425371952.tmp | 0
pom.xml | 25 ----
.../PulsarAuthorizationProvider.java | 1 +
.../admin/impl/PersistentTopicsBase.java | 108 ++++++++++++++++++
.../broker/admin/v2/PersistentTopics.java | 71 ++++++++++++
.../pulsar/broker/service/BrokerService.java | 3 +-
.../pulsar/broker/admin/AdminApi2Test.java | 93 +++++++++++++++
.../broker/admin/TopicPoliciesTest.java | 14 +++
.../apache/pulsar/client/admin/Topics.java | 36 ++++++
.../client/admin/internal/TopicsImpl.java | 28 +++++
.../pulsar/admin/cli/PulsarAdminToolTest.java | 11 ++
.../apache/pulsar/admin/cli/CmdTopics.java | 38 ++++++
.../common/policies/data/TopicOperation.java | 1 +
15 files changed, 403 insertions(+), 38 deletions(-)
create mode 100644 download/pulsar_functions/function15966267003425740315.tmp
create mode 100644 download/pulsar_functions/function17315915668425371952.tmp
diff --git a/buildtools/pom.xml b/buildtools/pom.xml
index e20322fc9fddb..69ed8d2497218 100644
--- a/buildtools/pom.xml
+++ b/buildtools/pom.xml
@@ -269,18 +269,6 @@
-
- maven-gpg-plugin
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
diff --git a/download/pulsar_functions/function15966267003425740315.tmp b/download/pulsar_functions/function15966267003425740315.tmp
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/download/pulsar_functions/function17315915668425371952.tmp b/download/pulsar_functions/function17315915668425371952.tmp
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/pom.xml b/pom.xml
index 23afb0fa262dd..b7328253e827d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2303,31 +2303,6 @@ flexible messaging model and an intuitive client API.
osx-x86_64
-
- release-sign-artifacts
-
-
- performRelease
- true
-
-
-
-
-
- maven-gpg-plugin
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
-
-
-
diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java
index 2201ee3031c55..8aa678e9e9f0a 100644
--- a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java
+++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java
@@ -630,6 +630,7 @@ public CompletableFuture allowTopicOperationAsync(TopicName topicName,
case COMPACT:
case OFFLOAD:
case UNLOAD:
+ case DELETE_METADATA:
case ADD_BUNDLE_RANGE:
case GET_BUNDLE_RANGE:
case DELETE_BUNDLE_RANGE:
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
index 1ec1c3d83554c..d70b4f79d4af4 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
@@ -64,6 +64,7 @@
import org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl;
import org.apache.bookkeeper.mledger.impl.ManagedLedgerOfflineBacklog;
import org.apache.bookkeeper.mledger.impl.PositionImpl;
+import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.pulsar.broker.PulsarServerException;
import org.apache.pulsar.broker.PulsarService;
@@ -654,6 +655,113 @@ private CompletableFuture