public TaskAttemptState getLastAttemptStatus() { TaskAttempt lastAttempt = getLastAttempt(); if (lastAttempt != null) { return lastAttempt.getState(); } else { return TaskAttemptState.TA_ASSIGNED; } }
public static void scheduleFetches(Stage stage, Map<String, List<FetchProto>> fetches) { stage.taskScheduler.handle(new FetchScheduleEvent(TaskSchedulerEvent.EventType.T_SCHEDULE, stage.getId(), fetches)); }
public QueryState getState() { if(query == null) { if (isInitError()) { return QueryState.QUERY_ERROR; } else { return QueryState.QUERY_NOT_ASSIGNED; } } else { return query.getState(); } }
public static Task newEmptyTask(TaskSchedulerContext schedulerContext, TaskAttemptScheduleContext taskContext, Stage stage, int taskId) { ExecutionBlock execBlock = stage.getBlock(); Task unit = new Task(schedulerContext.getMasterContext().getConf(), taskContext, QueryIdFactory.newTaskId(schedulerContext.getBlockId(), taskId), schedulerContext.isLeafQuery(), stage.eventHandler); unit.setLogicalPlan(execBlock.getPlan()); stage.addTask(unit); return unit; }
private void initTaskScheduler(Stage stage) throws IOException { TajoConf conf = stage.context.getConf(); stage.schedulerContext = new TaskSchedulerContext(stage.context, stage.getMasterPlan().isLeaf(stage.getId()), stage.getId()); stage.taskScheduler = TaskSchedulerFactory.get(conf, stage.schedulerContext, stage); stage.taskScheduler.init(conf); LOG.info(stage.taskScheduler.getName() + " is chosen for the task scheduling for " + stage.getId()); }
public QueryHookExecutor(QueryMaster.QueryMasterContext context) { this.context = context; hookList.add(new MaterializedResultHook()); hookList.add(new CreateTableHook()); hookList.add(new InsertTableHook()); hookList.add(new CreateIndexHook()); }
public void clearPartitions() { for(Stage eachStage : getStages()) { eachStage.clearPartitions(); } }
public void clearPartitions() { for(Task eachTask : getTasks()) { if (eachTask.getLastAttempt() != null && !eachTask.getLastAttempt().getPartitions().isEmpty()) { eachTask.getLastAttempt().getPartitions().clear(); } } }
public void handle(TaskSchedulerEvent event) { Stage stage = query.getStage(event.getExecutionBlockId()); stage.getTaskScheduler().handle(event); } }
/** * It finalizes this stage. It is only invoked when the stage is finalizing. */ public void finalizeStage() { cleanup(); }
/** * Get the pull server URIs without repeated parameters. */ public static List<URI> createSimpleURIs(int maxUrlLength, FetchProto fetch) { return createFetchURL(maxUrlLength, fetch, false); }
public static Task newEmptyTask(TaskSchedulerContext schedulerContext, TaskAttemptScheduleContext taskContext, Stage stage, int taskId) { ExecutionBlock execBlock = stage.getBlock(); Task unit = new Task(schedulerContext.getMasterContext().getConf(), taskContext, QueryIdFactory.newTaskId(schedulerContext.getBlockId(), taskId), schedulerContext.isLeafQuery(), stage.eventHandler); unit.setLogicalPlan(execBlock.getPlan()); stage.addTask(unit); return unit; }
private void initTaskScheduler(Stage stage) throws IOException { TajoConf conf = stage.context.getConf(); stage.schedulerContext = new TaskSchedulerContext(stage.context, stage.getMasterPlan().isLeaf(stage.getId()), stage.getId()); stage.taskScheduler = TaskSchedulerFactory.get(conf, stage.schedulerContext, stage); stage.taskScheduler.init(conf); LOG.info(stage.taskScheduler.getName() + " is chosen for the task scheduling for " + stage.getId()); }
public QueryHookExecutor(QueryMaster.QueryMasterContext context) { this.context = context; hookList.add(new MaterializedResultHook()); hookList.add(new CreateTableHook()); hookList.add(new InsertTableHook()); hookList.add(new CreateIndexHook()); }
public static void scheduleFetches(Stage stage, Map<String, List<FetchProto>> fetches) { stage.taskScheduler.handle(new FetchScheduleEvent(TaskSchedulerEvent.EventType.T_SCHEDULE, stage.getId(), fetches)); }
public void clearPartitions() { for(Stage eachStage : getStages()) { eachStage.clearPartitions(); } }
public void clearPartitions() { for(Task eachTask : getTasks()) { if (eachTask.getLastAttempt() != null && !eachTask.getLastAttempt().getPartitions().isEmpty()) { eachTask.getLastAttempt().getPartitions().clear(); } } }
public void handle(TaskSchedulerEvent event) { Stage stage = query.getStage(event.getExecutionBlockId()); stage.getTaskScheduler().handle(event); } }
public TaskAttemptState getLastAttemptStatus() { TaskAttempt lastAttempt = getLastAttempt(); if (lastAttempt != null) { return lastAttempt.getState(); } else { return TaskAttemptState.TA_ASSIGNED; } }
public QueryState getState() { if(query == null) { if (isInitError()) { return QueryState.QUERY_ERROR; } else { return QueryState.QUERY_NOT_ASSIGNED; } } else { return query.getState(); } }