public interface Functions
| Modifier and Type | Method and Description |
|---|---|
void |
createFunction(FunctionConfig functionConfig,
String fileName)
Create a new function.
|
CompletableFuture<Void> |
createFunctionAsync(FunctionConfig functionConfig,
String fileName)
Create a new function asynchronously.
|
void |
createFunctionWithUrl(FunctionConfig functionConfig,
String pkgUrl)
Create a new function with package url.
|
CompletableFuture<Void> |
createFunctionWithUrlAsync(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<ConnectorDefinition> |
getConnectorsList()
Deprecated.
|
FunctionConfig |
getFunction(String tenant,
String namespace,
String function)
Get the configuration for the specified function.
|
CompletableFuture<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.
|
FunctionState |
getFunctionState(String tenant,
String namespace,
String function,
String key)
Fetch the current state associated with a Pulsar Function.
|
CompletableFuture<FunctionState> |
getFunctionStateAsync(String tenant,
String namespace,
String function,
String key)
Fetch the current state associated with a Pulsar Function asynchronously.
|
FunctionStats |
getFunctionStats(String tenant,
String namespace,
String function)
Gets the current stats of a function.
|
FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData |
getFunctionStats(String tenant,
String namespace,
String function,
int id)
Gets the current stats of a function instance.
|
CompletableFuture<FunctionStats> |
getFunctionStatsAsync(String tenant,
String namespace,
String function)
Gets the current stats of a function asynchronously.
|
CompletableFuture<FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData> |
getFunctionStatsAsync(String tenant,
String namespace,
String function,
int id)
Gets the current stats of a function instance asynchronously.
|
FunctionStatus |
getFunctionStatus(String tenant,
String namespace,
String function)
Gets the current status of a function.
|
FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData |
getFunctionStatus(String tenant,
String namespace,
String function,
int id)
Gets the current status of a function instance.
|
CompletableFuture<FunctionStatus> |
getFunctionStatusAsync(String tenant,
String namespace,
String function)
Gets the current status of a function asynchronously.
|
CompletableFuture<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,
FunctionState state)
Puts the given state associated with a Pulsar Function.
|
CompletableFuture<Void> |
putFunctionStateAsync(String tenant,
String namespace,
String function,
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(FunctionConfig functionConfig,
String fileName)
Update the configuration for a function.
|
void |
updateFunction(FunctionConfig functionConfig,
String fileName,
UpdateOptions updateOptions)
Update the configuration for a function.
|
CompletableFuture<Void> |
updateFunctionAsync(FunctionConfig functionConfig,
String fileName)
Update the configuration for a function asynchronously.
|
CompletableFuture<Void> |
updateFunctionAsync(FunctionConfig functionConfig,
String fileName,
UpdateOptions updateOptions)
Update the configuration for a function asynchronously.
|
void |
updateFunctionWithUrl(FunctionConfig functionConfig,
String pkgUrl)
Update the configuration for a function.
|
void |
updateFunctionWithUrl(FunctionConfig functionConfig,
String pkgUrl,
UpdateOptions updateOptions)
Update the configuration for a function.
|
CompletableFuture<Void> |
updateFunctionWithUrlAsync(FunctionConfig functionConfig,
String pkgUrl)
Update the configuration for a function asynchronously.
|
CompletableFuture<Void> |
updateFunctionWithUrlAsync(FunctionConfig functionConfig,
String pkgUrl,
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"]
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<FunctionConfig> getFunctionAsync(String tenant, String namespace, String function)
{ serviceUrl : "http://my-broker.example.com:8080/" }
tenant - Tenant namenamespace - Namespace namefunction - Function namevoid createFunction(FunctionConfig functionConfig, String fileName) throws PulsarAdminException
functionConfig - the function configuration objectPulsarAdminException - Unexpected errorCompletableFuture<Void> createFunctionAsync(FunctionConfig functionConfig, String fileName)
functionConfig - the function configuration objectvoid createFunctionWithUrl(FunctionConfig functionConfig, String pkgUrl) throws PulsarAdminException
functionConfig - the function configuration objectpkgUrl - url from which pkg can be downloadedPulsarAdminExceptionCompletableFuture<Void> createFunctionWithUrlAsync(FunctionConfig functionConfig, String pkgUrl)
functionConfig - the function configuration objectpkgUrl - url from which pkg can be downloadedvoid updateFunction(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(FunctionConfig functionConfig, String fileName)
functionConfig - the function configuration objectvoid updateFunction(FunctionConfig functionConfig, String fileName, 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(FunctionConfig functionConfig, String fileName, UpdateOptions updateOptions)
functionConfig - the function configuration objectupdateOptions - options for the update operationsvoid updateFunctionWithUrl(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(FunctionConfig functionConfig, String pkgUrl)
functionConfig - the function configuration objectpkgUrl - url from which pkg can be downloadedvoid updateFunctionWithUrl(FunctionConfig functionConfig, String pkgUrl, 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(FunctionConfig functionConfig, String pkgUrl, 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 nameFunctionStatus getFunctionStatus(String tenant, String namespace, String function) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminException - Unexpected errorCompletableFuture<FunctionStatus> getFunctionStatusAsync(String tenant, String namespace, String function)
tenant - Tenant namenamespace - Namespace namefunction - Function nameFunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData getFunctionStatus(String tenant, String namespace, String function, int id) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function nameid - Function instance-idPulsarAdminExceptionCompletableFuture<FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData> getFunctionStatusAsync(String tenant, String namespace, String function, int id)
tenant - Tenant namenamespace - Namespace namefunction - Function nameid - Function instance-idFunctionStats.FunctionInstanceStats.FunctionInstanceStatsData getFunctionStats(String tenant, String namespace, String function, int id) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function nameid - Function instance-idPulsarAdminExceptionCompletableFuture<FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData> getFunctionStatsAsync(String tenant, String namespace, String function, int id)
tenant - Tenant namenamespace - Namespace namefunction - Function nameid - Function instance-idFunctionStats getFunctionStats(String tenant, String namespace, String function) throws PulsarAdminException
tenant - Tenant namenamespace - Namespace namefunction - Function namePulsarAdminExceptionCompletableFuture<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<ConnectorDefinition> getConnectorsList() throws PulsarAdminException
PulsarAdminException - Unexpected error@Deprecated Set<String> getSources() throws PulsarAdminException
PulsarAdminException - Unexpected error@Deprecated Set<String> getSinks() throws PulsarAdminException
PulsarAdminException - Unexpected errorFunctionState 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<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, 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, FunctionState state)
{ "value : 12, version : 2"}
tenant - Tenant namenamespace - Namespace namefunction - Function namestate - FunctionStateCopyright © 2017–2021 Apache Software Foundation. All rights reserved.