Interface AzkarraStreamsService

    • Method Detail

      • getAllStreams

        Collection<String> getAllStreams()
        Returns the list of all running streams applications.
        Returns:
        a list of string ids.
        See Also:
        StreamsConfig.APPLICATION_ID_CONFIG
      • getStreamsConfigById

        Conf getStreamsConfigById​(String applicationId)
        Returns the Conf for the specified streams application.
        Parameters:
        applicationId - the streams application id.
        Returns:
        a Optional of Conf.
        Throws:
        NotFoundException - if not application exists for the id.
      • getStreamsStatusById

        StreamsStatus getStreamsStatusById​(String applicationId)
        Returns the status for the specified streams application.
        Parameters:
        applicationId - the streams application id.
        Returns:
        a StreamsStatus instance.
        Throws:
        NotFoundException - if not application exists for the id.
      • startStreamsTopology

        ApplicationId startStreamsTopology​(String topologyType,
                                           String topologyVersion,
                                           String env,
                                           Executed executed)
        Creates and starts a new streams job for the specified topology into the specified environment.
        Parameters:
        topologyType - the topology type.
        topologyVersion - the topology topologyVersion.
        env - the environment name.
        executed - the Executed instance.
        Returns:
        the streams application.id
      • getStreamsMetricsById

        Set<MetricGroup> getStreamsMetricsById​(String applicationId)
        Gets all metrics for the specified streams application.
        Parameters:
        applicationId - the streams application id.
        Returns:
        a set of MetricGroup instance.
        Throws:
        NotFoundException - if not application exists for the id.
      • getContextConfig

        Conf getContextConfig()
      • getAllEnvironments

        Set<Environment> getAllEnvironments()
        Gets all existing streams environments.
        Returns:
        a set of Environment instance.
      • addNewEnvironment

        void addNewEnvironment​(String name,
                               Conf conf)
        Adds a new environment to this application.
        Parameters:
        name - the environment name.
        conf - the environment configuration.
      • getStreamsInstancesById

        Set<StreamsServerInfo> getStreamsInstancesById​(String applicationId)
        Gets all local and remote streams instances for the specified streams application.
        Parameters:
        applicationId - the streams application id.
        Returns:
        the set of StreamsServerInfo instances.
        Throws:
        NotFoundException - if not application exists for the id.
      • stopStreams

        void stopStreams​(String applicationId,
                         boolean cleanUp)
        Stops the streams instance for the specified streams application.
        Parameters:
        applicationId - the streams application id.
        cleanUp - the flag to indicate if the local streams states should be cleaned up.
        Throws:
        NotFoundException - if not application exists for the id.
      • restartStreams

        void restartStreams​(String applicationId)
        Restarts the streams instance for the specified streams application.
        Parameters:
        applicationId - the streams application id.
        Throws:
        NotFoundException - if not application exists for the id.
      • deleteStreams

        void deleteStreams​(String applicationId)
        Deletes the streams instance for the specified streams application.
        Parameters:
        applicationId - the streams application id.
        Throws:
        NotFoundException - if not application exists for the id.
      • query

        <K,​V> QueryResult<K,​V> query​(String applicationId,
                                                 Query<K,​V> query,
                                                 QueryParams parameters,
                                                 Queried options)
        Executes an interactive query for the specified streams application.
        Parameters:
        applicationId - the streams application id.
        query - the Query instance.
        parameters - the query parameters.
        options - the query execution options.
        Returns:
        the QueryResult instance.