public interface Functions
| Modifier and Type | Method and Description |
|---|---|
void |
createFunction(org.apache.pulsar.functions.shaded.proto.Function.FunctionDetails functionDetails,
String fileName)
Create a new function.
|
void |
deleteFunction(String tenant,
String namespace,
String function)
Delete an existing function
|
void |
downloadFunction(String destinationFile,
String path)
Download Function Code.
|
org.apache.pulsar.functions.shaded.proto.Function.FunctionDetails |
getFunction(String tenant,
String namespace,
String function)
Get the configuration for the specified function.
|
List<String> |
getFunctions(String tenant,
String namespace)
Get the list of functions.
|
org.apache.pulsar.functions.shaded.proto.InstanceCommunication.FunctionStatusList |
getFunctionStatus(String tenant,
String namespace,
String function)
Gets the current status of a function.
|
String |
triggerFunction(String tenant,
String namespace,
String function,
String topic,
String triggerValue,
String triggerFile)
Triggers the function by writing to the input topic.
|
void |
updateFunction(org.apache.pulsar.functions.shaded.proto.Function.FunctionDetails functionDetails,
String fileName)
Update the configuration for a function.
|
void |
uploadFunction(String sourceFile,
String path)
Upload Data.
|
List<String> getFunctions(String tenant, String namespace) throws PulsarAdminException
Get the list of all the Pulsar functions.
Response Example:
["f1", "f2", "f3"]
PulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException - Unexpected errororg.apache.pulsar.functions.shaded.proto.Function.FunctionDetails getFunction(String tenant, String namespace, String function) throws PulsarAdminException
Response Example:
{ serviceUrl : "http://my-broker.example.com:8080/" }
tenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminException.NotAuthorizedException - You don't have admin permission to get the configuration of the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorvoid createFunction(org.apache.pulsar.functions.shaded.proto.Function.FunctionDetails functionDetails,
String fileName)
throws PulsarAdminException
functionDetails - the function configuration objectPulsarAdminException - Unexpected errorvoid updateFunction(org.apache.pulsar.functions.shaded.proto.Function.FunctionDetails functionDetails,
String fileName)
throws PulsarAdminException
functionDetails - the function configuration objectPulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorvoid deleteFunction(String tenant, String namespace, String function) throws PulsarAdminException
Delete a function
tenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminException.NotAuthorizedException - You don't have admin permissionPulsarAdminException.NotFoundException - Cluster does not existPulsarAdminException.PreconditionFailedException - Cluster is not emptyPulsarAdminException - Unexpected errororg.apache.pulsar.functions.shaded.proto.InstanceCommunication.FunctionStatusList getFunctionStatus(String tenant, String namespace, String function) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminException - Unexpected errorString triggerFunction(String tenant, String namespace, String function, String topic, String triggerValue, String triggerFile) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function nametriggerValue - The input that will be written to input topictriggerFile - The file which contains the input that will be written to input topicPulsarAdminException - Unexpected errorvoid uploadFunction(String sourceFile, String path) throws PulsarAdminException
sourceFile - dataFile that needs to be uploadedpath - Path where data should be storedPulsarAdminException - Unexpected errorvoid downloadFunction(String destinationFile, String path) throws PulsarAdminException
destinationFile - file where data should be downloaded topath - Path where data is locatedPulsarAdminException - Unexpected errorCopyright © 2017–2018 Apache Software Foundation. All rights reserved.