internal StreamingInputStage(DataSource <R> source, Placement placement, InternalComputation internalComputation, string inputName) { this.inputName = inputName; this.stage = Foundry.NewStage(new TimeContext <Epoch>(internalComputation.ContextManager.RootContext), (i, v) => new StreamingInputVertex <R>(i, v), this.inputName); this.output = stage.NewOutput(vertex => vertex.output); this.stage.Materialize(); this.localVertices = placement.Where(x => x.ProcessId == internalComputation.Controller.Configuration.ProcessID) .Select(x => this.stage.GetVertex(x.VertexId) as StreamingInputVertex <R>) .ToArray(); source.RegisterInputs(this.localVertices); this.completedCalled = false; this.hasActivatedProgressTracker = false; // results in pointstamp comparisons which assert w/o this. this.InternalComputation.Reachability.UpdateReachabilityPartialOrder(internalComputation); this.InternalComputation.Reachability.DoNotImpersonate(stage.StageId); var initialVersion = new Runtime.Progress.Pointstamp(stage.StageId, new int[] { 0 }); internalComputation.ProgressTracker.BroadcastProgressUpdate(initialVersion, placement.Count); }