Package org.apache.pulsar.client.admin
Interface Sources
-
- All Known Subinterfaces:
Source
public interface SourcesAdmin interface for Source management.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateSource(SourceConfig sourceConfig, java.lang.String fileName)Create a new source.java.util.concurrent.CompletableFuture<java.lang.Void>createSourceAsync(SourceConfig sourceConfig, java.lang.String fileName)Create a new source asynchronously.voidcreateSourceWithUrl(SourceConfig sourceConfig, java.lang.String pkgUrl)Create a new source with package url.java.util.concurrent.CompletableFuture<java.lang.Void>createSourceWithUrlAsync(SourceConfig sourceConfig, java.lang.String pkgUrl)Create a new source with package url asynchronously.voiddeleteSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Delete an existing source.java.util.concurrent.CompletableFuture<java.lang.Void>deleteSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Delete an existing source asynchronously.java.util.List<ConnectorDefinition>getBuiltInSources()Fetches a list of supported Pulsar IO sources currently running in cluster mode.java.util.concurrent.CompletableFuture<java.util.List<ConnectorDefinition>>getBuiltInSourcesAsync()Fetches a list of supported Pulsar IO sources currently running in cluster mode asynchronously.SourceConfiggetSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Get the configuration for the specified source.java.util.concurrent.CompletableFuture<SourceConfig>getSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Get the configuration for the specified source asynchronously.SourceStatusgetSourceStatus(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Gets the current status of a source.SourceStatus.SourceInstanceStatus.SourceInstanceStatusDatagetSourceStatus(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int id)Gets the current status of a source instance.java.util.concurrent.CompletableFuture<SourceStatus>getSourceStatusAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Gets the current status of a source asynchronously.java.util.concurrent.CompletableFuture<SourceStatus.SourceInstanceStatus.SourceInstanceStatusData>getSourceStatusAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int id)Gets the current status of a source instance asynchronously.java.util.List<java.lang.String>listSources(java.lang.String tenant, java.lang.String namespace)Get the list of sources.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>listSourcesAsync(java.lang.String tenant, java.lang.String namespace)Get the list of sources asynchronously.voidreloadBuiltInSources()Reload the available built-in connectors, include Source and Source.java.util.concurrent.CompletableFuture<java.lang.Void>reloadBuiltInSourcesAsync()Reload the available built-in connectors, include Source and Source asynchronously.voidrestartSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Restart all source instances.voidrestartSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId)Restart source instance.java.util.concurrent.CompletableFuture<java.lang.Void>restartSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Restart all source instances asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>restartSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId)Restart source instance asynchronously.voidstartSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Start all source instances.voidstartSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId)Start source instance.java.util.concurrent.CompletableFuture<java.lang.Void>startSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Start all source instances asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>startSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId)Start source instance asynchronously.voidstopSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Stop all source instances.voidstopSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId)Stop source instance.java.util.concurrent.CompletableFuture<java.lang.Void>stopSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Stop all source instances asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>stopSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId)Stop source instance asynchronously.voidupdateSource(SourceConfig sourceConfig, java.lang.String fileName)Update the configuration for a source.voidupdateSource(SourceConfig sourceConfig, java.lang.String fileName, UpdateOptions updateOptions)Update the configuration for a source.java.util.concurrent.CompletableFuture<java.lang.Void>updateSourceAsync(SourceConfig sourceConfig, java.lang.String fileName)Update the configuration for a source asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>updateSourceAsync(SourceConfig sourceConfig, java.lang.String fileName, UpdateOptions updateOptions)Update the configuration for a source asynchronously.voidupdateSourceWithUrl(SourceConfig sourceConfig, java.lang.String pkgUrl)Update the configuration for a source.voidupdateSourceWithUrl(SourceConfig sourceConfig, java.lang.String pkgUrl, UpdateOptions updateOptions)Update the configuration for a source.java.util.concurrent.CompletableFuture<java.lang.Void>updateSourceWithUrlAsync(SourceConfig sourceConfig, java.lang.String pkgUrl)Update the configuration for a source asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>updateSourceWithUrlAsync(SourceConfig sourceConfig, java.lang.String pkgUrl, UpdateOptions updateOptions)Update the configuration for a source asynchronously.
-
-
-
Method Detail
-
listSources
java.util.List<java.lang.String> listSources(java.lang.String tenant, java.lang.String namespace) throws PulsarAdminExceptionGet the list of sources. Get the list of all the Pulsar Sources. Response Example:["f1", "f2", "f3"]- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException- Unexpected error
-
listSourcesAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> listSourcesAsync(java.lang.String tenant, java.lang.String namespace)Get the list of sources asynchronously. Get the list of all the Pulsar Sources. Response Example:["f1", "f2", "f3"]
-
getSource
SourceConfig getSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source) throws PulsarAdminException
Get the configuration for the specified source. Response Example:{ serviceUrl : "http://my-broker.example.com:8080/" }- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name- Returns:
- the source configuration
- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permission to get the configuration of the clusterPulsarAdminException.NotFoundException- Cluster doesn't existPulsarAdminException- Unexpected error
-
getSourceAsync
java.util.concurrent.CompletableFuture<SourceConfig> getSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)
Get the configuration for the specified source asynchronously. Response Example:{ serviceUrl : "http://my-broker.example.com:8080/" }- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name- Returns:
- the source configuration
-
createSource
void createSource(SourceConfig sourceConfig, java.lang.String fileName) throws PulsarAdminException
Create a new source.- Parameters:
sourceConfig- the source configuration object- Throws:
PulsarAdminException- Unexpected error
-
createSourceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createSourceAsync(SourceConfig sourceConfig, java.lang.String fileName)
Create a new source asynchronously.- Parameters:
sourceConfig- the source configuration object
-
createSourceWithUrl
void createSourceWithUrl(SourceConfig sourceConfig, java.lang.String pkgUrl) throws PulsarAdminException
Create a new source with package url. Create a new source 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:
sourceConfig- the source configuration objectpkgUrl- url from which pkg can be downloaded- Throws:
PulsarAdminException
-
createSourceWithUrlAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createSourceWithUrlAsync(SourceConfig sourceConfig, java.lang.String pkgUrl)
Create a new source with package url asynchronously. Create a new source 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:
sourceConfig- the source configuration objectpkgUrl- url from which pkg can be downloaded
-
updateSource
void updateSource(SourceConfig sourceConfig, java.lang.String fileName) throws PulsarAdminException
Update the configuration for a source.- Parameters:
sourceConfig- the source configuration object- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permission to create the clusterPulsarAdminException.NotFoundException- Cluster doesn't existPulsarAdminException- Unexpected error
-
updateSourceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updateSourceAsync(SourceConfig sourceConfig, java.lang.String fileName)
Update the configuration for a source asynchronously.- Parameters:
sourceConfig- the source configuration object
-
updateSource
void updateSource(SourceConfig sourceConfig, java.lang.String fileName, UpdateOptions updateOptions) throws PulsarAdminException
Update the configuration for a source.- Parameters:
sourceConfig- the source 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
-
updateSourceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updateSourceAsync(SourceConfig sourceConfig, java.lang.String fileName, UpdateOptions updateOptions)
Update the configuration for a source asynchronously.- Parameters:
sourceConfig- the source configuration objectupdateOptions- options for the update operations
-
updateSourceWithUrl
void updateSourceWithUrl(SourceConfig sourceConfig, java.lang.String pkgUrl) throws PulsarAdminException
Update the configuration for a source. Update a source 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:
sourceConfig- the source 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
-
updateSourceWithUrlAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updateSourceWithUrlAsync(SourceConfig sourceConfig, java.lang.String pkgUrl)
Update the configuration for a source asynchronously. Update a source 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:
sourceConfig- the source configuration objectpkgUrl- url from which pkg can be downloaded
-
updateSourceWithUrl
void updateSourceWithUrl(SourceConfig sourceConfig, java.lang.String pkgUrl, UpdateOptions updateOptions) throws PulsarAdminException
Update the configuration for a source. Update a source 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:
sourceConfig- the source 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
-
updateSourceWithUrlAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updateSourceWithUrlAsync(SourceConfig sourceConfig, java.lang.String pkgUrl, UpdateOptions updateOptions)
Update the configuration for a source asynchronously. Update a source 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:
sourceConfig- the source configuration objectpkgUrl- url from which pkg can be downloadedupdateOptions- options for the update operations
-
deleteSource
void deleteSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source) throws PulsarAdminExceptionDelete an existing source. Delete a source- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name- Throws:
PulsarAdminException.NotAuthorizedException- You don't have admin permissionPulsarAdminException.NotFoundException- Cluster does not existPulsarAdminException.PreconditionFailedException- Cluster is not emptyPulsarAdminException- Unexpected error
-
deleteSourceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Delete an existing source asynchronously. Delete a source- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name
-
getSourceStatus
SourceStatus getSourceStatus(java.lang.String tenant, java.lang.String namespace, java.lang.String source) throws PulsarAdminException
Gets the current status of a source.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name- Throws:
PulsarAdminException- Unexpected error
-
getSourceStatusAsync
java.util.concurrent.CompletableFuture<SourceStatus> getSourceStatusAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)
Gets the current status of a source asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name
-
getSourceStatus
SourceStatus.SourceInstanceStatus.SourceInstanceStatusData getSourceStatus(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int id) throws PulsarAdminException
Gets the current status of a source instance.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source nameid- Source instance-id- Returns:
- Throws:
PulsarAdminException
-
getSourceStatusAsync
java.util.concurrent.CompletableFuture<SourceStatus.SourceInstanceStatus.SourceInstanceStatusData> getSourceStatusAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int id)
Gets the current status of a source instance asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source nameid- Source instance-id- Returns:
-
restartSource
void restartSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId) throws PulsarAdminExceptionRestart source instance.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source nameinstanceId- Source instanceId- Throws:
PulsarAdminException- Unexpected error
-
restartSourceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> restartSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId)Restart source instance asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source nameinstanceId- Source instanceId
-
restartSource
void restartSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source) throws PulsarAdminExceptionRestart all source instances.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name- Throws:
PulsarAdminException- Unexpected error
-
restartSourceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> restartSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Restart all source instances asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name
-
stopSource
void stopSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId) throws PulsarAdminExceptionStop source instance.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source nameinstanceId- Source instanceId- Throws:
PulsarAdminException- Unexpected error
-
stopSourceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> stopSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId)Stop source instance asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source nameinstanceId- Source instanceId
-
stopSource
void stopSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source) throws PulsarAdminExceptionStop all source instances.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name- Throws:
PulsarAdminException- Unexpected error
-
stopSourceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> stopSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Stop all source instances asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name
-
startSource
void startSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId) throws PulsarAdminExceptionStart source instance.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source nameinstanceId- Source instanceId- Throws:
PulsarAdminException- Unexpected error
-
startSourceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> startSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source, int instanceId)Start source instance asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source nameinstanceId- Source instanceId
-
startSource
void startSource(java.lang.String tenant, java.lang.String namespace, java.lang.String source) throws PulsarAdminExceptionStart all source instances.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name- Throws:
PulsarAdminException- Unexpected error
-
startSourceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> startSourceAsync(java.lang.String tenant, java.lang.String namespace, java.lang.String source)Start all source instances asynchronously.- Parameters:
tenant- Tenant namenamespace- Namespace namesource- Source name
-
getBuiltInSources
java.util.List<ConnectorDefinition> getBuiltInSources() throws PulsarAdminException
Fetches a list of supported Pulsar IO sources currently running in cluster mode.- Throws:
PulsarAdminException- Unexpected error
-
getBuiltInSourcesAsync
java.util.concurrent.CompletableFuture<java.util.List<ConnectorDefinition>> getBuiltInSourcesAsync()
Fetches a list of supported Pulsar IO sources currently running in cluster mode asynchronously.
-
reloadBuiltInSources
void reloadBuiltInSources() throws PulsarAdminExceptionReload the available built-in connectors, include Source and Source.- Throws:
PulsarAdminException- Unexpected error
-
reloadBuiltInSourcesAsync
java.util.concurrent.CompletableFuture<java.lang.Void> reloadBuiltInSourcesAsync()
Reload the available built-in connectors, include Source and Source asynchronously.
-
-