public void createOutput() { Thread.Sleep(interval); executor.setInput(input.tuplesArray); output.tuplesArray = executor.execute(); output.originOPType = information.type; Console.WriteLine("OUTPUTS: ----------"); output.showAll(); LogService.log("Operator: outputs", true); foreach (Tuple s in output.tuplesArray) { LogService.log("Operator: output " + s.ToString(), true); } uploadToOutputs(); }
/** * Connect to the input. This can either be a file or another operator. */ public void connectToInput() { printStatus(); // Collect all input Tuples from all input sources foreach (string operatorInput in information.inputsource) { if (isOperator(operatorInput)) //operator in format OP1, OP2, ..., OPn { // Wait until signalled that the input is uploaded by the inputOperator EventWaitHandle inputReadySignaller = new EventWaitHandle(false, EventResetMode.AutoReset, operatorInput + information.name + information.port); inputReadySignaller.WaitOne(); } else // input file { while (isreplicaIDuploaded == false) { Thread.Sleep(200); } Console.WriteLine("replicaID = " + replicaID); input.addToList(connectToFile(operatorInput)); } } informationUploaded = true; Console.WriteLine("INPUTS: --------"); input.showAll(); LogService.log("Operator: inputs", true); foreach (Tuple s in input.tuplesArray) { LogService.log("Operator: input " + s.ToString(), true); } //chronological logic checkIfFreeze(); checkIfStart(); checkIfFreeze(); createOutput(); }