@Override public Dataset<OUT> output(OutputHint... outputHints) { Flow flow = input.getFlow(); FlatMap<IN, OUT> map = new FlatMap<>(name, flow, input, functor, evtTimeFn, Sets.newHashSet(outputHints)); flow.add(map); return map.output(); } }
@Override public Dataset<OUT> output(OutputHint... outputHints) { Flow flow = input.getFlow(); FlatMap<IN, OUT> map = new FlatMap<>(name, flow, input, functor, evtTimeFn, Sets.newHashSet(outputHints)); flow.add(map); return map.output(); } }
@Override public DAG<Operator<?, ?>> getBasicOps() { return DAG.of(new FlatMap<>( getName(), getFlow(), input, (i, c) -> c.collect(i), eventTimeFn, getHints())); }
@Override public DAG<Operator<?, ?>> getBasicOps() { return DAG.of(new FlatMap<>( getName(), getFlow(), input, (i, c) -> c.collect(i), eventTimeFn, getHints())); }
/** This operator can be implemented using FlatMap. */ @Override public DAG<Operator<?, ?>> getBasicOps() { return DAG.of(new FlatMap<>(getName(), getFlow(), input, (elem, collector) -> { if (predicate.apply(elem)) { collector.collect(elem); } }, null, getHints())); } }
/** This operator can be implemented using FlatMap. */ @Override public DAG<Operator<?, ?>> getBasicOps() { return DAG.of(new FlatMap<>(getName(), getFlow(), input, (elem, collector) -> { if (predicate.apply(elem)) { collector.collect(elem); } }, null, getHints())); } }
/** * This is not a basic operator. It can be straightforwardly implemented * by using {@code FlatMap} operator. * @return the operator chain representing this operation including FlatMap */ @Override public DAG<Operator<?, ?>> getBasicOps() { return DAG.of( // do not use the client API here, because it modifies the Flow! new FlatMap<IN, OUT>(getName(), getFlow(), input, (i, c) -> c.collect(mapper.apply(i, c.asContext())), null, getHints())); }
/** * This is not a basic operator. It can be straightforwardly implemented * by using {@code FlatMap} operator. * @return the operator chain representing this operation including FlatMap */ @Override public DAG<Operator<?, ?>> getBasicOps() { return DAG.of( // do not use the client API here, because it modifies the Flow! new FlatMap<IN, OUT>(getName(), getFlow(), input, (i, c) -> c.collect(mapper.apply(i, c.asContext())), null, getHints())); }
FlatMap<IN, Pair<Window<?>, IN>> map = new FlatMap<>(getName() + "::window-to-key", getFlow(), input,
FlatMap<IN, Pair<Window<?>, IN>> map = new FlatMap<>(getName() + "::window-to-key", getFlow(), input,