本文整理匯總了Java中org.apache.kylin.job.dao.ExecutablePO.setTasks方法的典型用法代碼示例。如果您正苦於以下問題:Java ExecutablePO.setTasks方法的具體用法?Java ExecutablePO.setTasks怎麽用?Java ExecutablePO.setTasks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.kylin.job.dao.ExecutablePO
的用法示例。
在下文中一共展示了ExecutablePO.setTasks方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: parse
import org.apache.kylin.job.dao.ExecutablePO; //導入方法依賴的package包/類
private static ExecutablePO parse(AbstractExecutable executable) {
ExecutablePO result = new ExecutablePO();
result.setName(executable.getName());
result.setUuid(executable.getId());
result.setType(executable.getClass().getName());
result.setParams(executable.getParams());
if (executable instanceof ChainedExecutable) {
List<ExecutablePO> tasks = Lists.newArrayList();
for (AbstractExecutable task : ((ChainedExecutable) executable).getTasks()) {
tasks.add(parse(task));
}
result.setTasks(tasks);
}
if (executable instanceof CheckpointExecutable) {
List<ExecutablePO> tasksForCheck = Lists.newArrayList();
for (AbstractExecutable taskForCheck : ((CheckpointExecutable) executable).getSubTasksForCheck()) {
tasksForCheck.add(parse(taskForCheck));
}
result.setTasksForCheck(tasksForCheck);
}
return result;
}
示例2: parse
import org.apache.kylin.job.dao.ExecutablePO; //導入方法依賴的package包/類
private static ExecutablePO parse(AbstractExecutable executable) {
ExecutablePO result = new ExecutablePO();
result.setName(executable.getName());
result.setUuid(executable.getId());
result.setType(executable.getClass().getName());
result.setParams(executable.getParams());
if (executable instanceof DefaultChainedExecutable) {
List<ExecutablePO> tasks = Lists.newArrayList();
for (AbstractExecutable task : ((DefaultChainedExecutable) executable).getTasks()) {
tasks.add(parse(task));
}
result.setTasks(tasks);
}
return result;
}