Trait

dagr.core.tasksystem

UnitTask

Related Doc: package tasksystem

Permalink

trait UnitTask extends Task with LazyLogging with Schedulable

A task that should be directly executed or scheduled.

A few things about unit tasks: - a task can depend on data from tasks on which it is dependent. See Callbacks. - a task extending this class should return only one task in its getTasks method. See Task.getTasks. - a task can perform any final logic dependent on the resources with which it is scheduled. See Scheduler!.schedule*.

When a unit task gets scheduled, the dagr.core.execsystem.Scheduler.schedule method will be called to allow any final logic based on the resources this task was scheduled with. This is in addition to the steps listed in Task.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. UnitTask
  2. Schedulable
  3. LazyLogging
  4. Task
  5. Dependable
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def pickResources(availableResources: ResourceSet): Option[ResourceSet]

    Permalink

    Given a non-null ResourceSet representing the available resources at this moment in time return either a ResourceSet that is a subset of the available resources in which the task can run, or None if the task cannot run in the available resources.

    Given a non-null ResourceSet representing the available resources at this moment in time return either a ResourceSet that is a subset of the available resources in which the task can run, or None if the task cannot run in the available resources.

    availableResources

    The system resources available to the task

    returns

    Either a ResourceSet of the desired subset of resources to run with, or None

    Definition Classes
    Schedulable

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. def !=>(other: MultiTask): other.type

    Permalink

    Removes this as a dependency for other

    Removes this as a dependency for other

    Definition Classes
    TaskDependable
  3. def !=>(other: Task): other.type

    Permalink

    Removes this as a dependency for other

    Removes this as a dependency for other

    Definition Classes
    TaskDependable
  4. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  5. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from UnitTask to any2stringadd[UnitTask] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  6. def ->[B](y: B): (UnitTask, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from UnitTask to ArrowAssoc[UnitTask] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  7. def ::(other: Task): MultiTask

    Permalink

    Combines this task with another task into a MultiTask.

    Combines this task with another task into a MultiTask.

    Definition Classes
    Task
  8. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def ==>(other: MultiTask): other.type

    Permalink

    Creates a dependency on this dependable for all the Tasks in the provided MultiTask.

    Creates a dependency on this dependable for all the Tasks in the provided MultiTask.

    Definition Classes
    TaskDependable
  10. def ==>(other: Task): other.type

    Permalink

    Sets up a dependency between two tasks.

    Sets up a dependency between two tasks. The task on the left side of the arrow (i.e. this) is set to be a predecessor/dependency of that task on the right hand side of the arrow (i.e. other).

    returns

    the "other" task so that chains of calls like a ==> b ==> c work correctly

    Definition Classes
    TaskDependable
  11. def applyResources(resources: ResourceSet): Unit

    Permalink

    Called by the Scheduler immediately prior to scheduling to allow tasks to perform any necessary last-minute configuration with the knowledge of the exact set of resources they are to be run with.

    Called by the Scheduler immediately prior to scheduling to allow tasks to perform any necessary last-minute configuration with the knowledge of the exact set of resources they are to be run with.

    resources

    the set of resources that the task will be run with

    Definition Classes
    UnitTaskSchedulable
  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def ensuring(cond: (UnitTask) ⇒ Boolean, msg: ⇒ Any): UnitTask

    Permalink
    Implicit information
    This member is added by an implicit conversion from UnitTask to Ensuring[UnitTask] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: (UnitTask) ⇒ Boolean): UnitTask

    Permalink
    Implicit information
    This member is added by an implicit conversion from UnitTask to Ensuring[UnitTask] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean, msg: ⇒ Any): UnitTask

    Permalink
    Implicit information
    This member is added by an implicit conversion from UnitTask to Ensuring[UnitTask] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean): UnitTask

    Permalink
    Implicit information
    This member is added by an implicit conversion from UnitTask to Ensuring[UnitTask] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from UnitTask to StringFormat[UnitTask] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def getTasks: Traversable[_ <: UnitTask.this.type]

    Permalink

    Get the list of tasks to execute.

    Get the list of tasks to execute.

    For UnitTask and any class that extends it, if the task wishes to be directly executed, the list should be of size one, and equal to itself. If no resources have been specified, both memory and cores default to the given resources.

    returns

    the list of tasks of to run.

    Definition Classes
    UnitTaskTask
  24. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. lazy val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    LazyLogging
  27. var name: String

    Permalink

    The name of the task.

    The name of the task.

    Definition Classes
    Task
  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. def onComplete(exitCode: Int): Boolean

    Permalink

    Finalize anything after the task has been run.

    Finalize anything after the task has been run.

    This method should be called after a task has been run. The intended use of this method is to allow for any modification of this task prior to any dependent tasks being run. This would allow any parameters that were passed to dependent tasks as call-by-name to be finalized here. For example, we could have passed an Option[String] that is None until make it Some(String) in this method. Then when the dependent task's getTasks method is called, it can call 'get' on the option and get something.

    exitCode

    the exit code of the task, which could also be 1 due to the system terminating this process

    returns

    true if we c

    Definition Classes
    Task
  32. def removeDependency(task: Task): Boolean

    Permalink

    Removes a dependency by removing the supplied task from the list of dependencies for this task and removing this from the list of tasks depending on "task".

    Removes a dependency by removing the supplied task from the list of dependencies for this task and removing this from the list of tasks depending on "task".

    task

    a task on which this task depends

    returns

    true if a dependency existed and was removed, false otherwise

    Definition Classes
    Task
  33. def retry(taskInfo: TaskExecutionInfo, failedOnComplete: Boolean): Option[Task]

    Permalink

    Retry the given task.

    Retry the given task.

    taskInfo

    the task execution information for the task to be retried.

    failedOnComplete

    true the task failed while running its onComplete method, otherwise failed while running its command

    returns

    the task to be retried, None if it is not to be retried.

    Definition Classes
    Task
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def withName(name: String): UnitTask.this.type

    Permalink

    Sets the name of this task.

    Sets the name of this task.

    Definition Classes
    Task
  40. def [B](y: B): (UnitTask, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from UnitTask to ArrowAssoc[UnitTask] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Schedulable

Inherited from LazyLogging

Inherited from Task

Inherited from Dependable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from UnitTask to any2stringadd[UnitTask]

Inherited by implicit conversion StringFormat from UnitTask to StringFormat[UnitTask]

Inherited by implicit conversion Ensuring from UnitTask to Ensuring[UnitTask]

Inherited by implicit conversion ArrowAssoc from UnitTask to ArrowAssoc[UnitTask]

Ungrouped