Class

com.alpine.plugin.core.spark.templates

TemplatedSparkDataFrameJob

Related Doc: package templates

Permalink

abstract class TemplatedSparkDataFrameJob[ReturnType, OutputType <: IOBase] extends SparkIOTypedPluginJob[HdfsTabularDataset, OutputType]

Templated base for Spark plugin jobs operating on DataFrames. Most jobs will want to use SparkDataFrameJob which takes and returns Spark DataFrames. This version does not support schema inference.

ReturnType

The return type of the transformation method (most commonly a DataFrame)

OutputType

The return type of the actual operator, extending IOBase. Most commonly will be an HDFS dataset of some flavor (see SparkDataFrame)

Linear Supertypes
SparkIOTypedPluginJob[HdfsTabularDataset, OutputType], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TemplatedSparkDataFrameJob
  2. SparkIOTypedPluginJob
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TemplatedSparkDataFrameJob()

    Permalink

Abstract Value Members

  1. abstract def saveResults(results: ReturnType, sparkUtils: SparkRuntimeUtils, storageFormat: HdfsStorageFormatType, compressionType: HdfsCompressionType, path: String, overwrite: Boolean, addendum: Map[String, AnyRef] = Map[String, AnyRef](), tSVAttributes: TSVAttributes): OutputType

    Permalink

    Write the results to the target path

    Write the results to the target path

    results

    - the data to write

    sparkUtils

    - Spark utils object with utility methods to write data and transform between Alpine header types and Spark SQL schema types

    storageFormat

    - HdfsStorageFormat

    compressionType

    - HdfsCompressionType

    path

    full HDFS output path

    overwrite

    Boolean indicating whether to overwrite existing results at that location.

  2. abstract def transformWithAddendum(operatorParameters: OperatorParameters, dataFrame: DataFrame, sparkUtils: SparkRuntimeUtils, listener: OperatorListener): (ReturnType, Map[String, AnyRef])

    Permalink

    Define the transformation from the input dataset, expressed as a dataFrame, where the schema corresponds to the Alpine column header to the output dataset, of type 'ReturnType'.

    Define the transformation from the input dataset, expressed as a dataFrame, where the schema corresponds to the Alpine column header to the output dataset, of type 'ReturnType'. In addition return a map of type String -> AnyRef (Object in java) which will be added to the output and used in the GUI node to return additional output or define visualization. Default implementation returns the input DataFrame with no Addendum information. If you use this version schema inference will not work.

    dataFrame

    - the input data

    sparkUtils

    - a sparkUtils object including the Spark context

    listener

    - the operator listener object which can be used to print messages to the GUI.

    returns

    the output DataFrame and a map containing the keys and values to add to the output

    Annotations
    @throws( ... )

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. final def asInstanceOf[T0]: T0

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

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  15. def onExecution(alpineSparkEnvironment: AlpineSparkEnvironment, input: HdfsTabularDataset, operatorParameters: OperatorParameters, listener: OperatorListener): OutputType

    Permalink

    The driver function for the Spark job.

    The driver function for the Spark job. Unlike the corresponding function in the parent class, this function allows you to work with IOBase types directly. YOU MUST Override one of the two 'onExecution' methods.

    alpineSparkEnvironment

    Information about the spark job including the Spark session (unified spark context) created when job was submitted

    input

    the ioBase object which you have defined as the input to your plugin. For example, if the GUI node of the plugin takes an HDFSTabularDataset, this input parameter will be that dataset.

    operatorParameters

    -the parameter values set in the GUI node. Their value can be accessed via the "key" defined for each parameter added to the OperatorDialog in the GUI node.

    listener

    a listener object which allows you to send messages to the Alpine GUI during the Spark job

    returns

    the output of your plugin

    Definition Classes
    TemplatedSparkDataFrameJobSparkIOTypedPluginJob
    Annotations
    @throws( ... )
  16. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from SparkIOTypedPluginJob[HdfsTabularDataset, OutputType]

Inherited from AnyRef

Inherited from Any

Ungrouped