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>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.pulsar.functions.worker.rest.api.ComponentImpl
ComponentImpl.GetStatus<X,T> -
Field Summary
Fields inherited from class org.apache.pulsar.functions.worker.rest.api.ComponentImpl
componentType, workerServiceSupplier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.pulsar.common.functions.FunctionDefinition>getBuiltinFunctions(String clientRole, AuthenticationDataSource authenticationData) org.apache.pulsar.common.policies.data.FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusDatagetFunctionInstanceStatus(String tenant, String namespace, String componentName, String instanceId, URI uri, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps) Get status of a function instance.org.apache.pulsar.common.policies.data.FunctionStatusgetFunctionStatus(String tenant, String namespace, String componentName, URI uri, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps) Get statuses of all function instances.voidregisterFunction(String tenant, String namespace, String functionName, InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, String functionPkgUrl, org.apache.pulsar.common.functions.FunctionConfig functionConfig, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps) Register a new function.voidreloadBuiltinFunctions(String clientRole, AuthenticationDataSource authenticationData) voidupdateFunction(String tenant, String namespace, String functionName, InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, String functionPkgUrl, org.apache.pulsar.common.functions.FunctionConfig functionConfig, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps, org.apache.pulsar.common.functions.UpdateOptionsImpl updateOptions) Update a function.voidupdateFunctionOnWorkerLeader(String tenant, String namespace, String functionName, InputStream uploadedInputStream, boolean delete, URI uri, String clientRole, AuthenticationDataSource authenticationData) Methods inherited from class org.apache.pulsar.functions.worker.rest.api.ComponentImpl
allowFunctionOps, changeFunctionInstanceStatus, changeFunctionStatusAllInstances, componentInstanceStatusRequestValidate, componentStatusRequestValidate, createPackagePath, deregisterFunction, downloadFunction, downloadFunction, downloadPackageFile, getBuiltinFunctionClassLoader, getClassLoaderFromPackage, getFunctionInfo, getFunctionsInstanceStats, getFunctionState, getFunctionStats, getListOfConnectors, getPackageFile, getPackageFile, isAuthorizedRole, isSuperUser, listFunctions, putFunctionState, reloadConnectors, restartFunctionInstance, restartFunctionInstances, startFunctionInstance, startFunctionInstances, stopFunctionInstance, stopFunctionInstances, triggerFunction, uploadFunction, validateGetFunctionInstanceRequestParams, validateGetFunctionRequestParams, workerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.functions.worker.service.api.Component
deregisterFunction, deregisterFunction, downloadFunction, downloadFunction, downloadFunction, downloadFunction, downloadFunction, getFunctionInfo, getFunctionsInstanceStats, getFunctionState, getFunctionStats, getListOfConnectors, listFunctions, putFunctionState, reloadConnectors, restartFunctionInstance, restartFunctionInstances, startFunctionInstance, startFunctionInstances, stopFunctionInstance, stopFunctionInstances, triggerFunction, uploadFunction, workerMethods inherited from interface org.apache.pulsar.functions.worker.service.api.Functions
registerFunction, updateFunction
-
Constructor Details
-
FunctionsImpl
-
-
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, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps) Description copied from interface:FunctionsRegister a new function.- Specified by:
registerFunctionin interfaceFunctions<PulsarWorkerService>- Parameters:
tenant- The tenant of a Pulsar Functionnamespace- The namespace of a Pulsar FunctionfunctionName- The name of a Pulsar FunctionuploadedInputStream- Input stream of bytesfileDetail- A form-data content disposition headerfunctionPkgUrl- URL path of the Pulsar Function packagefunctionConfig- Configuration of Pulsar FunctionclientRole- Client role for running the pulsar functionclientAuthenticationDataHttps- Authentication status of the http client
-
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, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps, org.apache.pulsar.common.functions.UpdateOptionsImpl updateOptions) Description copied from interface:FunctionsUpdate a function.- Specified by:
updateFunctionin interfaceFunctions<PulsarWorkerService>- Parameters:
tenant- The tenant of a Pulsar Functionnamespace- The namespace of a Pulsar FunctionfunctionName- The name of a Pulsar FunctionuploadedInputStream- Input stream of bytesfileDetail- A form-data content disposition headerfunctionPkgUrl- URL path of the Pulsar Function packagefunctionConfig- Configuration of Pulsar FunctionclientRole- Client role for running the Pulsar FunctionclientAuthenticationDataHttps- Authentication status of the http clientupdateOptions- 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, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps) Get status of a function instance. If this worker is not running the function instance,- Specified by:
getFunctionInstanceStatusin interfaceFunctions<PulsarWorkerService>- Parameters:
tenant- the tenant the function belongs tonamespace- the namespace the function belongs tocomponentName- the function nameinstanceId- 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, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps) Get statuses of all function instances.- Specified by:
getFunctionStatusin interfaceFunctions<PulsarWorkerService>- Parameters:
tenant- the tenant the function belongs tonamespace- the namespace the function belongs tocomponentName- the function name- Returns:
- a list of function statuses
- Throws:
PulsarAdminException
-
updateFunctionOnWorkerLeader
public void updateFunctionOnWorkerLeader(String tenant, String namespace, String functionName, InputStream uploadedInputStream, boolean delete, URI uri, String clientRole, AuthenticationDataSource authenticationData) - Specified by:
updateFunctionOnWorkerLeaderin interfaceFunctions<PulsarWorkerService>
-
reloadBuiltinFunctions
public void reloadBuiltinFunctions(String clientRole, AuthenticationDataSource authenticationData) throws IOException - Specified by:
reloadBuiltinFunctionsin interfaceFunctions<PulsarWorkerService>- Throws:
IOException
-
getBuiltinFunctions
public List<org.apache.pulsar.common.functions.FunctionDefinition> getBuiltinFunctions(String clientRole, AuthenticationDataSource authenticationData) - Specified by:
getBuiltinFunctionsin interfaceFunctions<PulsarWorkerService>
-