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 2020/06/15 17:51:11 UTC

[GitHub] [pulsar] jerrypeng commented on a change in pull request #7255: Re-work Function MetaDataManager to make all metadata writes only by the leader

jerrypeng commented on a change in pull request #7255:
URL: https://github.com/apache/pulsar/pull/7255#discussion_r440345721



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/FunctionsBase.java
##########
@@ -692,4 +693,25 @@ public StreamingOutput downloadFunction(
     public List<ConnectorDefinition> getConnectorsList() throws IOException {
         return functions.getListOfConnectors();
     }
+
+    @PUT
+    @ApiOperation(value = "Updates a Pulsar Function on the worker leader")
+    @ApiResponses(value = {
+            @ApiResponse(code = 403, message = "The requester doesn't have super-user permissions"),
+            @ApiResponse(code = 404, message = "The function does not exist"),
+            @ApiResponse(code = 400, message = "Invalid request"),
+            @ApiResponse(code = 307, message = "Redirecting to the worker leader"),
+            @ApiResponse(code = 200, message = "Pulsar Function successfully updated")
+    })
+    @Path("/leader/{tenant}/{namespace}/{functionName}")
+    @Consumes(MediaType.MULTIPART_FORM_DATA)
+    public void updateFunctionOnWorkerLeader(final @PathParam("tenant") String tenant,

Review comment:
       I don't think it is a good idea to expose this in the admin API.  This is an internal thing and users should not have to the option to call this directly




----------------------------------------------------------------
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:
users@infra.apache.org