Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/scala/com/criteo/cuttle/Logger.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.criteo.cuttle

/** A logger used to output internal informations. */
/** A logger used to output internal information. */
trait Logger {
def debug(message: => String): Unit
def info(message: => String): Unit
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/scala/com/criteo/cuttle/Scheduling.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import java.util.Comparator

import Metrics.MetricProvider

/** A scheduler interpret a [[Workflow]] and instanciate [[Execution Executions]] for all
/** A scheduler interprets a [[Workflow]] and instantiates [[Execution Executions]] for all
* defined [[Job Jobs]]. For example, a typical cuttle [[Scheduler]] is the [[timeseries.TimeSeries TimeSeries]]
* scheduler that executes the graph for each time partition.
*
Expand All @@ -16,13 +16,13 @@ import Metrics.MetricProvider
trait Scheduler[S <: Scheduling] extends MetricProvider[S] {
def name: String = this.getClass.getSimpleName

/** Starts the scheduler for the given [[Workflow]]. Immediatly the scheduler will start interpreting
/** Starts the scheduler for the given [[Workflow]]. Immediately the scheduler will start interpreting
* the workflow and generate [[Execution Executions]] sent to the provided [[Executor]].
*
* @param jobs The jobs to run.
* @param executor The executor to use to run the generated [[Execution Executions]].
* @param xa The doobie transactor to use to persist the scheduler state if needed.
* @param logger The logger to use to log internal debug state if neeed.
* @param logger The logger to use to log internal debug state if needed.
*/
def start(jobs: Workload[S], executor: Executor[S], xa: XA, logger: Logger): Unit

Expand All @@ -34,7 +34,7 @@ trait Scheduler[S <: Scheduling] extends MetricProvider[S] {
*/
val allContexts: Fragment = Queries.getAllContexts

/** Returns a Json object containing the internal scheduler statistics informations.
/** Returns a Json object containing the internal scheduler statistics information.
* These data will be send to the UI and can be used by the scheduler UI if needed.
*
* @param jobs Filter the statistics for the provided list of jobs.
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/scala/com/criteo/cuttle/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ package object utils {
private[cuttle] def awakeEvery(duration: FiniteDuration): fs2.Stream[IO, FiniteDuration] =
fs2.Stream.awakeEvery[IO](duration)

/** Creates a [[scala.concurrent.Future Future]] that resolve automatically
/** Creates a [[scala.concurrent.Future Future]] that resolves automatically
* after the given duration.
*/
object Timeout {
Expand All @@ -74,7 +74,7 @@ package object utils {
*/
implicit val timer: Timer[IO] = IO.timer(ExecutionContext.fromExecutor(scheduler))

/** Creates a [[scala.concurrent.Future]] that resolve automatically
/** Creates a [[scala.concurrent.Future]] that resolves automatically
* after the given duration.
*
* @param timeout Duration for the timeout.
Expand All @@ -92,7 +92,7 @@ package object utils {
}

/**
* Creates a [[cats.effect.IO]] that resolve automatically
* Creates a [[cats.effect.IO]] that resolves automatically
* after the given duration.
* @param timeout Duration for the timeout.
* @return
Expand Down
8 changes: 4 additions & 4 deletions cron/src/main/scala/com/criteo/cuttle/cron/CronProject.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CronProject private[cuttle] (val name: String,

/**
* Start scheduling and execution with the given environment. It also starts
* an HTTP server providing an Web UI and a JSON API.
* an HTTP server providing a Web UI and a JSON API.
*
* @param platforms The configured [[ExecutionPlatform ExecutionPlatforms]] to use to execute jobs.
* @param port The port to use for the HTTP daemon.
Expand Down Expand Up @@ -71,7 +71,7 @@ class CronProject private[cuttle] (val name: String,
}

/**
* Create new projects using a timeseries scheduler.
* Create new projects using a cron scheduler.
*/
object CronProject {

Expand All @@ -80,13 +80,13 @@ object CronProject {
*
* @param name The project name as displayed in the UI.
* @param version The project version as displayed in the UI.
* @param description The project version as displayed in the UI.
* @param description The project description as displayed in the UI.
* @param env The environment as displayed in the UI (The string is the name while the boolean indicates
* if the environment is a production one).
* @param authenticator The way to authenticate HTTP request for the UI and the private API.
* @param jobs The workflow to run in this project.
* @param scheduler The scheduler instance to use to schedule the Workflow jobs.
* @param logger The logger to use to log internal debug informations.
* @param logger The logger to use to log internal debug information.
*/
def apply(
name: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import com.criteo.cuttle.platforms.local._

object HelloCustomScheduling {

// A cuttle project is just embeded into any Scala application.
// A cuttle project is just embedded into any Scala application.
def main(args: Array[String]): Unit = {

// __Let's define our custom scheduler first!__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Example: Hello cuttle timeseries!

// This a very simple cuttle project using the time series scheduler
// This is a very simple cuttle project using the time series scheduler
// to execute a bunch of shell scripts
package com.criteo.cuttle.examples

Expand All @@ -25,7 +25,7 @@ import scala.concurrent.duration._

object HelloTimeSeries {

// A cuttle project is just embeded into any Scala application.
// A cuttle project is just embedded into any Scala application.
def main(args: Array[String]): Unit = {

// We define a common start date for all our jobs. This is required by the
Expand Down Expand Up @@ -72,7 +72,7 @@ object HelloTimeSeries {
// Here is our third job. Look how we can also define some metadata such as a human friendly
// name and a set of tags. This information is used in the UI to help retrieving your jobs.
// This job will be executed in batching mode, it means that it will always wait for some period of
// time(10 seconds here) and create a single executions for each 5 consequent partition available to compute.
// time(10 seconds here) and create a single execution for each 5 consequent partitions available to compute.
val hello3 =
Job(
"hello3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CuttleProject private[cuttle] (val name: String,

/**
* Start scheduling and execution with the given environment. It also starts
* an HTTP server providing an Web UI and a JSON API.
* an HTTP server providing a Web UI and a JSON API.
*
* @param platforms The configured [[ExecutionPlatform ExecutionPlatforms]] to use to execute jobs.
* @param httpPort The port to use for the HTTP daemon.
Expand Down Expand Up @@ -121,12 +121,12 @@ object CuttleProject {
* Create a new project.
* @param name The project name as displayed in the UI.
* @param version The project version as displayed in the UI.
* @param description The project version as displayed in the UI.
* @param description The project description as displayed in the UI.
* @param env The environment as displayed in the UI (The string is the name while the boolean indicates
* if the environment is a production one).
* @param authenticator The way to authenticate HTTP request for the UI and the private API.
* @param jobs The workflow to run in this project.
* @param logger The logger to use to log internal debug informations.
* @param logger The logger to use to log internal debug information.
*/
def apply(
name: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private[timeseries] object Backfill {
*
* @param start Start instant of the partition to compute.
* @param end End instant of the partition to compute.
* @param backfill If this execution is for a backfill, the [[Backfill]] informations are provided.
* @param backfill If this execution is for a backfill, the [[Backfill]] information is provided.
*/
case class TimeSeriesContext(start: Instant,
end: Instant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import com.criteo.cuttle.timeseries.intervals.{Interval, MeasureKey}
import scala.reflect.macros.blackbox

/** A [[TimeSeries]] scheduler executes the [[com.criteo.cuttle.Workflow Workflow]] for the
* time partitions defined in a calendar. Each [[com.criteo.cuttle.Job Job]] defines how it mnaps
* time partitions defined in a calendar. Each [[com.criteo.cuttle.Job Job]] defines how it maps
* to the calendar (for example Hourly or Daily UTC), and the [[com.criteo.cuttle.Scheduler Scheduler]]
* ensure that at least one [[com.criteo.cuttle.Execution Execution]] is created and successfully run
* ensures that at least one [[com.criteo.cuttle.Execution Execution]] is created and successfully run
* for each defined Job/Period.
*
* The scheduler also allow to [[Backfill]] already computed partitions. The [[Backfill]] can be recursive
* The scheduler also allows to [[Backfill]] already computed partitions. The [[Backfill]] can be recursive
* or not and an audit log of backfills is kept.
*/
package object timeseries {
Expand All @@ -30,7 +30,7 @@ package object timeseries {
def edges = Set.empty
}

/** Utility that allow to define compile time safe date literals. Meaning that compilation
/** Utility that allows to define compile time safe date literals. Meaning that compilation
* will fail if the date literal cannot be parsed into a UTC instant.
*
* {{{
Expand Down Expand Up @@ -65,7 +65,7 @@ package object timeseries {
* complete calendar hours starting at 00 minutes, 00 seconds.
*
* If the start instant does not match a round hour (0 minutes, 0 seconds), the calendar
* will actually start the next hour immediatly following the start instant.
* will actually start the next hour immediately following the start instant.
*
* The optional end instant allows to specify a finite calendar that will stop on the
* end instant if it is a round hour or at the start of the hour otherwise.
Expand Down Expand Up @@ -94,12 +94,12 @@ package object timeseries {
throw new IllegalArgumentException("hours should be a strictly positive divider of 24 different than 24")
} else TimeSeries(calendar = NHourly(hours), start, end, batching)

/** Defines an daily calendar starting at the specified instant, and using the specified time zone.
* Days are defined as complete calendar days starting a midnight and during 24 hours. If the specified
* timezone defines lightsaving it is possible that some days are 23 or 25 horus thus.
/** Defines a daily calendar starting at the specified instant, and using the specified time zone.
* Days are defined as complete calendar days starting at midnight and during 24 hours. If the specified
* timezone defines daylight saving it is possible that some days are 23 or 25 hours thus.
*
* If the start instant does not match a round day (midnight), the calendar
* will actually start the next day immediatly following the start instant.
* will actually start the next day immediately following the start instant.
*
* The optional end instant allows to specify a finite calendar that will stop on the
* end instant if it is a round day or at the start of the day otherwise.
Expand Down Expand Up @@ -140,7 +140,7 @@ package object timeseries {
* during 28,29,30 or 31 days. The specified time zone is used to define the exact month start instant.
*
* If the start instant does not match a round month (1st at midnight), the calendar
* will actually start the next month immediatly following the start instant.
* will actually start the next month immediately following the start instant.
*
* The optional end instant allows to specify a finite calendar that will stop on the
* end instant if it is a round month or at the start of the month otherwise.
Expand Down