cz.seznam.euphoria.core.executor.Executor.getBasicOps()方法的使用及代码示例

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

本文整理了Java中cz.seznam.euphoria.core.executor.Executor.getBasicOps()方法的一些代码示例,展示了Executor.getBasicOps()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Executor.getBasicOps()方法的具体详情如下:
包路径:cz.seznam.euphoria.core.executor.Executor
类名称:Executor
方法名:getBasicOps

Executor.getBasicOps介绍

[英]Operators that are considered to be basic and expected to be natively supported by each executor implementation.
[中]被认为是基本的并且期望由每个执行器实现本机支持的运算符。

代码示例

代码示例来源:origin: seznam/euphoria

private Executor.Result execute(Flow flow) {
 DAG<Operator<?, ?>> dag = FlowUnfolder.unfold(flow, Executor.getBasicOps());

代码示例来源:origin: seznam/euphoria

private Executor.Result execute(Flow flow) {
 DAG<Operator<?, ?>> dag = FlowUnfolder.unfold(flow, Executor.getBasicOps());

代码示例来源:origin: seznam/euphoria

@Test
@SuppressWarnings("unchecked")
public void testUnfoldBasic() {
 DAG<Operator<?, ?>> unfolded = FlowUnfolder.unfold(flow, Executor.getBasicOps());

代码示例来源:origin: seznam/euphoria

@Test(expected = IllegalArgumentException.class)
public void testMultipleOutputsToSameSink() throws Exception {
 flow = Flow.create(getClass().getSimpleName());
 input = flow.createInput(new MockStreamDataSource<>());
 Dataset<Object> mapped = MapElements.of(input).using(e -> e).output();
 Dataset<Pair<Object, Long>> reduced = ReduceByKey
   .of(mapped)
   .keyBy(e -> e).reduceBy(values -> 1L)
   .windowBy(Time.of(Duration.ofSeconds(1)))
   .output();
 Dataset<Pair<Object, Long>> output = Join.of(mapped, reduced)
   .by(e -> e, Pair::getFirst)
   .using((Object l, Pair<Object, Long> r, Collector<Long> c) -> {
    c.collect(r.getSecond());
   })
   .windowBy(Time.of(Duration.ofSeconds(1)))
   .output();
 ListDataSink<Pair<Object, Long>> sink = ListDataSink.get();
 output.persist(sink);
 reduced.persist(sink);
 FlowUnfolder.unfold(flow, Executor.getBasicOps());
}

代码示例来源:origin: seznam/euphoria

DAG<Operator<?, ?>> unfolded = FlowUnfolder.unfold(flow, Executor.getBasicOps());

相关文章