Search in sources :

Example 1 with TrackedMultiOutputTransform

use of io.cdap.cdap.etl.common.TrackedMultiOutputTransform in project cdap by caskdata.

the class TransformExecutorFactory method getMultiOutputTransform.

private <IN, ERROR> TrackedMultiOutputTransform<IN, ERROR> getMultiOutputTransform(StageSpec stageSpec) throws Exception {
    String stageName = stageSpec.getName();
    SplitterTransform<IN, ERROR> splitterTransform = pluginInstantiator.newPluginInstance(stageName, macroEvaluator);
    TransformContext transformContext = createRuntimeContext(stageSpec);
    splitterTransform.initialize(transformContext);
    StageMetrics stageMetrics = new DefaultStageMetrics(metrics, stageName);
    StageStatisticsCollector collector = collectStageStatistics ? getStatisticsCollector(stageName) : NoopStageStatisticsCollector.INSTANCE;
    return new TrackedMultiOutputTransform<>(splitterTransform, stageMetrics, getDataTracer(stageName), collector);
}
Also used : TransformContext(io.cdap.cdap.etl.api.TransformContext) StageStatisticsCollector(io.cdap.cdap.etl.common.StageStatisticsCollector) NoopStageStatisticsCollector(io.cdap.cdap.etl.common.NoopStageStatisticsCollector) StageMetrics(io.cdap.cdap.etl.api.StageMetrics) DefaultStageMetrics(io.cdap.cdap.etl.common.DefaultStageMetrics) TrackedMultiOutputTransform(io.cdap.cdap.etl.common.TrackedMultiOutputTransform) DefaultStageMetrics(io.cdap.cdap.etl.common.DefaultStageMetrics)

Example 2 with TrackedMultiOutputTransform

use of io.cdap.cdap.etl.common.TrackedMultiOutputTransform in project cdap by cdapio.

the class TransformExecutorFactory method getMultiOutputTransform.

private <IN, ERROR> TrackedMultiOutputTransform<IN, ERROR> getMultiOutputTransform(StageSpec stageSpec) throws Exception {
    String stageName = stageSpec.getName();
    SplitterTransform<IN, ERROR> splitterTransform = pluginInstantiator.newPluginInstance(stageName, macroEvaluator);
    TransformContext transformContext = createRuntimeContext(stageSpec);
    splitterTransform.initialize(transformContext);
    StageMetrics stageMetrics = new DefaultStageMetrics(metrics, stageName);
    StageStatisticsCollector collector = collectStageStatistics ? getStatisticsCollector(stageName) : NoopStageStatisticsCollector.INSTANCE;
    return new TrackedMultiOutputTransform<>(splitterTransform, stageMetrics, getDataTracer(stageName), collector);
}
Also used : TransformContext(io.cdap.cdap.etl.api.TransformContext) StageStatisticsCollector(io.cdap.cdap.etl.common.StageStatisticsCollector) NoopStageStatisticsCollector(io.cdap.cdap.etl.common.NoopStageStatisticsCollector) StageMetrics(io.cdap.cdap.etl.api.StageMetrics) DefaultStageMetrics(io.cdap.cdap.etl.common.DefaultStageMetrics) TrackedMultiOutputTransform(io.cdap.cdap.etl.common.TrackedMultiOutputTransform) DefaultStageMetrics(io.cdap.cdap.etl.common.DefaultStageMetrics)

Aggregations

StageMetrics (io.cdap.cdap.etl.api.StageMetrics)2 TransformContext (io.cdap.cdap.etl.api.TransformContext)2 DefaultStageMetrics (io.cdap.cdap.etl.common.DefaultStageMetrics)2 NoopStageStatisticsCollector (io.cdap.cdap.etl.common.NoopStageStatisticsCollector)2 StageStatisticsCollector (io.cdap.cdap.etl.common.StageStatisticsCollector)2 TrackedMultiOutputTransform (io.cdap.cdap.etl.common.TrackedMultiOutputTransform)2