Package org.apache.pulsar.client.admin
Interface Functions
-
public interface FunctionsAdmin interface for function management.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidcreateFunction(FunctionConfig functionConfig, java.lang.String fileName)Create a new function.java.util.concurrent.CompletableFuture<java.lang.Void>createFunctionAsync(FunctionConfig functionConfig, java.lang.String fileName)Create a new function asynchronously.voidcreateFunctionWithUrl(FunctionConfig functionConfig, java.lang.String pkgUrl)Create a new function with package url.java.util.concurrent.CompletableFuture<java.lang.Void>createFunctionWithUrlAsync(FunctionConfig functionConfig, java.lang.String pkgUrl)Create a new function with package url asynchronously.voiddeleteFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Delete an existing function.java.util.concurrent.CompletableFuture<java.lang.Void>deleteFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Delete an existing function asynchronously.voiddownloadFunction(java.lang.String destinationFile, java.lang.String path)Download Function Code.voiddownloadFunction(java.lang.String destinationFile, java.lang.String tenant, java.lang.String namespace, java.lang.String function)Download Function Code.java.util.concurrent.CompletableFuture<java.lang.Void>downloadFunctionAsync(java.lang.String destinationFile, java.lang.String path)Download Function Code.java.util.concurrent.CompletableFuture<java.lang.Void>downloadFunctionAsync(java.lang.String destinationFile, java.lang.String tenant, java.lang.String namespace, java.lang.String function)Download Function Code asynchronously.java.util.List<ConnectorDefinition>getConnectorsList()Deprecated.FunctionConfiggetFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Get the configuration for the specified function.java.util.concurrent.CompletableFuture<FunctionConfig>getFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Get the configuration for the specified function asynchronously.java.util.List<java.lang.String>getFunctions(java.lang.String tenant, java.lang.String namespace)Get the list of functions.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>getFunctionsAsync(java.lang.String tenant, java.lang.String namespace)Get the list of functions asynchronously.FunctionStategetFunctionState(java.lang.String tenant, java.lang.String namespace, java.lang.String function, java.lang.String key)Fetch the current state associated with a Pulsar Function.java.util.concurrent.CompletableFuture<FunctionState>getFunctionStateAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, java.lang.String key)Fetch the current state associated with a Pulsar Function asynchronously.FunctionStatsgetFunctionStats(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Gets the current stats of a function.FunctionInstanceStatsDatagetFunctionStats(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int id)Gets the current stats of a function instance.java.util.concurrent.CompletableFuture<FunctionStats>getFunctionStatsAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Gets the current stats of a function asynchronously.java.util.concurrent.CompletableFuture<FunctionInstanceStatsData>getFunctionStatsAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int id)Gets the current stats of a function instance asynchronously.FunctionStatusgetFunctionStatus(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Gets the current status of a function.FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusDatagetFunctionStatus(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int id)Gets the current status of a function instance.java.util.concurrent.CompletableFuture<FunctionStatus>getFunctionStatusAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Gets the current status of a function asynchronously.java.util.concurrent.CompletableFuture<FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData>getFunctionStatusAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int id)Gets the current status of a function instance asynchronously.java.util.Set<java.lang.String>getSinks()Deprecated.java.util.Set<java.lang.String>getSources()Deprecated.voidputFunctionState(java.lang.String tenant, java.lang.String namespace, java.lang.String function, FunctionState state)Puts the given state associated with a Pulsar Function.java.util.concurrent.CompletableFuture<java.lang.Void>putFunctionStateAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, FunctionState state)Puts the given state associated with a Pulsar Function asynchronously.voidrestartFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Restart all function instances.voidrestartFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId)Restart function instance.java.util.concurrent.CompletableFuture<java.lang.Void>restartFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Restart all function instances asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>restartFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId)Restart function instance asynchronously.voidstartFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Start all function instances.voidstartFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId)Start function instance.java.util.concurrent.CompletableFuture<java.lang.Void>startFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Start all function instances asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>startFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId)Start function instance asynchronously.voidstopFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Stop all function instances.voidstopFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId)Stop function instance.java.util.concurrent.CompletableFuture<java.lang.Void>stopFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Stop all function instances asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>stopFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId)Stop function instance asynchronously.java.lang.StringtriggerFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function, java.lang.String topic, java.lang.String triggerValue, java.lang.String triggerFile)Triggers the function by writing to the input topic.java.util.concurrent.CompletableFuture<java.lang.String>triggerFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, java.lang.String topic, java.lang.String triggerValue, java.lang.String triggerFile)Triggers the function by writing to the input topic asynchronously.voidupdateFunction(FunctionConfig functionConfig, java.lang.String fileName)Update the configuration for a function.voidupdateFunction(FunctionConfig functionConfig, java.lang.String fileName, UpdateOptions updateOptions)Update the configuration for a function.java.util.concurrent.CompletableFuture<java.lang.Void>updateFunctionAsync(FunctionConfig functionConfig, java.lang.String fileName)Update the configuration for a function asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>updateFunctionAsync(FunctionConfig functionConfig, java.lang.String fileName, UpdateOptions updateOptions)Update the configuration for a function asynchronously.voidupdateFunctionWithUrl(FunctionConfig functionConfig, java.lang.String pkgUrl)Update the configuration for a function.voidupdateFunctionWithUrl(FunctionConfig functionConfig, java.lang.String pkgUrl, UpdateOptions updateOptions)Update the configuration for a function.java.util.concurrent.CompletableFuture<java.lang.Void>updateFunctionWithUrlAsync(FunctionConfig functionConfig, java.lang.String pkgUrl)Update the configuration for a function asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>updateFunctionWithUrlAsync(FunctionConfig functionConfig, java.lang.String pkgUrl, UpdateOptions updateOptions)Update the configuration for a function asynchronously.voiduploadFunction(java.lang.String sourceFile, java.lang.String path)Upload Data.java.util.concurrent.CompletableFuture<java.lang.Void>uploadFunctionAsync(java.lang.String sourceFile, java.lang.String path)Upload Data asynchronously.
-
-
-
Method Detail
-
getFunctions
java.util.List<java.lang.String> getFunctions(java.lang.String tenant, java.lang.String namespace) throws PulsarAdminExceptionGet the list of functions. Get the list of all the Pulsar functions. Response Example:["f1", "f2", "f3"]- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException- Unexpected error
-
getFunctionsAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getFunctionsAsync(java.lang.String tenant, java.lang.String namespace)Get the list of functions asynchronously. Get the list of all the Pulsar functions. Response Example:["f1", "f2", "f3"]
-
getFunction
FunctionConfig getFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function) throws PulsarAdminException
Get the configuration for the specified function. Response Example:{ serviceUrl : "http://my-broker.example.com:8080/" }- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name- Returns:
- the function configuration
- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permission to get the configuration of the clusterPulsarAdminException.NotFoundException- Cluster doesn't existPulsarAdminException- Unexpected error
-
getFunctionAsync
java.util.concurrent.CompletableFuture<FunctionConfig> getFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)
Get the configuration for the specified function asynchronously. Response Example:{ serviceUrl : "http://my-broker.example.com:8080/" }- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name- Returns:
- the function configuration
-
createFunction
void createFunction(FunctionConfig functionConfig, java.lang.String fileName) throws PulsarAdminException
Create a new function.- Parameters:
functionConfig- the function configuration object- Throws:
PulsarAdminException- Unexpected error
-
createFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createFunctionAsync(FunctionConfig functionConfig, java.lang.String fileName)
Create a new function asynchronously.- Parameters:
functionConfig- the function configuration object
-
createFunctionWithUrl
void createFunctionWithUrl(FunctionConfig functionConfig, java.lang.String pkgUrl) throws PulsarAdminException
Create a new function with package url. Create a new function by providing url from which fun-pkg can be downloaded. supported url: http/file eg: File: file:/dir/fileName.jar Http: http://www.repo.com/fileName.jar- Parameters:
functionConfig- the function configuration objectpkgUrl- url from which pkg can be downloaded- Throws:
PulsarAdminException
-
createFunctionWithUrlAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createFunctionWithUrlAsync(FunctionConfig functionConfig, java.lang.String pkgUrl)
Create a new function with package url asynchronously. Create a new function by providing url from which fun-pkg can be downloaded. supported url: http/file eg: File: file:/dir/fileName.jar Http: http://www.repo.com/fileName.jar- Parameters:
functionConfig- the function configuration objectpkgUrl- url from which pkg can be downloaded
-
updateFunction
void updateFunction(FunctionConfig functionConfig, java.lang.String fileName) throws PulsarAdminException
Update the configuration for a function.- Parameters:
functionConfig- the function configuration object- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permission to create the clusterPulsarAdminException.NotFoundException- Cluster doesn't existPulsarAdminException- Unexpected error
-
updateFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updateFunctionAsync(FunctionConfig functionConfig, java.lang.String fileName)
Update the configuration for a function asynchronously.- Parameters:
functionConfig- the function configuration object
-
updateFunction
void updateFunction(FunctionConfig functionConfig, java.lang.String fileName, UpdateOptions updateOptions) throws PulsarAdminException
Update the configuration for a function.- Parameters:
functionConfig- the function configuration objectupdateOptions- options for the update operations- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permission to create the clusterPulsarAdminException.NotFoundException- Cluster doesn't existPulsarAdminException- Unexpected error
-
updateFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updateFunctionAsync(FunctionConfig functionConfig, java.lang.String fileName, UpdateOptions updateOptions)
Update the configuration for a function asynchronously.- Parameters:
functionConfig- the function configuration objectupdateOptions- options for the update operations
-
updateFunctionWithUrl
void updateFunctionWithUrl(FunctionConfig functionConfig, java.lang.String pkgUrl) throws PulsarAdminException
Update the configuration for a function. Update a function by providing url from which fun-pkg can be downloaded. supported url: http/file eg: File: file:/dir/fileName.jar Http: http://www.repo.com/fileName.jar- Parameters:
functionConfig- the function configuration objectpkgUrl- url from which pkg can be downloaded- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permission to create the clusterPulsarAdminException.NotFoundException- Cluster doesn't existPulsarAdminException- Unexpected error
-
updateFunctionWithUrlAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updateFunctionWithUrlAsync(FunctionConfig functionConfig, java.lang.String pkgUrl)
Update the configuration for a function asynchronously. Update a function by providing url from which fun-pkg can be downloaded. supported url: http/file eg: File: file:/dir/fileName.jar Http: http://www.repo.com/fileName.jar- Parameters:
functionConfig- the function configuration objectpkgUrl- url from which pkg can be downloaded
-
updateFunctionWithUrl
void updateFunctionWithUrl(FunctionConfig functionConfig, java.lang.String pkgUrl, UpdateOptions updateOptions) throws PulsarAdminException
Update the configuration for a function. Update a function by providing url from which fun-pkg can be downloaded. supported url: http/file eg: File: file:/dir/fileName.jar Http: http://www.repo.com/fileName.jar- Parameters:
functionConfig- the function configuration objectpkgUrl- url from which pkg can be downloadedupdateOptions- options for the update operations- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permission to create the clusterPulsarAdminException.NotFoundException- Cluster doesn't existPulsarAdminException- Unexpected error
-
updateFunctionWithUrlAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updateFunctionWithUrlAsync(FunctionConfig functionConfig, java.lang.String pkgUrl, UpdateOptions updateOptions)
Update the configuration for a function asynchronously. Update a function by providing url from which fun-pkg can be downloaded. supported url: http/file eg: File: file:/dir/fileName.jar Http: http://www.repo.com/fileName.jar- Parameters:
functionConfig- the function configuration objectpkgUrl- url from which pkg can be downloadedupdateOptions- options for the update operations
-
deleteFunction
void deleteFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function) throws PulsarAdminExceptionDelete an existing function. Delete a function- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permissionPulsarAdminException.NotFoundException- Cluster does not existPulsarAdminException.PreconditionFailedException- Cluster is not emptyPulsarAdminException- Unexpected error
-
deleteFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Delete an existing function asynchronously. Delete a function- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name
-
getFunctionStatus
FunctionStatus getFunctionStatus(java.lang.String tenant, java.lang.String namespace, java.lang.String function) throws PulsarAdminException
Gets the current status of a function.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name- Throws:
PulsarAdminException- Unexpected error
-
getFunctionStatusAsync
java.util.concurrent.CompletableFuture<FunctionStatus> getFunctionStatusAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)
Gets the current status of a function asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name
-
getFunctionStatus
FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData getFunctionStatus(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int id) throws PulsarAdminException
Gets the current status of a function instance.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function nameid- Function instance-id- Returns:
- Throws:
PulsarAdminException
-
getFunctionStatusAsync
java.util.concurrent.CompletableFuture<FunctionStatus.FunctionInstanceStatus.FunctionInstanceStatusData> getFunctionStatusAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int id)
Gets the current status of a function instance asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function nameid- Function instance-id- Returns:
-
getFunctionStats
FunctionInstanceStatsData getFunctionStats(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int id) throws PulsarAdminException
Gets the current stats of a function instance.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function nameid- Function instance-id- Returns:
- Throws:
PulsarAdminException
-
getFunctionStatsAsync
java.util.concurrent.CompletableFuture<FunctionInstanceStatsData> getFunctionStatsAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int id)
Gets the current stats of a function instance asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function nameid- Function instance-id- Returns:
-
getFunctionStats
FunctionStats getFunctionStats(java.lang.String tenant, java.lang.String namespace, java.lang.String function) throws PulsarAdminException
Gets the current stats of a function.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name- Returns:
- Throws:
PulsarAdminException
-
getFunctionStatsAsync
java.util.concurrent.CompletableFuture<FunctionStats> getFunctionStatsAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)
Gets the current stats of a function asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name- Returns:
-
restartFunction
void restartFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId) throws PulsarAdminExceptionRestart function instance.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function nameinstanceId- Function instanceId- Throws:
PulsarAdminException- Unexpected error
-
restartFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> restartFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId)Restart function instance asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function nameinstanceId- Function instanceId
-
restartFunction
void restartFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function) throws PulsarAdminExceptionRestart all function instances.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name- Throws:
PulsarAdminException- Unexpected error
-
restartFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> restartFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Restart all function instances asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name
-
stopFunction
void stopFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId) throws PulsarAdminExceptionStop function instance.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function nameinstanceId- Function instanceId- Throws:
PulsarAdminException- Unexpected error
-
stopFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> stopFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId)Stop function instance asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function nameinstanceId- Function instanceId
-
startFunction
void startFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function) throws PulsarAdminExceptionStart all function instances.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name- Throws:
PulsarAdminException- Unexpected error
-
startFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> startFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Start all function instances asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name
-
startFunction
void startFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId) throws PulsarAdminExceptionStart function instance.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function nameinstanceId- Function instanceId- Throws:
PulsarAdminException- Unexpected error
-
startFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> startFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, int instanceId)Start function instance asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function nameinstanceId- Function instanceId
-
stopFunction
void stopFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function) throws PulsarAdminExceptionStop all function instances.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name- Throws:
PulsarAdminException- Unexpected error
-
stopFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> stopFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function)Stop all function instances asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function name
-
triggerFunction
java.lang.String triggerFunction(java.lang.String tenant, java.lang.String namespace, java.lang.String function, java.lang.String topic, java.lang.String triggerValue, java.lang.String triggerFile) throws PulsarAdminExceptionTriggers the function by writing to the input topic.- Parameters:
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 topic- Throws:
PulsarAdminException- Unexpected error
-
triggerFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.String> triggerFunctionAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, java.lang.String topic, java.lang.String triggerValue, java.lang.String triggerFile)Triggers the function by writing to the input topic asynchronously.- Parameters:
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 topic
-
uploadFunction
void uploadFunction(java.lang.String sourceFile, java.lang.String path) throws PulsarAdminExceptionUpload Data.- Parameters:
sourceFile- dataFile that needs to be uploadedpath- Path where data should be stored- Throws:
PulsarAdminException- Unexpected error
-
uploadFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> uploadFunctionAsync(java.lang.String sourceFile, java.lang.String path)Upload Data asynchronously.- Parameters:
sourceFile- dataFile that needs to be uploadedpath- Path where data should be stored
-
downloadFunction
void downloadFunction(java.lang.String destinationFile, java.lang.String path) throws PulsarAdminExceptionDownload Function Code.- Parameters:
destinationFile- file where data should be downloaded topath- Path where data is located- Throws:
PulsarAdminException- Unexpected error
-
downloadFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> downloadFunctionAsync(java.lang.String destinationFile, java.lang.String path)Download Function Code.- Parameters:
destinationFile- file where data should be downloaded topath- Path where data is located
-
downloadFunction
void downloadFunction(java.lang.String destinationFile, java.lang.String tenant, java.lang.String namespace, java.lang.String function) throws PulsarAdminExceptionDownload Function Code.- Parameters:
destinationFile- file where data should be downloaded totenant- Tenant namenamespace- Namespace namefunction- Function name- Throws:
PulsarAdminException
-
downloadFunctionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> downloadFunctionAsync(java.lang.String destinationFile, java.lang.String tenant, java.lang.String namespace, java.lang.String function)Download Function Code asynchronously.- Parameters:
destinationFile- file where data should be downloaded totenant- Tenant namenamespace- Namespace namefunction- Function name
-
getConnectorsList
@Deprecated java.util.List<ConnectorDefinition> getConnectorsList() throws PulsarAdminException
Deprecated.Deprecated in favor of getting sources and sinks for their own APIs. Fetches a list of supported Pulsar IO connectors currently running in cluster mode- Throws:
PulsarAdminException- Unexpected error
-
getSources
@Deprecated java.util.Set<java.lang.String> getSources() throws PulsarAdminExceptionDeprecated.Deprecated in favor of getting sources and sinks for their own APIs. Fetches a list of supported Pulsar IO sources currently running in cluster mode- Throws:
PulsarAdminException- Unexpected error
-
getSinks
@Deprecated java.util.Set<java.lang.String> getSinks() throws PulsarAdminExceptionDeprecated.Deprecated in favor of getting sources and sinks for their own APIs. Fetches a list of supported Pulsar IO sinks currently running in cluster mode- Throws:
PulsarAdminException- Unexpected error
-
getFunctionState
FunctionState getFunctionState(java.lang.String tenant, java.lang.String namespace, java.lang.String function, java.lang.String key) throws PulsarAdminException
Fetch the current state associated with a Pulsar Function. Response Example:{ "value : 12, version : 2"}- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function namekey- Key name of State- Returns:
- the function configuration
- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permission to get the configuration of the clusterPulsarAdminException.NotFoundException- Cluster doesn't existPulsarAdminException- Unexpected error
-
getFunctionStateAsync
java.util.concurrent.CompletableFuture<FunctionState> getFunctionStateAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, java.lang.String key)
Fetch the current state associated with a Pulsar Function asynchronously. Response Example:{ "value : 12, version : 2"}- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function namekey- Key name of State- Returns:
- the function configuration
-
putFunctionState
void putFunctionState(java.lang.String tenant, java.lang.String namespace, java.lang.String function, FunctionState state) throws PulsarAdminExceptionPuts the given state associated with a Pulsar Function. Response Example:{ "value : 12, version : 2"}- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function namestate- FunctionState- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permission to get the configuration of the clusterPulsarAdminException.NotFoundException- Cluster doesn't existPulsarAdminException- Unexpected error
-
putFunctionStateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> putFunctionStateAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String function, FunctionState state)Puts the given state associated with a Pulsar Function asynchronously. Response Example:{ "value : 12, version : 2"}- Parameters:
tenant- Tenant namenamespace- Namespace namefunction- Function namestate- FunctionState
-
-