pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jerrypeng commented on a change in pull request #3168: Refactor api commands
Date Mon, 17 Dec 2018 23:34:41 GMT
jerrypeng commented on a change in pull request #3168: Refactor api commands
URL: https://github.com/apache/pulsar/pull/3168#discussion_r242357780
 
 

 ##########
 File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/v2/FunctionApiV2Resource.java
 ##########
 @@ -180,87 +178,92 @@ public FunctionStats getFunctionStats(final @PathParam("tenant") String
tenant,
     })
     @Produces(MediaType.APPLICATION_JSON)
     @Path("/{tenant}/{namespace}/{functionName}/{instanceId}/stats")
-    public FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData getFunctionInstanceStats(final
@PathParam("tenant") String tenant,
-                                                                                        
         final @PathParam("namespace") String namespace,
-                                                                                        
         final @PathParam("functionName") String functionName,
-                                                                                        
         final @PathParam("instanceId") String instanceId) throws IOException {
+    public FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData getFunctionInstanceStats(
+            final @PathParam("tenant") String tenant,
+            final @PathParam("namespace") String namespace,
+            final @PathParam("functionName") String functionName,
+            final @PathParam("instanceId") String instanceId) throws IOException {
         return functions.getFunctionsInstanceStats(
                 tenant, namespace, functionName, instanceId, uri.getRequestUri());
     }
 
     @POST
     @Path("/{tenant}/{namespace}/{functionName}/trigger")
     @Consumes(MediaType.MULTIPART_FORM_DATA)
-    public Response triggerFunction(final @PathParam("tenant") String tenant,
-                                    final @PathParam("namespace") String namespace,
-                                    final @PathParam("functionName") String functionName,
-                                    final @FormDataParam("data") String input,
-                                    final @FormDataParam("dataStream") InputStream uploadedInputStream,
-                                    final @FormDataParam("topic") String topic) {
+    public String triggerFunction(final @PathParam("tenant") String tenant,
+                                  final @PathParam("namespace") String namespace,
+                                  final @PathParam("functionName") String functionName,
+                                  final @FormDataParam("data") String input,
+                                  final @FormDataParam("dataStream") InputStream uploadedInputStream,
+                                  final @FormDataParam("topic") String topic) {
         return functions.triggerFunction(tenant, namespace, functionName, input, uploadedInputStream,
topic);
     }
 
     @POST
     @ApiOperation(value = "Restart function instance", 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:
   This doesn't appear to be fix.  Still all indented the same

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