@Test public void testBuild_Windowing() { Flow flow = Flow.create("TEST"); Dataset<String> dataset = Util.createMockDataset(flow, 3); TopPerKey.of(dataset) .keyBy(s -> s) .valueBy(s -> 1L) .scoreBy(s -> 1L) .windowBy(Time.of(Duration.ofHours(1))) .output(); assertTrue(Iterables.getOnlyElement(flow.operators()) instanceof TopPerKey); }
public static <IN> KeyByBuilder<IN> of(Dataset<IN> input) { return new KeyByBuilder<>("TopPerKey", input); }
TopPerKey extends StateAwareWindowWiseSingleInputOperator<
        IN, IN, IN, KEY, Triple<KEY, VALUE, SCORE>, W,
    TopPerKey<IN, KEY, VALUE, SCORE, W>> { public static <IN> KeyByBuilder<IN> of(Dataset<IN> input) { return new KeyByBuilder<>("TopPerKey", input); } }
TopPerKey extends StateAwareWindowWiseSingleInputOperator<
        IN, IN, IN, KEY, Triple<KEY, VALUE, SCORE>, W,
    TopPerKey<IN, KEY, VALUE, SCORE, W>> { public static <IN> KeyByBuilder<IN> of(Dataset<IN> input) { return new KeyByBuilder<>("TopPerKey", input); } TopPerKey(Flow flow,
            String name,
            Dataset<IN> input,
            UnaryFunction<IN, KEY> keyFn,
            UnaryFunction<IN, VALUE> valueFn,
            UnaryFunction<IN, SCORE> scoreFn,
            @Nullable Windowing<IN, W> windowing,
            Set<OutputHint> outputHints); }
TopPerKey extends StateAwareWindowWiseSingleInputOperator<
        IN, IN, IN, KEY, Triple<KEY, VALUE, SCORE>, W,
    TopPerKey<IN, KEY, VALUE, SCORE, W>> { public static <IN> KeyByBuilder<IN> of(Dataset<IN> input) { return new KeyByBuilder<>("TopPerKey", input); } TopPerKey(Flow flow,
            String name,
            Dataset<IN> input,
            UnaryFunction<IN, KEY> keyFn,
            UnaryFunction<IN, VALUE> valueFn,
            UnaryFunction<IN, SCORE> scoreFn,
            @Nullable Windowing<IN, W> windowing,
            Set<OutputHint> outputHints); static KeyByBuilder<IN> of(Dataset<IN> input); static OfBuilder named(String name); UnaryFunction<IN, VALUE> getValueExtractor(); UnaryFunction<IN, SCORE> getScoreExtractor(); @Override DAG<Operator<?, ?>> getBasicOps(); }
TopPerKey extends StateAwareWindowWiseSingleInputOperator<
        IN, IN, IN, KEY, Triple<KEY, VALUE, SCORE>, W,
    TopPerKey<IN, KEY, VALUE, SCORE, W>> { public static <IN> KeyByBuilder<IN> of(Dataset<IN> input) { return new KeyByBuilder<>("TopPerKey", input); } TopPerKey(Flow flow,
            String name,
            Dataset<IN> input,
            UnaryFunction<IN, KEY> keyFn,
            UnaryFunction<IN, VALUE> valueFn,
            UnaryFunction<IN, SCORE> scoreFn,
            @Nullable Windowing<IN, W> windowing,
            Set<OutputHint> outputHints); static KeyByBuilder<IN> of(Dataset<IN> input); static OfBuilder named(String name); UnaryFunction<IN, VALUE> getValueExtractor(); UnaryFunction<IN, SCORE> getScoreExtractor(); @Override DAG<Operator<?, ?>> getBasicOps();  }