nodece commented on code in PR #15348:
URL: https://github.com/apache/pulsar/pull/15348#discussion_r867325123
##########
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:
@codelipenghui I add a test for this, please help review, thanks.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]