pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] ConcurrencyPractitioner commented on a change in pull request #3625: [Issue #3436][pulsar-broker] Creating REST Endpoint for non-partitioned topic creation
Date Wed, 20 Feb 2019 16:38:04 GMT
ConcurrencyPractitioner commented on a change in pull request #3625: [Issue #3436][pulsar-broker]
Creating REST Endpoint for non-partitioned topic creation
URL: https://github.com/apache/pulsar/pull/3625#discussion_r258569854
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
 ##########
 @@ -140,6 +140,23 @@ public void createPartitionedTopic(@PathParam("tenant") String tenant,
@PathPara
         internalCreatePartitionedTopic(numPartitions, authoritative);
     }
 
+    @PUT
+    @Path("/{tenant}/{namespace}/{topic}")
+    @ApiOperation(value="Create a non-partitioned topic.", notes = "This is the only REST
endpoint from which non-partitioned topics could be created.")
+    @ApiResponses(value = {
+        @ApiResponse(code = 403, message = "Don't have admin permission"),
+        @ApiResponse(code = 409, message = "Partitioned topic already exist"),
+        @ApiResponse(code = 412, message = "Failed Reason : Name is invalid or Namespace
does not have any clusters configured"),
+        @ApiResponse(code = 503, message = "Failed to validate global cluster configuration")
+    })
+    public void createNonPartitionedTopic(@PathParam("tenant") String tenant, @PathParam("namespace")
String namespace,
+            @PathParam("topic") @Encoded String encodedTopic, 
+            @QueryParam("authoritative") @DefaultValue("false") boolean authoritative) {
+    	validateGlobalNamespaceOwnership(tenant,namespace);
+        validatePartitionedTopicName(tenant, namespace, encodedTopic);
 
 Review comment:
   Yeah, good point.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message