cleanup work
This commit is contained in:
@@ -13,8 +13,6 @@ public class LineSplitter implements FlatMapFunction<String, Tuple2<String, Inte
|
||||
public void flatMap(String value, Collector<Tuple2<String, Integer>> out) {
|
||||
|
||||
String[] tokens = value.toLowerCase().split("\\W+");
|
||||
Stream.of(tokens)
|
||||
.filter(t -> t.length() > 0)
|
||||
.forEach(token -> out.collect(new Tuple2<>(token, 1)));
|
||||
Stream.of(tokens).filter(t -> t.length() > 0).forEach(token -> out.collect(new Tuple2<>(token, 1)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user