public interface Functions
| Modifier and Type | Method and Description |
|---|---|
void |
createFunction(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String fileName)
Create a new function.
|
CompletableFuture<Void> |
createFunctionAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String fileName)
Create a new function asynchronously.
|
void |
createFunctionWithUrl(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String pkgUrl)
Create a new function with package url.
|
CompletableFuture<Void> |
createFunctionWithUrlAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String pkgUrl)
Create a new function with package url asynchronously.
|
void |
deleteFunction(String tenant,
String namespace,
String function)
Delete an existing function.
|
CompletableFuture<Void> |
deleteFunctionAsync(String tenant,
String namespace,
String function)
Delete an existing function asynchronously.
|
void |
downloadFunction(String destinationFile,
String path)
Download Function Code.
|
void |
downloadFunction(String destinationFile,
String tenant,
String namespace,
String function)
Download Function Code.
|
CompletableFuture<Void> |
downloadFunctionAsync(String destinationFile,
String path)
Download Function Code.
|
CompletableFuture<Void> |
downloadFunctionAsync(String destinationFile,
String tenant,
String namespace,
String function)
Download Function Code asynchronously.
|
List<org.apache.pulsar.common.io.ConnectorDefinition> |
getConnectorsList()
Deprecated.
|
org.apache.pulsar.common.functions.FunctionConfig |
getFunction(String tenant,
String namespace,
String function)
Get the configuration for the specified function.
|
CompletableFuture<org.apache.pulsar.common.functions.FunctionConfig> |
getFunctionAsync(String tenant,
String namespace,
String function)
Get the configuration for the specified function asynchronously.
|
List<String> |
getFunctions(String tenant,
String namespace)
Get the list of functions.
|
CompletableFuture<List<String>> |
getFunctionsAsync(String tenant,
String namespace)
Get the list of functions asynchronously.
|
org.apache.pulsar.common.functions.FunctionState |
getFunctionState(String tenant,
String namespace,
String function,
String key)
Fetch the current state associated with a Pulsar Function.
|
CompletableFuture<org.apache.pulsar.common.functions.FunctionState> |
getFunctionStateAsync(String tenant,
String namespace,
String function,
String key)
Fetch the current state associated with a Pulsar Function asynchronously.
|
org.apache.pulsar.common.policies.data.FunctionStats |
getFunctionStats(String tenant,
String namespace,
String function)
Gets the current stats of a function.
|
org.apache.pulsar.common.policies.data.FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData |
getFunctionStats(String tenant,
String namespace,
String function,
int id)
Gets the current stats of a function instance.
|
CompletableFuture<org.apache.pulsar.common.policies.data.FunctionStats> |
getFunctionStatsAsync(String tenant,
String namespace,
String function)
Gets the current stats of a function asynchronously.
|
CompletableFuture<org.apache.pulsar.common.policies.data.FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData> |
getFunctionStatsAsync(String tenant,
String namespace,
String function,
int id)
Gets the current stats of a function instance asynchronously.
|
org.apache.pulsar.common.policies.data.FunctionStatus |
getFunctionStatus(String tenant,
String namespace,
String function)
Gets the current status of a function.
|
org.apache.pulsar.common.policies.data.FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData |
getFunctionStatus(String tenant,
String namespace,
String function,
int id)
Gets the current status of a function instance.
|
CompletableFuture<org.apache.pulsar.common.policies.data.FunctionStatus> |
getFunctionStatusAsync(String tenant,
String namespace,
String function)
Gets the current status of a function asynchronously.
|
CompletableFuture<org.apache.pulsar.common.policies.data.FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData> |
getFunctionStatusAsync(String tenant,
String namespace,
String function,
int id)
Gets the current status of a function instance asynchronously.
|
Set<String> |
getSinks()
Deprecated.
|
Set<String> |
getSources()
Deprecated.
|
void |
putFunctionState(String tenant,
String namespace,
String function,
org.apache.pulsar.common.functions.FunctionState state)
Puts the given state associated with a Pulsar Function.
|
CompletableFuture<Void> |
putFunctionStateAsync(String tenant,
String namespace,
String function,
org.apache.pulsar.common.functions.FunctionState state)
Puts the given state associated with a Pulsar Function asynchronously.
|
void |
restartFunction(String tenant,
String namespace,
String function)
Restart all function instances.
|
void |
restartFunction(String tenant,
String namespace,
String function,
int instanceId)
Restart function instance.
|
CompletableFuture<Void> |
restartFunctionAsync(String tenant,
String namespace,
String function)
Restart all function instances asynchronously.
|
CompletableFuture<Void> |
restartFunctionAsync(String tenant,
String namespace,
String function,
int instanceId)
Restart function instance asynchronously.
|
void |
startFunction(String tenant,
String namespace,
String function)
Start all function instances.
|
void |
startFunction(String tenant,
String namespace,
String function,
int instanceId)
Start function instance.
|
CompletableFuture<Void> |
startFunctionAsync(String tenant,
String namespace,
String function)
Start all function instances asynchronously.
|
CompletableFuture<Void> |
startFunctionAsync(String tenant,
String namespace,
String function,
int instanceId)
Start function instance asynchronously.
|
void |
stopFunction(String tenant,
String namespace,
String function)
Stop all function instances.
|
void |
stopFunction(String tenant,
String namespace,
String function,
int instanceId)
Stop function instance.
|
CompletableFuture<Void> |
stopFunctionAsync(String tenant,
String namespace,
String function)
Stop all function instances asynchronously.
|
CompletableFuture<Void> |
stopFunctionAsync(String tenant,
String namespace,
String function,
int instanceId)
Stop function instance asynchronously.
|
String |
triggerFunction(String tenant,
String namespace,
String function,
String topic,
String triggerValue,
String triggerFile)
Triggers the function by writing to the input topic.
|
CompletableFuture<String> |
triggerFunctionAsync(String tenant,
String namespace,
String function,
String topic,
String triggerValue,
String triggerFile)
Triggers the function by writing to the input topic asynchronously.
|
void |
updateFunction(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String fileName)
Update the configuration for a function.
|
void |
updateFunction(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String fileName,
org.apache.pulsar.common.functions.UpdateOptions updateOptions)
Update the configuration for a function.
|
CompletableFuture<Void> |
updateFunctionAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String fileName)
Update the configuration for a function asynchronously.
|
CompletableFuture<Void> |
updateFunctionAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String fileName,
org.apache.pulsar.common.functions.UpdateOptions updateOptions)
Update the configuration for a function asynchronously.
|
void |
updateFunctionWithUrl(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String pkgUrl)
Update the configuration for a function.
|
void |
updateFunctionWithUrl(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String pkgUrl,
org.apache.pulsar.common.functions.UpdateOptions updateOptions)
Update the configuration for a function.
|
CompletableFuture<Void> |
updateFunctionWithUrlAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String pkgUrl)
Update the configuration for a function asynchronously.
|
CompletableFuture<Void> |
updateFunctionWithUrlAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String pkgUrl,
org.apache.pulsar.common.functions.UpdateOptions updateOptions)
Update the configuration for a function asynchronously.
|
void |
uploadFunction(String sourceFile,
String path)
Upload Data.
|
CompletableFuture<Void> |
uploadFunctionAsync(String sourceFile,
String path)
Upload Data asynchronously.
|
List<String> getFunctions(String tenant, String namespace) throws PulsarAdminException
["f1", "f2", "f3"]
PulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException - Unexpected errorCompletableFuture<List<String>> getFunctionsAsync(String tenant, String namespace)
["f1", "f2", "f3"]
org.apache.pulsar.common.functions.FunctionConfig getFunction(String tenant, String namespace, String function) throws PulsarAdminException
{ 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 errorCompletableFuture<org.apache.pulsar.common.functions.FunctionConfig> getFunctionAsync(String tenant, String namespace, String function)
{ serviceUrl : "http://my-broker.example.com:8080/" }
tenant - Tenant namenamespace - Namespace namefunction - Function namevoid createFunction(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String fileName)
throws PulsarAdminException
functionConfig - the function configuration objectPulsarAdminException - Unexpected errorCompletableFuture<Void> createFunctionAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig, String fileName)
functionConfig - the function configuration objectvoid createFunctionWithUrl(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String pkgUrl)
throws PulsarAdminException
functionConfig - the function configuration objectpkgUrl - url from which pkg can be downloadedPulsarAdminExceptionCompletableFuture<Void> createFunctionWithUrlAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig, String pkgUrl)
functionConfig - the function configuration objectpkgUrl - url from which pkg can be downloadedvoid updateFunction(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String fileName)
throws PulsarAdminException
functionConfig - the function configuration objectPulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorCompletableFuture<Void> updateFunctionAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig, String fileName)
functionConfig - the function configuration objectvoid updateFunction(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String fileName,
org.apache.pulsar.common.functions.UpdateOptions updateOptions)
throws PulsarAdminException
functionConfig - the function configuration objectupdateOptions - options for the update operationsPulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorCompletableFuture<Void> updateFunctionAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig, String fileName, org.apache.pulsar.common.functions.UpdateOptions updateOptions)
functionConfig - the function configuration objectupdateOptions - options for the update operationsvoid updateFunctionWithUrl(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String pkgUrl)
throws PulsarAdminException
functionConfig - the function configuration objectpkgUrl - url from which pkg can be downloadedPulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorCompletableFuture<Void> updateFunctionWithUrlAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig, String pkgUrl)
functionConfig - the function configuration objectpkgUrl - url from which pkg can be downloadedvoid updateFunctionWithUrl(org.apache.pulsar.common.functions.FunctionConfig functionConfig,
String pkgUrl,
org.apache.pulsar.common.functions.UpdateOptions updateOptions)
throws PulsarAdminException
functionConfig - the function configuration objectpkgUrl - url from which pkg can be downloadedupdateOptions - options for the update operationsPulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorCompletableFuture<Void> updateFunctionWithUrlAsync(org.apache.pulsar.common.functions.FunctionConfig functionConfig, String pkgUrl, org.apache.pulsar.common.functions.UpdateOptions updateOptions)
functionConfig - the function configuration objectpkgUrl - url from which pkg can be downloadedupdateOptions - options for the update operationsvoid deleteFunction(String tenant, String namespace, String function) throws PulsarAdminException
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 errorCompletableFuture<Void> deleteFunctionAsync(String tenant, String namespace, String function)
tenant - Tenant namenamespace - Namespace namefunction - Function nameorg.apache.pulsar.common.policies.data.FunctionStatus getFunctionStatus(String tenant, String namespace, String function) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminException - Unexpected errorCompletableFuture<org.apache.pulsar.common.policies.data.FunctionStatus> getFunctionStatusAsync(String tenant, String namespace, String function)
tenant - Tenant namenamespace - Namespace namefunction - Function nameorg.apache.pulsar.common.policies.data.FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData getFunctionStatus(String tenant, String namespace, String function, int id) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function nameid - Function instance-idPulsarAdminExceptionCompletableFuture<org.apache.pulsar.common.policies.data.FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData> getFunctionStatusAsync(String tenant, String namespace, String function, int id)
tenant - Tenant namenamespace - Namespace namefunction - Function nameid - Function instance-idorg.apache.pulsar.common.policies.data.FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData getFunctionStats(String tenant, String namespace, String function, int id) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function nameid - Function instance-idPulsarAdminExceptionCompletableFuture<org.apache.pulsar.common.policies.data.FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData> getFunctionStatsAsync(String tenant, String namespace, String function, int id)
tenant - Tenant namenamespace - Namespace namefunction - Function nameid - Function instance-idorg.apache.pulsar.common.policies.data.FunctionStats getFunctionStats(String tenant, String namespace, String function) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminExceptionCompletableFuture<org.apache.pulsar.common.policies.data.FunctionStats> getFunctionStatsAsync(String tenant, String namespace, String function)
tenant - Tenant namenamespace - Namespace namefunction - Function namevoid restartFunction(String tenant, String namespace, String function, int instanceId) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function nameinstanceId - Function instanceIdPulsarAdminException - Unexpected errorCompletableFuture<Void> restartFunctionAsync(String tenant, String namespace, String function, int instanceId)
tenant - Tenant namenamespace - Namespace namefunction - Function nameinstanceId - Function instanceIdvoid restartFunction(String tenant, String namespace, String function) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminException - Unexpected errorCompletableFuture<Void> restartFunctionAsync(String tenant, String namespace, String function)
tenant - Tenant namenamespace - Namespace namefunction - Function namevoid stopFunction(String tenant, String namespace, String function, int instanceId) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function nameinstanceId - Function instanceIdPulsarAdminException - Unexpected errorCompletableFuture<Void> stopFunctionAsync(String tenant, String namespace, String function, int instanceId)
tenant - Tenant namenamespace - Namespace namefunction - Function nameinstanceId - Function instanceIdvoid startFunction(String tenant, String namespace, String function) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminException - Unexpected errorCompletableFuture<Void> startFunctionAsync(String tenant, String namespace, String function)
tenant - Tenant namenamespace - Namespace namefunction - Function namevoid startFunction(String tenant, String namespace, String function, int instanceId) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function nameinstanceId - Function instanceIdPulsarAdminException - Unexpected errorCompletableFuture<Void> startFunctionAsync(String tenant, String namespace, String function, int instanceId)
tenant - Tenant namenamespace - Namespace namefunction - Function nameinstanceId - Function instanceIdvoid stopFunction(String tenant, String namespace, String function) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminException - Unexpected errorCompletableFuture<Void> stopFunctionAsync(String tenant, String namespace, String function)
tenant - Tenant namenamespace - Namespace namefunction - Function nameString 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 errorCompletableFuture<String> triggerFunctionAsync(String tenant, String namespace, String function, String topic, String triggerValue, String triggerFile)
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 topicvoid uploadFunction(String sourceFile, String path) throws PulsarAdminException
sourceFile - dataFile that needs to be uploadedpath - Path where data should be storedPulsarAdminException - Unexpected errorCompletableFuture<Void> uploadFunctionAsync(String sourceFile, String path)
sourceFile - dataFile that needs to be uploadedpath - Path where data should be storedvoid downloadFunction(String destinationFile, String path) throws PulsarAdminException
destinationFile - file where data should be downloaded topath - Path where data is locatedPulsarAdminException - Unexpected errorCompletableFuture<Void> downloadFunctionAsync(String destinationFile, String path)
destinationFile - file where data should be downloaded topath - Path where data is locatedvoid downloadFunction(String destinationFile, String tenant, String namespace, String function) throws PulsarAdminException
destinationFile - file where data should be downloaded totenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminExceptionCompletableFuture<Void> downloadFunctionAsync(String destinationFile, String tenant, String namespace, String function)
destinationFile - file where data should be downloaded totenant - Tenant namenamespace - Namespace namefunction - Function name@Deprecated List<org.apache.pulsar.common.io.ConnectorDefinition> getConnectorsList() throws PulsarAdminException
PulsarAdminException - Unexpected error@Deprecated Set<String> getSources() throws PulsarAdminException
PulsarAdminException - Unexpected error@Deprecated Set<String> getSinks() throws PulsarAdminException
PulsarAdminException - Unexpected errororg.apache.pulsar.common.functions.FunctionState getFunctionState(String tenant, String namespace, String function, String key) throws PulsarAdminException
{ "value : 12, version : 2"}
tenant - Tenant namenamespace - Namespace namefunction - Function namekey - Key name of StatePulsarAdminException.NotAuthorizedException - You don't have admin permission to get the configuration of the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorCompletableFuture<org.apache.pulsar.common.functions.FunctionState> getFunctionStateAsync(String tenant, String namespace, String function, String key)
{ "value : 12, version : 2"}
tenant - Tenant namenamespace - Namespace namefunction - Function namekey - Key name of Statevoid putFunctionState(String tenant, String namespace, String function, org.apache.pulsar.common.functions.FunctionState state) throws PulsarAdminException
{ "value : 12, version : 2"}
tenant - Tenant namenamespace - Namespace namefunction - Function namestate - FunctionStatePulsarAdminException.NotAuthorizedException - You don't have admin permission to get the configuration of the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorCompletableFuture<Void> putFunctionStateAsync(String tenant, String namespace, String function, org.apache.pulsar.common.functions.FunctionState state)
{ "value : 12, version : 2"}
tenant - Tenant namenamespace - Namespace namefunction - Function namestate - FunctionStateCopyright © 2017–2021 Apache Software Foundation. All rights reserved.