pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sijie commented on a change in pull request #3168: Refactor api commands
Date Thu, 20 Dec 2018 03:22:20 GMT
sijie commented on a change in pull request #3168: Refactor api commands
URL: https://github.com/apache/pulsar/pull/3168#discussion_r243145540
 
 

 ##########
 File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/v2/SourceApiV2Resource.java
 ##########
 @@ -152,22 +151,24 @@ public Response listSources(final @PathParam("tenant") String tenant,
             @ApiResponse(code = 500, message = "Internal server error") })
     @Path("/{tenant}/{namespace}/{sourceName}/{instanceId}/restart")
     @Consumes(MediaType.APPLICATION_JSON)
-    public Response restartSource(final @PathParam("tenant") String tenant,
-            final @PathParam("namespace") String namespace, final @PathParam("sourceName")
String sourceName,
-            final @PathParam("instanceId") String instanceId) {
-        return source.restartFunctionInstance(tenant, namespace, sourceName, instanceId,
this.uri.getRequestUri());
+    public void restartSource(final @PathParam("tenant") String tenant,
+                              final @PathParam("namespace") String namespace,
+                              final @PathParam("sourceName") String sourceName,
+                              final @PathParam("instanceId") String instanceId) {
+        source.restartFunctionInstance(tenant, namespace, sourceName, instanceId, this.uri.getRequestUri());
     }
 
     @POST
     @ApiOperation(value = "Restart all source instances", response = Void.class)
     @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request"),
-            @ApiResponse(code = 404, message = "The function does not exist"),
-            @ApiResponse(code = 500, message = "Internal server error") })
+    @ApiResponse(code = 404, message = "The function does not exist"),
 
 Review comment:
   please revert the indent change here. because @ApiResponse is not a separate annotation,
but it is part of `@ApiResponses`

----------------------------------------------------------------
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