diff --git a/buildtools/src/main/resources/pulsar/suppressions.xml b/buildtools/src/main/resources/pulsar/suppressions.xml
index 66b3a4e204f27..3294a871215b1 100644
--- a/buildtools/src/main/resources/pulsar/suppressions.xml
+++ b/buildtools/src/main/resources/pulsar/suppressions.xml
@@ -48,7 +48,6 @@
-
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokerStatsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokerStatsBase.java
index 28a4934deebae..e92b4dccf67f4 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokerStatsBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokerStatsBase.java
@@ -52,7 +52,9 @@ public class BrokerStatsBase extends AdminResource {
@GET
@Path("/metrics")
- @ApiOperation(value = "Gets the metrics for Monitoring", notes = "Requested should be executed by Monitoring agent on each broker to fetch the metrics", response = Metrics.class, responseContainer = "List")
+ @ApiOperation(value = "Gets the metrics for Monitoring",
+ notes = "Requested should be executed by Monitoring agent on each broker to fetch the metrics",
+ response = Metrics.class, responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission") })
public Collection getMetrics() throws Exception {
// Ensure super user access only
@@ -68,7 +70,8 @@ public Collection getMetrics() throws Exception {
@GET
@Path("/mbeans")
- @ApiOperation(value = "Get all the mbean details of this broker JVM", response = Metrics.class, responseContainer = "List")
+ @ApiOperation(value = "Get all the mbean details of this broker JVM",
+ response = Metrics.class, responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission") })
public Collection getMBeans() throws Exception {
// Ensure super user access only
@@ -84,10 +87,9 @@ public Collection getMBeans() throws Exception {
@GET
@Path("/destinations")
- @ApiOperation(value = "Get all the topic stats by namespace", response = OutputStream.class, responseContainer = "OutputStream") // https://github.com/swagger-api/swagger-ui/issues/558
- // map
- // support
- // missing
+ @ApiOperation(value = "Get all the topic stats by namespace", response = OutputStream.class,
+ responseContainer = "OutputStream") // https://github.com/swagger-api/swagger-ui/issues/558
+ // map support missing
@ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission") })
public StreamingOutput getTopics2() throws Exception {
// Ensure super user access only
@@ -103,7 +105,8 @@ public StreamingOutput getTopics2() throws Exception {
@GET
@Path("/allocator-stats/{allocator}")
- @ApiOperation(value = "Get the stats for the Netty allocator. Available allocators are 'default' and 'ml-cache'", response = AllocatorStats.class)
+ @ApiOperation(value = "Get the stats for the Netty allocator. Available allocators are 'default' and 'ml-cache'",
+ response = AllocatorStats.class)
@ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission") })
public AllocatorStats getAllocatorStats(@PathParam("allocator") String allocatorName) throws Exception {
// Ensure super user access only
@@ -121,15 +124,13 @@ public AllocatorStats getAllocatorStats(@PathParam("allocator") String allocator
@GET
@Path("/bookieops")
- @ApiOperation(value = "Get pending bookie client op stats by namesapce", response = PendingBookieOpsStats.class, // https://github.com/swagger-api/swagger-core/issues/449
- // nested
- // containers
- // are
- // not
- // supported
+ @ApiOperation(value = "Get pending bookie client op stats by namesapce",
+ response = PendingBookieOpsStats.class,
+ // https://github.com/swagger-api/swagger-core/issues/449
+ // nested containers are not supported
responseContainer = "Map")
@ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission") })
- public Map> getPendingBookieOpsStats() throws Exception {
+ public Map> getPendingBookieOpsStats() {
// Ensure super user access only
validateSuperUserAccess();
try {
@@ -142,7 +143,8 @@ public Map> getPendingBookieOpsStats(
@GET
@Path("/load-report")
- @ApiOperation(value = "Get Load for this broker", notes = "consists of topics stats & systemResourceUsage", response = LoadReport.class)
+ @ApiOperation(value = "Get Load for this broker", notes = "consists of topics stats & systemResourceUsage",
+ response = LoadReport.class)
@ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission") })
public LoadManagerReport getLoadReport() throws Exception {
// Ensure super user access only
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
index e3d9bf3cc119d..85549af68523d 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
@@ -99,11 +99,12 @@ public Set getActiveBrokers(@PathParam("cluster") String cluster) throws
@GET
@Path("/{clusterName}/{broker-webserviceurl}/ownedNamespaces")
- @ApiOperation(value = "Get the list of namespaces served by the specific broker", response = NamespaceOwnershipStatus.class, responseContainer = "Map")
+ @ApiOperation(value = "Get the list of namespaces served by the specific broker",
+ response = NamespaceOwnershipStatus.class, responseContainer = "Map")
@ApiResponses(value = {
- @ApiResponse(code = 307, message = "Current broker doesn't serve the cluster"),
- @ApiResponse(code = 403, message = "Don't have admin permission"),
- @ApiResponse(code = 404, message = "Cluster doesn't exist") })
+ @ApiResponse(code = 307, message = "Current broker doesn't serve the cluster"),
+ @ApiResponse(code = 403, message = "Don't have admin permission"),
+ @ApiResponse(code = 404, message = "Cluster doesn't exist") })
public Map getOwnedNamespaces(@PathParam("clusterName") String cluster,
@PathParam("broker-webserviceurl") String broker) throws Exception {
validateSuperUserAccess();
@@ -122,21 +123,24 @@ public Map getOwnedNamespaces(@PathParam("clus
@POST
@Path("/configuration/{configName}/{configValue}")
- @ApiOperation(value = "Update dynamic serviceconfiguration into zk only. This operation requires Pulsar super-user privileges.")
+ @ApiOperation(value =
+ "Update dynamic serviceconfiguration into zk only. This operation requires Pulsar super-user privileges.")
@ApiResponses(value = {
- @ApiResponse(code = 204, message = "Service configuration updated successfully"),
- @ApiResponse(code = 403, message = "You don't have admin permission to update service-configuration"),
- @ApiResponse(code = 404, message = "Configuration not found"),
- @ApiResponse(code = 412, message = "Invalid dynamic-config value"),
- @ApiResponse(code = 500, message = "Internal server error")})
- public void updateDynamicConfiguration(@PathParam("configName") String configName, @PathParam("configValue") String configValue) throws Exception {
+ @ApiResponse(code = 204, message = "Service configuration updated successfully"),
+ @ApiResponse(code = 403, message = "You don't have admin permission to update service-configuration"),
+ @ApiResponse(code = 404, message = "Configuration not found"),
+ @ApiResponse(code = 412, message = "Invalid dynamic-config value"),
+ @ApiResponse(code = 500, message = "Internal server error") })
+ public void updateDynamicConfiguration(@PathParam("configName") String configName,
+ @PathParam("configValue") String configValue) throws Exception {
validateSuperUserAccess();
updateDynamicConfigurationOnZk(configName, configValue);
}
@DELETE
@Path("/configuration/{configName}")
- @ApiOperation(value = "Delete dynamic serviceconfiguration into zk only. This operation requires Pulsar super-user privileges.")
+ @ApiOperation(value =
+ "Delete dynamic serviceconfiguration into zk only. This operation requires Pulsar super-user privileges.")
@ApiResponses(value = { @ApiResponse(code = 204, message = "Service configuration updated successfully"),
@ApiResponse(code = 403, message = "You don't have admin permission to update service-configuration"),
@ApiResponse(code = 412, message = "Invalid dynamic-config value"),
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java
index 8fcef08c2d9ae..5e9dfbf3f166b 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java
@@ -523,7 +523,8 @@ public NamespaceIsolationData getNamespaceIsolationPolicy(
"NamespaceIsolationPolicies for cluster " + cluster + " does not exist"));
// construct the response to Namespace isolation data map
if (!nsIsolationPolicies.getPolicies().containsKey(policyName)) {
- log.info("[{}] Cannot find NamespaceIsolationPolicy {} for cluster {}", clientAppId(), policyName, cluster);
+ log.info("[{}] Cannot find NamespaceIsolationPolicy {} for cluster {}",
+ clientAppId(), policyName, cluster);
throw new RestException(Status.NOT_FOUND,
"Cannot find NamespaceIsolationPolicy " + policyName + " for cluster " + cluster);
}
@@ -732,7 +733,8 @@ public void setNamespaceIsolationPolicy(
}
}
- private boolean createZnodeIfNotExist(String path, Optional