@Beta public interface StageContext extends ServiceDiscoverer, MetadataReader, MetadataWriter, LineageRecorder
Modifier and Type | Method and Description |
---|---|
Arguments |
getArguments()
Return the pipeline arguments for this run.
|
default FailureCollector |
getFailureCollector()
Returns a failure collector for the stage.
|
io.cdap.cdap.api.data.schema.Schema |
getInputSchema()
Return the input schema for the stage.
|
Map<String,io.cdap.cdap.api.data.schema.Schema> |
getInputSchemas()
Return the input schemas for the stage.
|
default List<String> |
getInputStages()
Return the input stage names.
|
long |
getLogicalStartTime()
Returns the logical start time of the batch.
|
StageMetrics |
getMetrics()
Get an instance of
StageMetrics , used to collect metrics for this stage. |
String |
getNamespace()
Gets the namespace of the pipeline.
|
Map<String,io.cdap.cdap.api.data.schema.Schema> |
getOutputPortSchemas()
Return the output port schemas for the stage.
|
io.cdap.cdap.api.data.schema.Schema |
getOutputSchema()
Return the output schema of the stage, as set by this stage when the pipeline was deployed.
|
String |
getPipelineName()
Gets the name of the pipeline.
|
PluginProperties |
getPluginProperties()
Gets the
PluginProperties associated with the stage. |
PluginProperties |
getPluginProperties(String pluginId)
Gets the
PluginProperties associated with the given plugin id. |
String |
getStageName()
Gets the unique stage name.
|
<T> Class<T> |
loadPluginClass(String pluginId)
Loads and returns a plugin class as specified by the given plugin id.
|
<T> T |
newPluginInstance(String pluginId)
Creates a new instance of a plugin.
|
getServiceURL, getServiceURL, getServiceURL, openConnection
getMetadata, getMetadata
addProperties, addTags, addTags, removeMetadata, removeProperties, removeProperties, removeTags, removeTags
record
String getStageName()
String getNamespace()
String getPipelineName()
long getLogicalStartTime()
StageMetrics getMetrics()
StageMetrics
, used to collect metrics for this stage. Metrics emitted from one stage
are independent from metrics emitted in another.StageMetrics
for collecting metricsPluginProperties getPluginProperties()
PluginProperties
associated with the stage.PluginProperties
.PluginProperties getPluginProperties(String pluginId)
PluginProperties
associated with the given plugin id.pluginId
- the unique identifier provide when declaring plugin usage in the program.PluginProperties
.IllegalArgumentException
- if pluginId is not foundUnsupportedOperationException
- if the program does not support plugin<T> Class<T> loadPluginClass(String pluginId)
T
- the class type of the pluginpluginId
- the unique identifier provide when declaring plugin usage in the program.Class
.IllegalArgumentException
- if pluginId is not foundUnsupportedOperationException
- if the program does not support plugin<T> T newPluginInstance(String pluginId) throws InstantiationException
PluginConfig
setup with
PluginProperties
provided at the time when the
PluginConfigurer.usePlugin(String, String, String, PluginProperties)
was called during the
program configuration time.T
- the class type of the pluginpluginId
- the unique identifier provide when declaring plugin usage in the program.InstantiationException
- if failed create a new instanceIllegalArgumentException
- if pluginId is not foundUnsupportedOperationException
- if the program does not support plugin@Nullable io.cdap.cdap.api.data.schema.Schema getInputSchema()
Map<String,io.cdap.cdap.api.data.schema.Schema> getInputSchemas()
default List<String> getInputStages()
@Nullable io.cdap.cdap.api.data.schema.Schema getOutputSchema()
Map<String,io.cdap.cdap.api.data.schema.Schema> getOutputPortSchemas()
MultiOutputPipelineConfigurable
.
Stages that do not implement MultiOutputPipelineConfigurable
should not use this method. If they do,
an empty map will be returned.Arguments getArguments()
default FailureCollector getFailureCollector()
UnsupportedOperationException
- if the implementation does not override this methodCopyright © 2021 Cask Data, Inc. Licensed under the Apache License, Version 2.0.