Trait

com.coxautodata.waimak.dataflow.spark

SparkDataFlow

Related Doc: package spark

Permalink

trait SparkDataFlow extends DataFlow[SparkFlowContext] with Logging

Introduces spark session into the data flows

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SparkDataFlow
  2. DataFlow
  3. Logging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def actions: Seq[DataFlowAction[SparkFlowContext]]

    Permalink

    Actions to execute, these will be scheduled when inputs become available.

    Actions to execute, these will be scheduled when inputs become available. Executed actions must be removed from the sate.

    Definition Classes
    DataFlow
  2. abstract def addCommitLabel(label: String, definition: LabelCommitDefinition): SparkDataFlow

    Permalink
  3. abstract val commitLabels: Map[String, LabelCommitDefinition]

    Permalink
  4. abstract def createInstance(in: DataFlowEntities, ac: Seq[DataFlowAction[SparkFlowContext]], tags: DataFlowTagState): DataFlow[SparkFlowContext]

    Permalink

    All new states of the dataflow must be created via this factory method.

    All new states of the dataflow must be created via this factory method. This will allow specific dataflows to pass their specific context objects into new state.

    in

    - input entities for the next state

    ac

    - actions for the next state

    returns

    - new instance of the implementing class

    Attributes
    protected
    Definition Classes
    DataFlow
  5. abstract def inputs: DataFlowEntities

    Permalink

    Inputs that were explicitly set or produced by previous actions, these are inputs for all following actions.

    Inputs that were explicitly set or produced by previous actions, these are inputs for all following actions. Inputs are preserved in the data flow state, even if they are no longer required by the remaining actions. //TODO: explore the option of removing the inputs that are no longer required by remaining actions!!!

    Definition Classes
    DataFlow
  6. abstract val spark: SparkSession

    Permalink
  7. abstract def sqlTables: Set[String]

    Permalink

    Execution of the flow is lazy, but registration of the datasets as sql tables can only happen when data set is created.

    Execution of the flow is lazy, but registration of the datasets as sql tables can only happen when data set is created. With multiple threads consuming same table, registration of the data set as an sql table needs to happen in synchronised code.

    Labels that need to be registered as temp spark views before the execution starts. This is necessary if they are to be reused by multiple parallel threads.

  8. abstract def tagState: DataFlowTagState

    Permalink
    Definition Classes
    DataFlow
  9. abstract def tempFolder: Option[Path]

    Permalink

    Folder into which the temp data will be saved before commit into the output storage: folders, RDBMs, Key Value tables.

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addAction(action: DataFlowAction[SparkFlowContext]): SparkDataFlow.this.type

    Permalink

    Creates new state of the dataflow by adding an action to it.

    Creates new state of the dataflow by adding an action to it.

    action

    - action to add

    returns

    - new state with action

    Definition Classes
    DataFlow
    Exceptions thrown

    DataFlowException when: 1) at least one of the input labels is not present in the inputs 2) at least one of the input labels is not present in the outputs of existing actions

  5. def addInput(label: String, value: Option[Any]): SparkDataFlow.this.type

    Permalink

    Creates new state of the dataflow by adding an input.

    Creates new state of the dataflow by adding an input. Duplicate labels are handled in prepareForExecution()

    label

    - name of the input

    value

    - values of the input

    returns

    - new state with the input

    Definition Classes
    DataFlow
  6. def addInterceptor(interceptor: InterceptorAction[SparkFlowContext], guidToIntercept: String): SparkDataFlow.this.type

    Permalink

    Creates new state of the data flow by replacing the action that is intercepted with action that intercepts it.

    Creates new state of the data flow by replacing the action that is intercepted with action that intercepts it. The action to replace will differ from the intercepted action in the InterceptorAction in the case of replacing an existing InterceptorAction

    Definition Classes
    DataFlow
  7. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def executed(executed: DataFlowAction[SparkFlowContext], outputs: Seq[Option[Any]]): DataFlow[SparkFlowContext]

    Permalink

    Creates new state of the dataflow by removing executed action from the actions list and adds its outputs to the inputs.

    Creates new state of the dataflow by removing executed action from the actions list and adds its outputs to the inputs.

    executed

    - executed actions

    outputs

    - outputs of the executed action

    returns

    - next stage data flow without the executed action, but with its outpus as inputs

    Definition Classes
    SparkDataFlowDataFlow
    Exceptions thrown

    DataFlowException if number of provided outputs is not equal to the number of output labels of the action

  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. val flowContext: SparkFlowContext

    Permalink
    Definition Classes
    SparkDataFlowDataFlow
  14. def getActionByGuid(actionGuid: String): DataFlowAction[SparkFlowContext]

    Permalink

    Guids are unique, find action by guid

    Guids are unique, find action by guid

    Definition Classes
    DataFlow
  15. def getActionByOutputLabel(outputLabel: String): DataFlowAction[SparkFlowContext]

    Permalink

    Output labels are unique.

    Output labels are unique. Finds action that produces outputLabel.

    Definition Classes
    DataFlow
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  19. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  20. def isValidFlowDAG: Try[Unit]

    Permalink

    Flow DAG is valid iff: 1.

    Flow DAG is valid iff: 1. All output labels and existing input labels unique 2. Each action depends on labels that are produced by actions or already present in inputs 3. Active tags is empty 4. Active dependencies is zero 5. No cyclic dependencies in labels 6. No cyclic dependencies in tags 7. No cyclic dependencies in label tag combination

    Definition Classes
    DataFlow
  21. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  22. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  23. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  24. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  25. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  26. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  27. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  28. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  29. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  30. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  31. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  32. def map[R >: SparkDataFlow.this.type](f: (SparkDataFlow.this.type) ⇒ R): R

    Permalink

    Transforms the current dataflow by applying a function to it.

    Transforms the current dataflow by applying a function to it.

    f

    A function that transforms a dataflow object

    returns

    New dataflow

    Definition Classes
    DataFlow
  33. def mapOption[R >: SparkDataFlow.this.type](f: (SparkDataFlow.this.type) ⇒ Option[R]): R

    Permalink

    Optionally transform a dataflow depending on the output of the applying function.

    Optionally transform a dataflow depending on the output of the applying function. If the transforming function returns a None then the original dataflow is returned.

    f

    A function that returns an Option[DataFlow]

    returns

    DataFlow object that may have been transformed

    Definition Classes
    DataFlow
  34. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  35. def nextRunnable(): Seq[DataFlowAction[SparkFlowContext]]

    Permalink

    Returns actions that are ready to run: 1.

    Returns actions that are ready to run: 1. have no input labels; 2. whose inputs have been created 3. all actions whose dependent tags have been run

    will not include actions that are skipped.

    Definition Classes
    DataFlow
  36. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  38. def prepareForExecution(): SparkDataFlow.this.type

    Permalink

    A function called just before the flow is executed.

    A function called just before the flow is executed. By default, this function has just checks the tagging state of the flow, and could be overloaded to have implementation specific preparation steps. An overloaded function should call this function first. It would be responsible for preparing an execution environment such as cleaning temporary directories.

    Definition Classes
    SparkDataFlowDataFlow
  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  40. def tag[S <: DataFlow[SparkFlowContext]](tags: String*)(taggedFlow: (SparkDataFlow.this.type) ⇒ S): SparkDataFlow.this.type

    Permalink

    Tag all actions added during the taggedFlow lambda function with any given number of tags.

    Tag all actions added during the taggedFlow lambda function with any given number of tags. These tags can then be used by the tagDependency() action to create a dependency in the running order of actions by tag.

    tags

    Tags to apply to added actions

    taggedFlow

    An intermediate flow that actions can be added to that will be be marked with the tag

    Definition Classes
    DataFlow
  41. def tagDependency[S <: DataFlow[SparkFlowContext]](depTags: String*)(tagDependentFlow: (SparkDataFlow.this.type) ⇒ S): SparkDataFlow.this.type

    Permalink

    Mark all actions added during the tagDependentFlow lambda function as having a dependency on the tags provided.

    Mark all actions added during the tagDependentFlow lambda function as having a dependency on the tags provided. These actions will only be run once all tagged actions have finished.

    depTags

    Tags to create a dependency on

    tagDependentFlow

    An intermediate flow that actions can be added to that will depended on tagged actions to have completed before running

    Definition Classes
    DataFlow
  42. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from DataFlow[SparkFlowContext]

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped