Class FunctionsApiV3Resource

java.lang.Object
org.apache.pulsar.functions.worker.rest.FunctionApiResource
org.apache.pulsar.functions.worker.rest.api.v3.FunctionsApiV3Resource
All Implemented Interfaces:
Supplier<WorkerService>

@Path("/functions") @Produces("application/json") @Consumes("application/json") public class FunctionsApiV3Resource extends FunctionApiResource
  • Constructor Details

    • FunctionsApiV3Resource

      public FunctionsApiV3Resource()
  • Method Details

    • registerFunction

      @POST @Path("/{tenant}/{namespace}/{functionName}") @Consumes("multipart/form-data") public void registerFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, String functionPkgUrl, org.apache.pulsar.common.functions.FunctionConfig functionConfig)
    • updateFunction

      @PUT @Path("/{tenant}/{namespace}/{functionName}") @Consumes("multipart/form-data") public void updateFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, String functionPkgUrl, org.apache.pulsar.common.functions.FunctionConfig functionConfig, org.apache.pulsar.common.functions.UpdateOptionsImpl updateOptions)
    • deregisterFunction

      @DELETE @Path("/{tenant}/{namespace}/{functionName}") public void deregisterFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName)
    • getFunctionInfo

      @GET @Path("/{tenant}/{namespace}/{functionName}") public org.apache.pulsar.common.functions.FunctionConfig getFunctionInfo(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName)
    • listFunctions

      @GET @Produces("application/json") @Path("/{tenant}/{namespace}") public List<String> listFunctions(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace)
    • getFunctionInstanceStatus

      @GET @Produces("application/json") @Path("/{tenant}/{namespace}/{functionName}/{instanceId}/status") public org.apache.pulsar.common.policies.data.FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData getFunctionInstanceStatus(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, @PathParam("instanceId") String instanceId) throws IOException
      Throws:
      IOException
    • getFunctionStatus

      @GET @Produces("application/json") @Path("/{tenant}/{namespace}/{functionName}/status") public org.apache.pulsar.common.policies.data.FunctionStatus getFunctionStatus(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName) throws IOException
      Throws:
      IOException
    • getFunctionStats

      @GET @Produces("application/json") @Path("/{tenant}/{namespace}/{functionName}/stats") public org.apache.pulsar.common.policies.data.FunctionStatsImpl getFunctionStats(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName) throws IOException
      Throws:
      IOException
    • getFunctionInstanceStats

      @GET @Produces("application/json") @Path("/{tenant}/{namespace}/{functionName}/{instanceId}/stats") public org.apache.pulsar.common.policies.data.FunctionInstanceStatsDataImpl getFunctionInstanceStats(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, @PathParam("instanceId") String instanceId) throws IOException
      Throws:
      IOException
    • triggerFunction

      @POST @Path("/{tenant}/{namespace}/{functionName}/trigger") @Consumes("multipart/form-data") public String triggerFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, String input, InputStream uploadedInputStream, String topic)
    • restartFunction

      @POST @Path("/{tenant}/{namespace}/{functionName}/{instanceId}/restart") @Consumes("application/json") public void restartFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, @PathParam("instanceId") String instanceId)
    • restartFunction

      @POST @Path("/{tenant}/{namespace}/{functionName}/restart") @Consumes("application/json") public void restartFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName)
    • stopFunction

      @POST @Path("/{tenant}/{namespace}/{functionName}/{instanceId}/stop") @Consumes("application/json") public void stopFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, @PathParam("instanceId") String instanceId)
    • stopFunction

      @POST @Path("/{tenant}/{namespace}/{functionName}/stop") @Consumes("application/json") public void stopFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName)
    • startFunction

      @POST @Path("/{tenant}/{namespace}/{functionName}/{instanceId}/start") @Consumes("application/json") public void startFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, @PathParam("instanceId") String instanceId)
    • startFunction

      @POST @Path("/{tenant}/{namespace}/{functionName}/start") @Consumes("application/json") public void startFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName)
    • uploadFunction

      @POST @Path("/upload") @Consumes("multipart/form-data") public void uploadFunction(InputStream uploadedInputStream, String path)
    • downloadFunction

      @GET @Path("/download") public javax.ws.rs.core.StreamingOutput downloadFunction(@QueryParam("path") String path)
    • downloadFunction

      @GET @Path("/{tenant}/{namespace}/{functionName}/download") public javax.ws.rs.core.StreamingOutput downloadFunction(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, @QueryParam("transform-function") boolean transformFunction)
    • getConnectorsList

      @GET @Path("/connectors") @Deprecated public List<org.apache.pulsar.common.io.ConnectorDefinition> getConnectorsList() throws IOException
      Deprecated.
      Throws:
      IOException
    • reloadBuiltinFunctions

      @POST @Path("/builtins/reload") public void reloadBuiltinFunctions() throws IOException
      Throws:
      IOException
    • getBuiltinFunctions

      @GET @Path("/builtins") @Produces("application/json") public List<org.apache.pulsar.common.functions.FunctionDefinition> getBuiltinFunctions()
    • getFunctionState

      @GET @Path("/{tenant}/{namespace}/{functionName}/state/{key}") public org.apache.pulsar.common.functions.FunctionState getFunctionState(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, @PathParam("key") String key) throws IOException
      Throws:
      IOException
    • putFunctionState

      @POST @Path("/{tenant}/{namespace}/{functionName}/state/{key}") @Consumes("multipart/form-data") public void putFunctionState(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, @PathParam("key") String key, org.apache.pulsar.common.functions.FunctionState stateJson) throws IOException
      Throws:
      IOException
    • updateFunctionOnWorkerLeader

      @PUT @Path("/leader/{tenant}/{namespace}/{functionName}") @Consumes("multipart/form-data") public void updateFunctionOnWorkerLeader(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("functionName") String functionName, InputStream uploadedInputStream, boolean delete)