Interface Sources

  • All Known Subinterfaces:
    Source

    public interface Sources
    Admin interface for Source management.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void createSource​(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.
      void createSourceWithUrl​(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.
      void deleteSource​(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.
      SourceConfig getSource​(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.
      SourceStatus getSourceStatus​(java.lang.String tenant, java.lang.String namespace, java.lang.String source)
      Gets the current status of a source.
      SourceStatus.SourceInstanceStatus.SourceInstanceStatusData getSourceStatus​(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.
      void reloadBuiltInSources()
      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.
      void restartSource​(java.lang.String tenant, java.lang.String namespace, java.lang.String source)
      Restart all source instances.
      void restartSource​(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.
      void startSource​(java.lang.String tenant, java.lang.String namespace, java.lang.String source)
      Start all source instances.
      void startSource​(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.
      void stopSource​(java.lang.String tenant, java.lang.String namespace, java.lang.String source)
      Stop all source instances.
      void stopSource​(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.
      void updateSource​(SourceConfig sourceConfig, java.lang.String fileName)
      Update the configuration for a source.
      void updateSource​(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.
      void updateSourceWithUrl​(SourceConfig sourceConfig, java.lang.String pkgUrl)
      Update the configuration for a source.
      void updateSourceWithUrl​(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

      • 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"]
         
      • 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 name
        namespace - Namespace name
        source - Source name
        Returns:
        the source configuration
      • 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 object
        pkgUrl - 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 object
        pkgUrl - url from which pkg can be downloaded
      • 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
      • 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 object
        updateOptions - options for the update operations
      • 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 object
        pkgUrl - 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 object
        pkgUrl - url from which pkg can be downloaded
        updateOptions - options for the update operations
        Throws:
        PulsarAdminException.NotAuthorizedException - You don't have admin permission to create the cluster
        PulsarAdminException.NotFoundException - Cluster doesn't exist
        PulsarAdminException - 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 object
        pkgUrl - url from which pkg can be downloaded
        updateOptions - options for the update operations
      • 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 name
        namespace - Namespace name
        source - 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 name
        namespace - Namespace name
        source - 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 name
        namespace - Namespace name
        source - Source name
      • 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 name
        namespace - Namespace name
        source - Source name
        id - Source instance-id
        Returns:
      • restartSource

        void restartSource​(java.lang.String tenant,
                           java.lang.String namespace,
                           java.lang.String source,
                           int instanceId)
                    throws PulsarAdminException
        Restart source instance.
        Parameters:
        tenant - Tenant name
        namespace - Namespace name
        source - Source name
        instanceId - 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 name
        namespace - Namespace name
        source - Source name
        instanceId - Source instanceId
      • restartSource

        void restartSource​(java.lang.String tenant,
                           java.lang.String namespace,
                           java.lang.String source)
                    throws PulsarAdminException
        Restart all source instances.
        Parameters:
        tenant - Tenant name
        namespace - Namespace name
        source - 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 name
        namespace - Namespace name
        source - Source name
      • stopSource

        void stopSource​(java.lang.String tenant,
                        java.lang.String namespace,
                        java.lang.String source,
                        int instanceId)
                 throws PulsarAdminException
        Stop source instance.
        Parameters:
        tenant - Tenant name
        namespace - Namespace name
        source - Source name
        instanceId - 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 name
        namespace - Namespace name
        source - Source name
        instanceId - Source instanceId
      • stopSource

        void stopSource​(java.lang.String tenant,
                        java.lang.String namespace,
                        java.lang.String source)
                 throws PulsarAdminException
        Stop all source instances.
        Parameters:
        tenant - Tenant name
        namespace - Namespace name
        source - 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 name
        namespace - Namespace name
        source - Source name
      • startSource

        void startSource​(java.lang.String tenant,
                         java.lang.String namespace,
                         java.lang.String source,
                         int instanceId)
                  throws PulsarAdminException
        Start source instance.
        Parameters:
        tenant - Tenant name
        namespace - Namespace name
        source - Source name
        instanceId - 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 name
        namespace - Namespace name
        source - Source name
        instanceId - Source instanceId
      • startSource

        void startSource​(java.lang.String tenant,
                         java.lang.String namespace,
                         java.lang.String source)
                  throws PulsarAdminException
        Start all source instances.
        Parameters:
        tenant - Tenant name
        namespace - Namespace name
        source - 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 name
        namespace - Namespace name
        source - Source name
      • getBuiltInSourcesAsync

        java.util.concurrent.CompletableFuture<java.util.List<ConnectorDefinition>> getBuiltInSourcesAsync()
        Fetches a list of supported Pulsar IO sources currently running in cluster mode asynchronously.
      • reloadBuiltInSourcesAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> reloadBuiltInSourcesAsync()
        Reload the available built-in connectors, include Source and Source asynchronously.