trait SchedulerFacade extends ServiceFacadeWithDatabase with ServiceFacade[SchedulerFacade]
The interface for the external API of the Scheduler Service.
The Scheduler Service is responsible for the management of configuration related to execution and scheduling of sources and pipelines, as well as scripts and wizards for task automation. It handles both automated and manual job scheduling, and monitors the state of jobs until completion.
- Alphabetic
- By Inheritance
- SchedulerFacade
- ServiceFacade
- ServiceFacadeWithDatabase
- ServiceFacadeBase
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract val environment: String
- Definition Classes
- ServiceFacadeBase
- abstract def getAllJobs(states: Set[String] = getJobsDefaultStates, minDate: LocalDateTime = DateTimeSupport.minDate, limit: Option[Int] = None): Array[JobInfo]
Gets all jobs for given job states and creation time limit.
Gets all jobs for given job states and creation time limit.
- states
The set of JobStates to include.
- minDate
The lower bound on the job creation time.
- limit
An optional value for the maximum number of jobs to return (most recent first).
- abstract def getApiEndpoint(id: String): ApiEndpointInfo
Gets the most recent version of a specific API endpoint.
Gets the most recent version of a specific API endpoint.
- id
The unique id of the API endpoint.
- abstract def getApiEndpoints(includeDeleted: Boolean = false): Array[ApiEndpointInfo]
Gets the most recent version of each API endpoint, including deleted.
Gets the most recent version of each API endpoint, including deleted.
- includeDeleted
Whether to include deleted API endpoints.
- abstract def getBatch(id: String): BatchInfo
Gets the most recent version of a specific batch.
Gets the most recent version of a specific batch.
- id
The unique id of the batch.
- abstract def getBatchJob(batchId: String, id: UUID): BatchJobInfo
Gets the batch job for a specific batch and job id.
Gets the batch job for a specific batch and job id.
- batchId
The unique id of the batch.
- id
The
UUIDfor the batch job.
- abstract def getBatchJobs(states: Set[String] = getJobsDefaultStates, minDate: LocalDateTime = DateTimeSupport.minDate, limit: Option[Int] = None): Array[BatchJobInfo]
Gets all batch jobs for given job states and creation time limit.
Gets all batch jobs for given job states and creation time limit.
- states
The set of JobStates to include.
- minDate
The lower bound on the job creation time. LocalDateTime.MIN not supported. Use DateTimeSupport.minDate instead.
- limit
An optional value for the maximum number of jobs to return (most recent first).
- abstract def getBatches(includeDeleted: Boolean = false): Array[BatchInfo]
Gets the most recent version of each batch, including deleted.
Gets the most recent version of each batch, including deleted.
- includeDeleted
Whether to include deleted batches.
- abstract def getCacheStatistics: Array[CacheStatistics]
- Definition Classes
- ServiceFacadeBase
- abstract def getDatabase(outputStream: OutputStream): Unit
- Definition Classes
- ServiceFacadeWithDatabase
- abstract def getDatabasePath: String
- Definition Classes
- ServiceFacadeWithDatabase
- abstract def getFile(path: String, outputStream: OutputStream): Unit
- Definition Classes
- ServiceFacadeBase
- abstract def getHandleDynamicEndpoint(path: String, queryString: Option[String]): String
Handles dynamic API endpoint requests for GET method.
Handles dynamic API endpoint requests for GET method. Finds a matching ApiEndpoint by path pattern and method, executes its handler, and returns the result.
- path
The path portion after /api/.
- queryString
The string containing the query parameters.
- abstract def getJob(id: UUID): JobInfo
Gets the job for a specific job id.
Gets the job for a specific job id.
- id
The
UUIDfor the job.
- abstract def getJobs(ids: List[UUID]): Array[JobInfo]
Gets the jobs for a specific list of job ids.
Gets the jobs for a specific list of job ids.
- ids
The list of
UUIDfor the jobs.
- abstract def getLogForBatchJob(id: UUID): String
Gets the log for a batch job with a specific job id.
Gets the log for a batch job with a specific job id.
- id
The
UUIDfor the batch job.
- abstract def getLogForJob(id: UUID): SparkJobLog
Gets the log for a job with a specific job id.
Gets the log for a job with a specific job id.
- id
The
UUIDfor the job.
- abstract def getLogForScheduleState(scheduleId: String): String
Gets the log for the state of a specific schedule.
Gets the log for the state of a specific schedule.
- scheduleId
The unique id of the schedule.
- abstract def getLogLevel: String
- Definition Classes
- ServiceFacadeBase
- abstract def getPerformanceMetrics: PerformanceMetrics
- Definition Classes
- ServiceFacadeBase
- abstract def getRunners: Array[RunnerInfo]
Gets information on all registered runner services.
- abstract def getSchedule(id: String): ScheduleInfo
Gets the most recent version of a specific schedule.
Gets the most recent version of a specific schedule.
- id
The unique id of the schedule.
- abstract def getSchedules(includeDeleted: Boolean = false): Array[ScheduleInfo]
Gets the most recent version of each schedule, including deleted.
Gets the most recent version of each schedule, including deleted.
- includeDeleted
Whether to include deleted schedules.
- abstract def getScript(id: String): ScriptInfo
Gets the most recent version of a specific script.
Gets the most recent version of a specific script.
- id
The unique id of the script.
- abstract def getScripts(includeDeleted: Boolean = false): Array[ScriptInfo]
Gets the most recent version of each script, including deleted.
Gets the most recent version of each script, including deleted.
- includeDeleted
Whether to include deleted scripts.
- abstract def getStateForSchedule(id: String): ScheduleStateInfo
Gets the current state of a specific schedule.
Gets the current state of a specific schedule.
- id
The unique id of the schedule.
- abstract def getVersion: String
- Definition Classes
- ServiceFacadeBase
- abstract def getVersionForApiEndpoint(id: String, version: UUID): ApiEndpointInfo
Gets a specific version of a specific API endpoint.
Gets a specific version of a specific API endpoint.
- id
The unique id of the API endpoint.
- version
The
UUIDfor the version.
- abstract def getVersionForBatch(id: String, version: UUID): BatchInfo
Gets a specific version of a specific batch.
Gets a specific version of a specific batch.
- id
The unique id of the batch.
- version
The
UUIDfor the version.
- abstract def getVersionForSchedule(id: String, version: UUID): ScheduleInfo
Gets a specific version of a specific schedule.
Gets a specific version of a specific schedule.
- id
The unique id of the schedule.
- version
The
UUIDfor the version.
- abstract def getVersionForScript(id: String, version: UUID): ScriptInfo
Gets a specific version of a specific script.
Gets a specific version of a specific script.
- id
The unique id of the script.
- version
The
UUIDfor the version.
- abstract def getVersionForWizard(id: String, version: UUID): WizardInfo
Gets a specific version of a specific wizard.
Gets a specific version of a specific wizard.
- id
The unique id of the wizard.
- version
The
UUIDfor the version.
- abstract def getVersionsForApiEndpoint(id: String): Array[ApiEndpointInfo]
Gets all versions of a specific API endpoint.
Gets all versions of a specific API endpoint.
- id
The unique id of the API endpoint.
- abstract def getVersionsForBatch(id: String): Array[BatchInfo]
Gets all versions of a specific batch.
Gets all versions of a specific batch.
- id
The unique id of the batch.
- abstract def getVersionsForSchedule(id: String): Array[ScheduleInfo]
Gets all versions of a specific schedule.
Gets all versions of a specific schedule.
- id
The unique id of the schedule.
- abstract def getVersionsForScript(id: String): Array[ScriptInfo]
Gets all versions of a specific script.
Gets all versions of a specific script.
- id
The unique id of the script.
- abstract def getVersionsForWizard(id: String): Array[WizardInfo]
Gets all versions of a specific wizard.
Gets all versions of a specific wizard.
- id
The unique id of the wizard.
- abstract def getWizard(id: String): WizardInfo
Gets the most recent version of a specific wizard.
Gets the most recent version of a specific wizard.
- id
The unique id of the wizard.
- abstract def getWizardSession(sessionId: UUID): WizardSessionInfo
Gets the wizard session for a specific session id.
Gets the wizard session for a specific session id.
- sessionId
The
UUIDfor the session.
- abstract def getWizardSessions(states: Set[String]): Array[WizardSessionInfo]
Gets the wizard sessions for given session states.
Gets the wizard sessions for given session states.
- states
The set of WizardSessionStates to include.
- abstract def getWizards(includeDeleted: Boolean = false): Array[WizardInfo]
Gets the most recent version of each wizard, including deleted.
Gets the most recent version of each wizard, including deleted.
- includeDeleted
Whether to include deleted wizards.
- abstract def isReady: Boolean
- Definition Classes
- ServiceFacadeBase
- abstract def postActionForWizardSession(action: WizardAction): WizardSessionInfo
Performs a given action on a wizard session.
Performs a given action on a wizard session.
- action
The wizard action to perform.
- abstract def postApiEndpoint(content: ApiEndpointContent): Unit
Creates a new version of an API endpoint with the specific content.
Creates a new version of an API endpoint with the specific content.
- content
The content of the new version.
- abstract def postBatch(content: BatchContent): Unit
Creates a new version of a batch with the specific content.
Creates a new version of a batch with the specific content.
- content
The content of the new version.
- abstract def postCachePurge(id: Option[String]): Unit
- Definition Classes
- ServiceFacadeBase
- abstract def postCancelForBatchJob(id: UUID): Unit
Cancels a specific batch job.
Cancels a specific batch job. This also cancels all jobs that are part of the batch.
- id
The
UUIDfor the batch job.
- abstract def postCancelForJob(id: UUID): Unit
Cancels a specific job.
Cancels a specific job.
- id
The
UUIDfor the job.
- abstract def postDatabaseBackup(encryptionEnabled: Option[Boolean], encryptionMasterKeyIdentifier: Option[String], outputRepository: String = EnvironmentVariables.output_repository): Unit
- Definition Classes
- ServiceFacadeWithDatabase
- abstract def postDeleteForApiEndpoint(id: String): Unit
Marks a specific API endpoint as deleted.
Marks a specific API endpoint as deleted. Technically a copy of the most recent version is created with the deletion time set.
- id
The unique id of the API endpoint.
- abstract def postDeleteForBatch(id: String): Unit
Marks a specific batch as deleted.
Marks a specific batch as deleted. Technically a copy of the most recent version is created with the deletion time set.
- id
The unique id of the batch.
- abstract def postDeleteForSchedule(id: String): Unit
Marks a specific schedule as deleted.
Marks a specific schedule as deleted. Technically a copy of the most recent version is created with the deletion time set.
- id
The unique id of the schedule.
- abstract def postDeleteForScript(id: String): Unit
Marks a specific script as deleted.
Marks a specific script as deleted. Technically a copy of the most recent version is created with the deletion time set.
- id
The unique id of the script.
- abstract def postDeleteForWizard(id: String): Unit
Marks a specific wizard as deleted.
Marks a specific wizard as deleted. Technically a copy of the most recent version is created with the deletion time set.
- id
The unique id of the wizard.
- abstract def postErrorForJob(id: UUID, error: ExceptionChain): Unit
Update the error information for a specific job.
Update the error information for a specific job.
- id
The
UUIDfor the job.- error
The error information to include.
- abstract def postHandleDynamicEndpoint(path: String, queryString: Option[String], body: String): String
Handles dynamic API endpoint requests for POST method.
Handles dynamic API endpoint requests for POST method. Finds a matching ApiEndpoint by path pattern and method, executes its handler with the request body, and returns the result.
- path
The path portion after /api/.
- queryString
The string containing the query parameters.
- body
The request body content to pass to the handler.
- abstract def postHost(name: String, isLocal: Boolean = true, modes: List[String] = EnvironmentVariables.runner_modes.toList, memoryGb: Int = SchedulerFacade.postHostDefaultMemoryGb(), minMemoryLevel: Int = 0, instanceId: Option[String] = None): Unit
Registers or updates information on a runner service host with a given name.
Registers or updates information on a runner service host with a given name.
- name
The service name of the runner.
- isLocal
Whether the runner uses spark in local mode or distributed.
- modes
The RunnerModes supported by the runner.
- memoryGb
The amount of memory in GB available to the runner.
- minMemoryLevel
The minimum memory level for jobs to be accepted by the runner.
- instanceId
The AWS EC2 instance id for the runner, if available.
- abstract def postHostForJobs(host: String): Array[JobInfo]
Assign jobs ready for execution to a given runner.
Assign jobs ready for execution to a given runner. Only compatible jobs are assigned, which depends on both the properties of the job and the runner.
- host
The service name of the runner.
- returns
The jobs that were assigned to the runner.
- abstract def postLogForJob(id: UUID, log: String): Unit
Appends content to the log for a specific job.
Appends content to the log for a specific job.
- id
The
UUIDfor the job.- log
The text content to append. A line break is inserted if the log is non-empty.
- abstract def postNewWizardSession(wizardId: String): WizardSessionInfo
Creates a new session for a specific wizard.
Creates a new session for a specific wizard.
- wizardId
The unique id of the wizard.
- abstract def postProgressForJob(id: UUID, progress: Double): Unit
Update the progress value for a specific job.
Update the progress value for a specific job. If the current progress is 1 the value can only be set to 0.
- id
The
UUIDfor the job.- progress
A value between 0 and 1.
- abstract def postRestart: Unit
- Definition Classes
- ServiceFacadeBase
- abstract def postRunForBatch(id: String, tag: String, date: LocalDateTime = postRunDefaultDate(), expires: Option[LocalDateTime] = None, updates: BatchUpdates = BatchUpdates(List(), List())): BatchJobInfo
Creates a batch job for running a specific batch on a given date, restricted to a specific tag.
Creates a batch job for running a specific batch on a given date, restricted to a specific tag. This creates jobs for all sources and pipelines with results missing from the batch, with a requested update or with a dependency on a requested update. Untagged versions may be used if no matching tag exists.
- id
The unique id of the batch.
- tag
The tag to use as restriction.
- date
The date and time to associate with the run.
- expires
The date and time to associate with the run.
- updates
A specification of source and pipelines that should be updated. This will also update dependencies in the batch.
- abstract def postRunForDashboard(id: String, mode: String = RunnerModes.batch): JobInfo
Creates a job for updating a specific dashboard for a given mode.
Creates a job for updating a specific dashboard for a given mode.
- id
The unique id of the dashboard.
- mode
The RunnerModes value to use for the job. Should be RunnerModes.realtime or RunnerModes.batch.
- abstract def postRunForPipeline(id: String, tag: String, date: LocalDateTime = postRunDefaultDate()): Array[JobInfo]
Creates a job for running a specific pipeline on a given date, restricted to a specific tag.
Creates a job for running a specific pipeline on a given date, restricted to a specific tag. An untagged version may be used if no matching tag exists.
- id
The unique id of the pipeline.
- tag
The tag to use as restriction.
- date
The date and time to associate with the run.
- abstract def postRunForScript(id: String, body: String, resource: Option[String], method: String): String
Runs a specific script with given body.
Runs a specific script with given body.
- id
The unique id of the script.
- body
The body to supply as input to the script.
- resource
An optional resource string supplied to the script.
- method
The HTTP method for the call.
- abstract def postRunForScript(id: String, parameters: ScriptParameters, resource: Option[String] = None): ScriptResults
Runs a specific script with given parameters.
Runs a specific script with given parameters.
- id
The unique id of the script.
- parameters
The parameters to supply as input to the script.
- resource
An optional resource string supplied to the script.
- abstract def postRunForSource(id: String, tag: String, date: LocalDateTime = postRunDefaultDate()): JobInfo
Creates a job for running a specific source on a given date, restricted to a specific tag.
Creates a job for running a specific source on a given date, restricted to a specific tag. An untagged version may be used if no matching tag exists.
- id
The unique id of the source.
- tag
The tag to use as restriction.
- date
The date and time to associate with the run.
- abstract def postRunNextForJob(id: UUID): JobInfo
Sets a priority on the job to make sure that it will be the next one to run.
Sets a priority on the job to make sure that it will be the next one to run.
- id
The
UUIDfor the job.
- abstract def postSchedule(content: ScheduleContent): Unit
Creates a new version of a schedule with the specific content.
Creates a new version of a schedule with the specific content.
- content
The content of the new version.
- abstract def postScript(content: ScriptContent): Unit
Creates a new version of a script with the specific content.
Creates a new version of a script with the specific content.
- content
The content of the new version.
- abstract def postStartForSchedule(id: String): Unit
Starts a specific schedule.
Starts a specific schedule. This enables the automatic scheduling of jobs.
- id
The unique id of the schedule.
- abstract def postStateForJob(id: UUID, state: String): Unit
Update the state for a specific job.
Update the state for a specific job. If the current job state is in JobStates.absorbing the state can only be set to JobStates.pending.
- id
The
UUIDfor the job.- state
The JobStates value to set.
- abstract def postStopForSchedule(id: String, suspend: Boolean = false): Unit
Stops a specific schedule.
Stops a specific schedule. A stopped schedule will never perform any automated actions.
- id
The unique id of the schedule.
- abstract def postTestForApiEndpoint(endpoint: ApiEndpointContent, resource: String, body: String): String
Tests a given API endpoint definition with given parameters.
Tests a given API endpoint definition with given parameters.
- resource
The resource containing the path and query string.
- body
The body of the request.
- abstract def postTestForScript(content: ScriptContent, body: String, resource: Option[String], method: String): String
Tests a given script definition with given body.
Tests a given script definition with given body. The only difference from postRunForScript is that the script definition is given as a parameter.
- content
The definition of the script.
- body
The body to supply as input to the script.
- resource
An optional resource string supplied to the script.
- method
The HTTP method for the call.
- abstract def postTestForScript(content: ScriptContent, parameters: ScriptParameters, resource: Option[String] = None): ScriptResults
Tests a given script definition with given parameters.
Tests a given script definition with given parameters. The only difference from postRunForScript is that the script definition is given as a parameter.
- content
The definition of the script.
- parameters
The parameters to supply as input to the script.
- resource
An optional resource string supplied to the script.
- abstract def postTestForWizard(content: WizardContent): Unit
Tests a given wizard definition for validity.
Tests a given wizard definition for validity. Besides compilation some structural rules are checked, but the wizard is not run.
- content
The definition of the wizard.
- abstract def postVacuumDatabase: Unit
- Definition Classes
- ServiceFacadeWithDatabase
- abstract def postWizard(content: WizardContent): Unit
Creates a new version of a wizard with the specific content.
Creates a new version of a wizard with the specific content.
- content
The content of the new version.
- abstract def setLogLevel(level: String): Unit
- Definition Classes
- ServiceFacadeBase
- abstract def withTimeout(seconds: Int): SchedulerFacade
- Definition Classes
- ServiceFacade
- abstract def withToken(token: UUID): SchedulerFacade
- Definition Classes
- ServiceFacade
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def getApiEndpoints: Array[ApiEndpointInfo]
Gets the most recent version of each API endpoint.
- def getBatches: Array[BatchInfo]
Gets the most recent version of each batch.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- val getJobsDefaultStates: Set[String]
The default value for
statesused in getAllJobs and getBatchJobs.The default value for
statesused in getAllJobs and getBatchJobs. The value is JobStates.pending, JobStates.running and JobStates.submitted. - def getSchedules: Array[ScheduleInfo]
Gets the most recent version of each schedule.
- def getScripts: Array[ScriptInfo]
Gets the most recent version of each script.
- def getWizards: Array[WizardInfo]
Gets the most recent version of each wizard.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- val postRunDefaultDate: () => LocalDateTime
The default value for
dateused in postRunForSource, postRunForPipeline and postRunForBatch.The default value for
dateused in postRunForSource, postRunForPipeline and postRunForBatch. The value is a function that returns the current UTC time. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def waitIsReady(timeoutSeconds: Int, pollIntervalSeconds: Int): Unit
- Definition Classes
- ServiceFacadeBase
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)