Class FunctionsImpl

java.lang.Object
org.apache.pulsar.functions.worker.rest.api.ComponentImpl
org.apache.pulsar.functions.worker.rest.api.FunctionsImpl
All Implemented Interfaces:
Component<PulsarWorkerService>, Functions<PulsarWorkerService>

public class FunctionsImpl extends ComponentImpl implements Functions<PulsarWorkerService>
  • Constructor Details

  • Method Details

    • registerFunction

      public void registerFunction(String tenant, String namespace, String functionName, InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, String functionPkgUrl, org.apache.pulsar.common.functions.FunctionConfig functionConfig, org.apache.pulsar.broker.authentication.AuthenticationParameters authParams)
      Description copied from interface: Functions
      Register a new function.
      Specified by:
      registerFunction in interface Functions<PulsarWorkerService>
      Parameters:
      tenant - The tenant of a Pulsar Function
      namespace - The namespace of a Pulsar Function
      functionName - The name of a Pulsar Function
      uploadedInputStream - Input stream of bytes
      fileDetail - A form-data content disposition header
      functionPkgUrl - URL path of the Pulsar Function package
      functionConfig - Configuration of Pulsar Function
      authParams - the authentication parameters associated with the request
    • updateFunction

      public void updateFunction(String tenant, String namespace, String functionName, InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, String functionPkgUrl, org.apache.pulsar.common.functions.FunctionConfig functionConfig, org.apache.pulsar.broker.authentication.AuthenticationParameters authParams, org.apache.pulsar.common.functions.UpdateOptionsImpl updateOptions)
      Description copied from interface: Functions
      Update a function.
      Specified by:
      updateFunction in interface Functions<PulsarWorkerService>
      Parameters:
      tenant - The tenant of a Pulsar Function
      namespace - The namespace of a Pulsar Function
      functionName - The name of a Pulsar Function
      uploadedInputStream - Input stream of bytes
      fileDetail - A form-data content disposition header
      functionPkgUrl - URL path of the Pulsar Function package
      functionConfig - Configuration of Pulsar Function
      authParams - the authentication parameters associated with the request
      updateOptions - Options while updating the function
    • getFunctionInstanceStatus

      public org.apache.pulsar.common.policies.data.FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData getFunctionInstanceStatus(String tenant, String namespace, String componentName, String instanceId, URI uri, org.apache.pulsar.broker.authentication.AuthenticationParameters authParams)
      Get status of a function instance. If this worker is not running the function instance,
      Specified by:
      getFunctionInstanceStatus in interface Functions<PulsarWorkerService>
      Parameters:
      tenant - the tenant the function belongs to
      namespace - the namespace the function belongs to
      componentName - the function name
      instanceId - the function instance id
      Returns:
      the function status
    • getFunctionStatus

      public org.apache.pulsar.common.policies.data.FunctionStatus getFunctionStatus(String tenant, String namespace, String componentName, URI uri, org.apache.pulsar.broker.authentication.AuthenticationParameters authParams)
      Get statuses of all function instances.
      Specified by:
      getFunctionStatus in interface Functions<PulsarWorkerService>
      Parameters:
      tenant - the tenant the function belongs to
      namespace - the namespace the function belongs to
      componentName - the function name
      Returns:
      a list of function statuses
      Throws:
      org.apache.pulsar.client.admin.PulsarAdminException
    • updateFunctionOnWorkerLeader

      public void updateFunctionOnWorkerLeader(String tenant, String namespace, String functionName, InputStream uploadedInputStream, boolean delete, URI uri, org.apache.pulsar.broker.authentication.AuthenticationParameters authParams)
      Specified by:
      updateFunctionOnWorkerLeader in interface Functions<PulsarWorkerService>