1
2
3 package org.galagosearch.tupleflow.execution;
4
5 import java.util.ArrayList;
6 import java.util.concurrent.Future;
7
8 /***
9 * This executor has no practical use at all. It's only here to make it easy
10 * to test the RemoteExecutor base class.
11 *
12 * This executor is essentially the same as the LocalStageExecutor in that
13 * it runs everything in a single thread, but it serializes the job information
14 * and then reads it again.
15 *
16 * @author trevor
17 */
18 public class LocalRemoteStageExecutor extends RemoteStageExecutor {
19 public StageExecutionStatus submit(String stageName, ArrayList<String> jobPaths, String temporary) {
20 StageExecutionStatus status = null;
21
22 for (String jobPath : jobPaths) {
23 status = new LocalStageExecutor().execute(jobPath);
24
25 if (status.getExceptions().size() > 0) {
26 return status;
27 }
28 }
29
30 return status;
31 }
32
33 public void shutdown() {
34 }
35 }