public Computation FinishComputation() { var computation = Computation; Computation = null; Status = RunnerStatus.Idle; return computation; }
public void StartComputation(Computation computation) { Status = RunnerStatus.Running; Computation = computation; Computation.Worker = Id; Connector.StartComputation(computation); }
public void StartComputation(Computation computation) { lock (controllerLock) { currentComputation = computation; var dataSourceConfig = computation.DataSetDefinition; var partitioner = dataSource.GetDataPartitioner(dataSourceConfig); var partitions = partitioner.Partition(dataSourceConfig, computation.PartitionSize); foreach (var dataPartition in partitions) { var computationPartition = new Computation(); computationPartition.Algorithm = computation.Algorithm; computationPartition.Parameters = computation.Parameters; computationPartition.DataSetDefinition = dataPartition; todo.Enqueue(computationPartition); } computationInProgress = true; Console.WriteLine("Computation started with {0} tasks.", todo.Count); } }
public void StartComputation(Computation computation) { Console.WriteLine("Calling start computation on node... " + computation.Serialize()); serviceInterface.Post(computation, "/doComputation"); }