Interface SupervisorSpec

All Known Implementing Classes:
NoopSupervisorSpec

public interface SupervisorSpec
  • Method Details

    • getId

      String getId()
      Return an unique id of Supervisor.
    • createSupervisor

      Supervisor createSupervisor()
      Create a new Supervisor instance.
    • createAutoscaler

      default SupervisorTaskAutoScaler createAutoscaler(Supervisor supervisor)
    • getDataSources

      List<String> getDataSources()
    • createSuspendedSpec

      default SupervisorSpec createSuspendedSpec()
    • createRunningSpec

      default SupervisorSpec createRunningSpec()
    • isSuspended

      default boolean isSuspended()
    • getType

      String getType()
      This API is only used for informational purposes in org.apache.druid.sql.calcite.schema.SystemSchema.SupervisorsTable
      Returns:
      supervisor type
    • getInputSourceResources

      @Nonnull default Set<ResourceAction> getInputSourceResources() throws UnsupportedOperationException
      Returns:
      The types of InputSource that the task uses. Empty set is returned if the task does not use any. Users can be given permission to access particular types of input sources but not others, using the AuthConfig.enableInputSourceSecurity config.
      Throws:
      UnsupportedOperationException
    • getSource

      String getSource()
      This API is only used for informational purposes in org.apache.druid.sql.calcite.schema.SystemSchema.SupervisorsTable
      Returns:
      source like stream or topic name
    • validateSpecUpdateTo

      default void validateSpecUpdateTo(SupervisorSpec proposedSpec) throws DruidException
      Checks if a spec can be replaced with a proposed spec (proposesSpec).

      By default, this method does no validation checks. Implementations of this method can choose to define rules for spec updates and throw an exception if the update is not allowed.

      Parameters:
      proposedSpec - the proposed supervisor spec
      Throws:
      DruidException - if the spec update is not allowed