本文整理了Java中cz.seznam.euphoria.core.client.flow.Flow.sources()
方法的一些代码示例,展示了Flow.sources()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.sources()
方法的具体详情如下:
包路径:cz.seznam.euphoria.core.client.flow.Flow
类名称:Flow
方法名:sources
[英]All input datasets.
[中]所有输入数据集。
代码示例来源:origin: seznam/euphoria
/**
* Checks if the given {@link Flow} reads bounded inputs
*
* @param flow the flow to inspect
*
* @return {@code true} if all sources are bounded
*/
private boolean isBoundedInput(Flow flow) {
// check if sources are bounded or not
for (Dataset<?> ds : flow.sources()) {
if (!ds.isBounded()) {
return false;
}
}
return true;
}
代码示例来源:origin: seznam/euphoria
/**
* Determines {@link Mode} of the given flow.
*
* @param flow the flow to inspect
*
* @return the given flow's mode; never {@code null}
*/
public static Mode determineMode(Flow flow) {
// check if sources are bounded or not
for (Dataset<?> ds : flow.sources()) {
if (!ds.isBounded()) {
return Mode.STREAMING;
}
}
// default mode is batch
return Mode.BATCH;
}
代码示例来源:origin: seznam/euphoria
Set<Operator<?, ?>> resolvedOperators = new HashSet<>();
Map<Dataset<?>, Operator<?, ?>> datasets = new HashMap<>();
flow.sources().forEach(d -> datasets.put(d, new InputOperator(d)));
代码示例来源:origin: seznam/euphoria
Set<Operator<?, ?>> resolvedOperators = new HashSet<>();
Map<Dataset<?>, Operator<?, ?>> datasets = new HashMap<>();
flow.sources().forEach(d -> datasets.put(d, new InputOperator(d)));
内容来源于网络,如有侵权,请联系作者删除!