Class DataPipelineStagePluginBase
- Namespace
- FoundationaLLM.Common.Services.Plugins
- Assembly
- FoundationaLLM.Common.dll
Implements a basic Data Pipeline Stage Plugin.
public class DataPipelineStagePluginBase : PluginBase, IDataPipelineStagePlugin
- Inheritance
-
DataPipelineStagePluginBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
DataPipelineStagePluginBase(Dictionary<string, object>, IPluginPackageManager, IPluginPackageManagerResolver, IServiceProvider)
Initializes a new instance of the base data pipeline stage plugin.
public DataPipelineStagePluginBase(Dictionary<string, object> pluginParameters, IPluginPackageManager packageManager, IPluginPackageManagerResolver packageManagerResolver, IServiceProvider serviceProvider)
Parameters
pluginParameters
Dictionary<string, object>packageManager
IPluginPackageManagerpackageManagerResolver
IPluginPackageManagerResolverThe package manager resolver for the plugin.
serviceProvider
IServiceProvider
Fields
_dataPipelineStateService
The data pipeline state service.
protected readonly IDataPipelineStateService _dataPipelineStateService
Field Value
_hasher
The hasher used to identify identical text content.
protected readonly XxHash128 _hasher
Field Value
Methods
ComputeHash(string)
Computes a hexadecimal hash string for the specified input using the current hashing algorithm.
protected string ComputeHash(string input)
Parameters
Returns
- string
A lowercase hexadecimal string representing the computed hash of the input.
GetStageWorkItems(DataPipelineDefinition, DataPipelineRun, List<string>, string, string)
Gets the list of data pipeline work items based on the provided content items canonical identifiers.
public virtual Task<List<DataPipelineRunWorkItem>> GetStageWorkItems(DataPipelineDefinition dataPipelineDefinition, DataPipelineRun dataPipelineRun, List<string> contentItemsCanonicalIds, string dataPipelineStageName, string previousDataPipelineStageName)
Parameters
dataPipelineDefinition
DataPipelineDefinitionThe definition of the data pipeline.
dataPipelineRun
DataPipelineRunThe data pipeline run.
contentItemsCanonicalIds
List<string>The list of icontent items canonical identifiers.
dataPipelineStageName
stringThe name of the data pipeline stage.
previousDataPipelineStageName
stringThe name of the previous data pipeline stage.
Returns
- Task<List<DataPipelineRunWorkItem>>
A list of data pipeline work items.
GetStartingStageWorkItems(DataPipelineDefinition, DataPipelineRun, List<DataPipelineContentItem>, string)
Gets the list of data pipeline work items based on the provided content items.
public virtual Task<List<DataPipelineRunWorkItem>> GetStartingStageWorkItems(DataPipelineDefinition dataPipelineDefinition, DataPipelineRun dataPipelineRun, List<DataPipelineContentItem> contentItems, string dataPipelineStageName)
Parameters
dataPipelineDefinition
DataPipelineDefinitionThe definition of the data pipeline.
dataPipelineRun
DataPipelineRunThe data pipeline run.
contentItems
List<DataPipelineContentItem>The list of content items.
dataPipelineStageName
stringThe name of the data pipeline stage.
Returns
- Task<List<DataPipelineRunWorkItem>>
A list of data pipeline work items.
ProcessWorkItem(DataPipelineDefinition, DataPipelineRun, DataPipelineRunWorkItem)
Processes a specified data pipeline run work item.
public virtual Task<PluginResult> ProcessWorkItem(DataPipelineDefinition dataPipelineDefinition, DataPipelineRun dataPipelineRun, DataPipelineRunWorkItem dataPipelineRunWorkItem)
Parameters
dataPipelineDefinition
DataPipelineDefinitionThe definition of the data pipeline associated with the data pipeline run work item.
dataPipelineRun
DataPipelineRunThe data pipeline run associated with the data pipeline run work item.
dataPipelineRunWorkItem
DataPipelineRunWorkItemThe data pipeline run work item to process.
Returns
- Task<PluginResult>
An object that contains the processing result.