Class SideOutputExample.Tokenizer

  • All Implemented Interfaces:
    Serializable, Function, RichFunction
    Enclosing class:
    SideOutputExample

    public static final class SideOutputExample.Tokenizer
    extends ProcessFunction<String,​Tuple2<String,​Integer>>
    Implements the string tokenizer that splits sentences into words as a user-defined FlatMapFunction. The function takes a line (String) and splits it into multiple pairs in the form of "(word,1)" (Tuple2<String, Integer>).

    This rejects words that are longer than 5 characters long.

    See Also:
    Serialized Form