@Beta public interface StageContext
| Modifier and Type | Method and Description |
|---|---|
StageMetrics |
getMetrics()
Get an instance of
StageMetrics, used to collect metrics for this stage. |
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 of the transform, useful for setting the context of logging in transforms.
|
<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.
|
String getStageName()
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 pluginCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.