Interface PiperPlugin


@DeveloperApi public interface PiperPlugin
A plugin that can be dynamically loaded into a SeqsLab piper application. Plugins can be loaded by adding the plugin's class name to the appropriate SeqsLab configuration with Spark conf, e.g. --conf seqslab.piper.plugins=org.bio.WGSPipelinePlugin.
  • Method Details

    • init

      default PluginContext init(PiperContext context)
      Initialize the plugin.
      Parameters:
      context - Additional context about the SeqsLab application where the plugin is running.
      Returns:
      A plugin-specific context that is used to initialize plugin-specific operators.
    • registerLoaders

      default Map<String,LoaderSupport> registerLoaders()
      Register loader operators published by the plugin with SeqsLab piper system.
      Returns:
      A map of uniquely-named operator factory that will be registered into operator registry. The operator factory is used to created dataset loading operators when pipeline task requests.
    • registerTransformers

      default Map<String,TransformerSupport> registerTransformers()
      Register partitioning operators published by the plugin with SeqsLab piper system.
      Returns:
      A map of uniquely-named operator factory that will be registered into operator registry. The operator factory is used to created dataset partitioning operators when pipeline task requests.
    • registerFormatters

      default Map<String,FormatterSupport> registerFormatters()
      Register format transformation operators published by the plugin with SeqsLab piper system.
      Returns:
      A map of uniquely-named operator factory that will be registered into operator registry. The operator factory is used to created dataset format transformation operators when pipeline task requests.
    • registerExecutors

      default Map<String,ExecutorSupport> registerExecutors()
      Register executing operators published by the plugin with SeqsLab piper system.
      Returns:
      A map of uniquely-named operator factory that will be registered into operator registry. The operator factory is used to created operators that prepares datasets for task command execution when pipeline task requests.
    • registerCollectors

      default Map<String,CollectorSupport> registerCollectors()
      Register dataset collecting operators published by the plugin with SeqsLab piper system.
      Returns:
      A map of uniquely-named operator factory that will be registered into operator registry. The operator factory is used to created operators that collects output files or datasets after task command execution is complete when pipeline task requests.
    • registerWriters

      default Map<String,WriterSupport> registerWriters()
      Register dataset saving operators published by the plugin with SeqsLab piper system.
      Returns:
      A map of uniquely-named operator factory that will be registered into operator registry. The operator factory is used to created operators that save task command output files or collected datasets to specific storages when pipeline task requests.
    • registerUDFs

      default Map<String,org.apache.spark.sql.expressions.UserDefinedFunction> registerUDFs()
      Register UserDefinedFunction (UDF) published by the plugin with SeqsLab piper system.
      Returns:
      A map of uniquely-named udf that will be registered into sparkSession.
    • registerUDAFs

      default Map<String,org.apache.spark.sql.expressions.UserDefinedFunction> registerUDAFs()
      Register UDAF as UserDefinedFunction published by the plugin using functions.udaf()
      Returns:
      A map of uniquely-named user defined function that will be registered into sparkSession.