Search in sources :

Example 1 with SourceOperator

use of io.dingodb.exec.operator.SourceOperator in project dingo by dingodb.

the class TaskImpl method run.

public void run() {
    log.info("Task is starting at {}...", location);
    runList.forEach(id -> {
        final Operator operator = operators.get(id);
        assert operator instanceof SourceOperator : "Operators in run list must be source operator.";
        executorService.execute(() -> {
            try {
                while (operator.push(0, null)) {
                    log.info("Operator {} need another pushing.", operator.getId());
                }
                operator.fin(0, null);
            } catch (RuntimeException e) {
                e.printStackTrace();
                log.error("Operator:{} run catch Exception:{}", operator.getId(), e.toString(), e);
            }
        });
    });
}
Also used : AbstractOperator(io.dingodb.exec.operator.AbstractOperator) SourceOperator(io.dingodb.exec.operator.SourceOperator) RootOperator(io.dingodb.exec.operator.RootOperator) Operator(io.dingodb.exec.base.Operator) SourceOperator(io.dingodb.exec.operator.SourceOperator)

Aggregations

Operator (io.dingodb.exec.base.Operator)1 AbstractOperator (io.dingodb.exec.operator.AbstractOperator)1 RootOperator (io.dingodb.exec.operator.RootOperator)1 SourceOperator (io.dingodb.exec.operator.SourceOperator)1