Search in sources :

Example 1 with JetMetricsContainer

use of org.apache.beam.runners.jet.metrics.JetMetricsContainer in project beam by apache.

the class AbstractParDoP method init.

@Override
public void init(@Nonnull Outbox outbox, @Nonnull Context context) {
    this.outbox = outbox;
    this.metricsContainer = new JetMetricsContainer(stepId, ownerId, context);
    doFnInvoker = DoFnInvokers.tryInvokeSetupFor(doFn, pipelineOptions.get());
    if (ordinalToSideInput.isEmpty()) {
        sideInputReader = NullSideInputReader.of(Collections.emptyList());
    } else {
        bufferedItems = new SimpleInbox();
        sideInputHandler = new SideInputHandler(ordinalToSideInput.values(), InMemoryStateInternals.forKey(null));
        sideInputReader = sideInputHandler;
    }
    outputManager = new JetOutputManager(outbox, outputCoders, outputCollToOrdinals);
    doFnRunner = getDoFnRunner(pipelineOptions.get(), doFn, sideInputReader, outputManager, mainOutputTag, Lists.newArrayList(outputCollToOrdinals.keySet()), inputValueCoder, outputValueCoders, windowingStrategy, doFnSchemaInformation, sideInputMapping);
}
Also used : JetMetricsContainer(org.apache.beam.runners.jet.metrics.JetMetricsContainer) SideInputHandler(org.apache.beam.runners.core.SideInputHandler)

Aggregations

SideInputHandler (org.apache.beam.runners.core.SideInputHandler)1 JetMetricsContainer (org.apache.beam.runners.jet.metrics.JetMetricsContainer)1