コード例 #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());
  }
コード例 #2
0
 /**
  * Returns a {@link ReadyCheckingSideInputReader} capable of reading the provided {@link
  * PCollectionView PCollectionViews}.
  *
  * @param sideInputs the {@link PCollectionView PCollectionViews} the result should be able to
  *     read
  * @return a {@link SideInputReader} that can read all of the provided {@link PCollectionView
  *     PCollectionViews}
  */
 public ReadyCheckingSideInputReader createSideInputReader(
     final List<PCollectionView<?>> sideInputs) {
   return sideInputContainer.createReaderForViews(sideInputs);
 }