codelipenghui commented on a change in pull request #8565:
URL: https://github.com/apache/pulsar/pull/8565#discussion_r524873416
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/PersistentTopics.java
##########
@@ -347,6 +348,67 @@ public void getPartitionedStats(@Suspended final
AsyncResponse asyncResponse,
}
}
+ @GET
+ @Path("/{tenant}/{cluster}/{namespace}/{topic}/deduplicationEnabled")
+ @ApiOperation(value = "Get deduplication configuration of a topic.")
+ @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have
admin permission"),
+ @ApiResponse(code = 404, message = "Tenant or cluster or namespace
or topic doesn't exist"),
+ @ApiResponse(code = 405, message = "Topic level policy is
disabled, to enable the topic level policy and retry")})
+ public void getDeduplicationEnabled(@Suspended final AsyncResponse
asyncResponse,
+ @PathParam("tenant") String tenant,
+ @PathParam("cluster") String cluster,
+ @PathParam("namespace") String namespace,
+ @PathParam("topic") @Encoded String encodedTopic)
{
+ validateTopicName(tenant, cluster, namespace, encodedTopic);
+ TopicPolicies topicPolicies = getTopicPolicies(topicName).orElse(new
TopicPolicies());
Review comment:
Should we check the topic ownership check?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]