cz.seznam.euphoria.core.client.flow.Flow.sources()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(107)

本文整理了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

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)));

相关文章