internal StreamingInputStage(DataSource <R> source, Placement placement, Runtime.InternalGraphManager graphManager, string inputName) { this.inputName = inputName; this.stage = Foundry.NewStage(new OpaqueTimeContext <Epoch>(graphManager.ContextManager.RootContext), (i, v) => new StreamingInputVertex <R>(i, v), this.inputName); this.output = stage.NewOutput(shard => shard.output); this.stage.Materialize(); this.localShards = placement.Where(x => x.ProcessId == graphManager.Controller.Configuration.ProcessID) .Select(x => this.stage.GetShard(x.VertexId) as StreamingInputVertex <R>) .ToArray(); source.RegisterInputs(this.localShards); this.completedCalled = false; this.hasActivatedProgressTracker = false; // results in pointstamp comparisons which assert w/o this. this.InternalGraphManager.Reachability.UpdateReachabilityPartialOrder(graphManager); this.InternalGraphManager.Reachability.DoNotImpersonate(stage.StageId); var initialVersion = new Scheduling.Pointstamp(stage.StageId, new int[] { 0 }); graphManager.ProgressTracker.BroadcastProgressUpdate(initialVersion, placement.Count); }
public int Populate(ref Scheduling.Pointstamp version) { if (version.Timestamp.Length == Timestamp.Length) { for (int i = 0; i < version.Timestamp.Length; i++) { version.Timestamp[i] = Timestamp[i]; } } return(Timestamp.Length); }
public Pointstamp InitializeFrom(Scheduling.Pointstamp version, int length) { throw new Exception("Not implemented"); }