コード例 #1
0
  private InProcessEvaluationContext(
      InProcessPipelineOptions options,
      BundleFactory bundleFactory,
      Collection<AppliedPTransform<?, ?, ?>> rootTransforms,
      Map<PValue, Collection<AppliedPTransform<?, ?, ?>>> valueToConsumers,
      Map<AppliedPTransform<?, ?, ?>, String> stepNames,
      Collection<PCollectionView<?>> views) {
    this.options = checkNotNull(options);
    this.bundleFactory = checkNotNull(bundleFactory);
    checkNotNull(rootTransforms);
    checkNotNull(valueToConsumers);
    checkNotNull(stepNames);
    checkNotNull(views);
    this.stepNames = stepNames;

    this.watermarkManager =
        InMemoryWatermarkManager.create(
            NanosOffsetClock.create(), rootTransforms, valueToConsumers);
    this.sideInputContainer = InProcessSideInputContainer.create(this, views);

    this.applicationStateInternals = new ConcurrentHashMap<>();
    this.mergedCounters = new CounterSet();

    this.callbackExecutor = WatermarkCallbackExecutor.create(Executors.newSingleThreadExecutor());
  }