You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/06 12:30:18 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #15348: [improve][broker] Make internalGetStats to async

codelipenghui commented on code in PR #15348:
URL: https://github.com/apache/pulsar/pull/15348#discussion_r866778679


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/NonPersistentTopics.java:
##########
@@ -89,27 +87,6 @@ public PartitionedTopicMetadata getPartitionedMetadata(@PathParam("property") St
         return getPartitionedTopicMetadata(topicName, authoritative, checkAllowAutoCreation);
     }
 
-    @GET
-    @Path("{property}/{cluster}/{namespace}/{topic}/stats")
-    @ApiOperation(hidden = true, value = "Get the stats for the topic.")
-    @ApiResponses(value = {
-            @ApiResponse(code = 307, message = "Current broker doesn't serve the namespace of this topic"),
-            @ApiResponse(code = 403, message = "Don't have admin permission"),
-            @ApiResponse(code = 404, message = "Topic does not exist")})
-    public NonPersistentTopicStats getStats(@PathParam("property") String property,
-                                            @PathParam("cluster") String cluster,
-                                            @PathParam("namespace") String namespace,
-                                            @PathParam("topic") @Encoded String encodedTopic,
-                                            @QueryParam("authoritative") @DefaultValue("false") boolean authoritative,
-                                            @QueryParam("getPreciseBacklog") @DefaultValue("false")
-                                                                       boolean getPreciseBacklog) {
-        validateTopicName(property, cluster, namespace, encodedTopic);
-        validateTopicOwnership(topicName, authoritative);
-        validateTopicOperation(topicName, TopicOperation.GET_STATS);
-        Topic topic = getTopicReference(topicName);
-        return ((NonPersistentTopic) topic).getStats(getPreciseBacklog, false, false);
-    }
-

Review Comment:
   Do we have tests for a non-persistent topic? To make sure we will not introduce any break changes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org