示例#1
0
 public static void startScriptExecutors(
     QueryContext queryContext, EvalContext evalContext, Target[] targets) throws IOException {
   for (int i = 0; i < targets.length; i++) {
     EvalNode eval = targets[i].getEvalTree();
     if (eval instanceof GeneralFunctionEval) {
       GeneralFunctionEval functionEval = (GeneralFunctionEval) eval;
       if (functionEval.getFuncDesc().getInvocation().hasPython()) {
         TajoScriptEngine scriptExecutor = new PythonScriptEngine(functionEval.getFuncDesc());
         evalContext.addScriptEngine(eval, scriptExecutor);
         scriptExecutor.start(queryContext.getConf());
       }
     }
   }
 }
示例#2
0
 public static void stopScriptExecutors(EvalContext evalContext) {
   for (TajoScriptEngine executor : evalContext.getAllScriptEngines()) {
     executor.shutdown();
   }
 }