19 | | A job consists of a number of steps which consists of a number of operation. The entire data model explanation is available [http://www.molgenis.org/wiki/ComputeDataModel here]. Operation are submitted to the Worker on the cluster in the loop. |
| 19 | A job consists of a number of steps which consists of a number of operation. The entire data model explanation is available [http://www.molgenis.org/wiki/ComputeDataModel here]. Every job is running in the separate thread ([http://www.molgenis.org/svn/sandbox/molgenis_processing/3.3.galaxy/ScriptbasedComputePlatform/src/scriptserver/PipelineThread.java PipelineThread]) Operation are submitted to a Worker on the cluster in the loop using the gridgain executor service. |
| 20 | |
| 21 | {{{ |
| 22 | ExecutorService exec = grid.newGridExecutorService(); |
| 23 | |
| 24 | int numberOfSteps = pipeline.getNumberOfSteps(); |
| 25 | ... |
| 26 | |
| 27 | for (int i = 0; i < numberOfSteps; i++) |
| 28 | { |
| 29 | Step step = pipeline.getStep(i); |
| 30 | |
| 31 | for (int j = 0; j < step.getNumberOfScripts(); j++) |
| 32 | { |
| 33 | Script script = step.getScript(j); |
| 34 | |
| 35 | Future<RemoteResult> future = exec.submit(new RemoteScriptSubmitter(script)); |
| 36 | |
| 37 | RemoteResult back = null; |
| 38 | try |
| 39 | { |
| 40 | back = future.get(); |
| 41 | } |
| 42 | ... |
| 43 | |
| 44 | }}} |
| 45 | |