From commits-return-19221-archive-asf-public=cust-asf.ponee.io@pulsar.apache.org Tue Dec 18 00:34:43 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 399C0180675 for ; Tue, 18 Dec 2018 00:34:43 +0100 (CET) Received: (qmail 50214 invoked by uid 500); 17 Dec 2018 23:34:42 -0000 Mailing-List: contact commits-help@pulsar.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.apache.org Delivered-To: mailing list commits@pulsar.apache.org Received: (qmail 50205 invoked by uid 99); 17 Dec 2018 23:34:42 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2018 23:34:42 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] jerrypeng commented on a change in pull request #3168: Refactor api commands Message-ID: <154508968171.3564.2782728805930163788.gitbox@gitbox.apache.org> Date: Mon, 17 Dec 2018 23:34:41 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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