HQebupt commented on code in PR #16141:
URL: https://github.com/apache/pulsar/pull/16141#discussion_r902417914
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/NonPersistentTopics.java:
##########
@@ -93,25 +92,32 @@ public void getPartitionedMetadata(
@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 PersistentTopicInternalStats
getInternalStats(@PathParam("property") String property,
- @PathParam("cluster")
String cluster, @PathParam("namespace")
- String
namespace,
- @PathParam("topic")
@Encoded String encodedTopic,
-
@QueryParam("authoritative") @DefaultValue("false")
- boolean
authoritative,
-
@QueryParam("metadata") @DefaultValue("false")
- boolean
metadata) {
+ public void getInternalStats(
+ @Suspended final AsyncResponse asyncResponse,
+ @PathParam("property") String property,
+ @PathParam("cluster") String cluster, @PathParam("namespace")
+ String namespace,
+ @PathParam("topic") @Encoded String encodedTopic,
+ @QueryParam("authoritative") @DefaultValue("false")
+ boolean authoritative,
+ @QueryParam("metadata") @DefaultValue("false")
+ boolean metadata) {
validateTopicName(property, cluster, namespace, encodedTopic);
Review Comment:
If the `validateTopicName` throws RestException, the method can throw it out.
--
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]