Class PiperContext
java.lang.Object
com.atgenomix.seqslab.piper.plugin.api.PiperContext
- All Implemented Interfaces:
Serializable
An object used in all operations of a workflow task execution. It represents a persistent set of properties,
including Spark session, pipeline configurations, and environment context.
A piper context object is first created when a workflow task is requested and then used to lazily
initialize all registered SeqsLab
PiperPlugin
, each of which returns its PluginContext
in order to later initialize its invoked pipeline Operator
.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionorg.apache.spark.sql.SparkSession
An entry point for operators to work with DataFrame and Dataset. -
Constructor Summary
ModifierConstructorDescriptionprotected
PiperContext
(org.apache.spark.sql.SparkSession spark, Pipeline pipeline) Creates a context object with the specified Spark session and pipeline configuration. -
Method Summary
Modifier and TypeMethodDescriptiongetConf()
Get the information of execution environment and configuration.getDataset
(String fqn) Obtain the dataset object value of an input variable identified by fully-qualified name.Obtain the pipeline task of an input or output variable identified by fully-qualified name.
-
Field Details
-
spark
public org.apache.spark.sql.SparkSession sparkAn entry point for operators to work with DataFrame and Dataset.
-
-
Constructor Details
-
PiperContext
Creates a context object with the specified Spark session and pipeline configuration.- Parameters:
spark
- Spark session for operators to work with DataFrame and Dataset.pipeline
- A persistent configuration of a workflow task request.
-
-
Method Details
-
getConf
Get the information of execution environment and configuration.- Returns:
- A map of NamedValue properties
-
getDataset
Obtain the dataset object value of an input variable identified by fully-qualified name.- Parameters:
fqn
- The fully-qualified name of an input variable, e.g. myworkflow.task.ref.- Returns:
- The dataset object value or null if not found.
-
getTask
Obtain the pipeline task of an input or output variable identified by fully-qualified name.- Parameters:
fqn
- The fully-qualified name of an input or output variable, e.g. myworkflow.task.fastqR1.- Returns:
- The pipeline task object or null if not found.
-