Example usage for org.apache.spark.api.java.function FlatMapFunction call

List of usage examples for org.apache.spark.api.java.function FlatMapFunction call

Introduction

In this page you can find the example usage for org.apache.spark.api.java.function FlatMapFunction call.

Prototype

Iterator<R> call(T t) throws Exception;

Source Link

Usage

From source file:org.apache.crunch.fn.SFunctions.java

License:Apache License

public static <T, R> SFlatMapFunction<T, R> wrap(final FlatMapFunction<T, R> f) {
    return new SFlatMapFunction<T, R>() {
        @Override//from w  w  w.j  ava2  s .  co m
        public Iterable<R> call(T t) throws Exception {
            return f.call(t);
        }
    };
}