Example usage for org.apache.spark.api.java.function PairFlatMapFunction interface-usage

List of usage examples for org.apache.spark.api.java.function PairFlatMapFunction interface-usage

Introduction

In this page you can find the example usage for org.apache.spark.api.java.function PairFlatMapFunction interface-usage.

Usage

From source file com.stratio.streaming.functions.PairDataFunction.java

public class PairDataFunction
        implements PairFlatMapFunction<Iterator<StratioStreamingMessage>, StreamAction, StratioStreamingMessage> {

    private static final long serialVersionUID = -1456940258968414737L;

    @Override

From source file com.thinkbiganalytics.spark.dataprofiler.functions.IndividualColumnValueCounts.java

/**
 * Get ((column index, column value), 1) for each column value in a row
 */
public class IndividualColumnValueCounts implements PairFlatMapFunction<Row, Tuple2<Integer, Object>, Integer> {

    @Override

From source file consumer.kafka.PartitionOffsetPair.java

/**
 * Extracts the kafka-paritition-number and largest-offset-read-for-that-partition from the kafka-receiver output
 */
public class PartitionOffsetPair<E> implements PairFlatMapFunction<Iterator<MessageAndMetadata<E>>, Integer, Long> {
    private static final Logger LOG = LoggerFactory.getLogger(PartitionOffsetPair.class);

From source file cz.muni.fi.xfabian7.bp.mgrid.EvaluateAddress.java

/**
 * This class lunch the evaluation of relevant addresses on the query given
 * through JRDD
 *
 * @author Norbert Fabian, 396035@mail.muni.cz, Faculty of Informatics, Masaryk
 * University, Brno, Czech Republic\

From source file info.debatty.spark.knngraphs.BalancedKMedoidsPartitioner.java

class AssignFunction<T>
        implements PairFlatMapFunction<Iterator<Tuple2<Node<T>, NeighborList>>, Node<T>, NeighborList> {

    private final List<Node<T>> medoids;
    private final double imbalance;
    private final int partitions;

From source file info.debatty.spark.knngraphs.builder.Online.java

/**
 * In this Spark implementation, the distributed graph is stored as a RDD of
 * subgraphs, this function collects the subgraphs and returns a single graph,
 * represented as an RDD of tuples (Node, NeighborList).
 * This function is used by the method Online.getGraph().
 * @author Thibault Debatty

From source file org.apache.beam.runners.spark.translation.MultiDoFnFunction.java

/**
 * DoFunctions ignore outputs that are not the main output. MultiDoFunctions deal with additional
 * outputs by enriching the underlying data with multiple TupleTags.
 *
 * @param <InputT> Input type for DoFunction.
 * @param <OutputT> Output type for DoFunction.

From source file org.apache.crunch.fn.SPairFlatMapFunction.java

/**
 * A Crunch-compatible abstract base class for Spark's {@link PairFlatMapFunction}. Subclasses
 * of this class may be used against either Crunch {@code PCollections} or Spark {@code RDDs}.
 */
public abstract class SPairFlatMapFunction<T, K, V> extends SparkDoFn<T, Pair<K, V>>
        implements PairFlatMapFunction<T, K, V> {

From source file org.apache.crunch.impl.spark.fn.CrunchPairTuple2.java

public class CrunchPairTuple2<K, V> implements PairFlatMapFunction<Iterator<Pair<K, V>>, K, V> {
    @Override
    public Iterable<Tuple2<K, V>> call(final Iterator<Pair<K, V>> iterator) throws Exception {
        return new Iterable<Tuple2<K, V>>() {
            @Override
            public Iterator<Tuple2<K, V>> iterator() {

From source file org.apache.eagle.alert.engine.spark.function.AlertBoltFunction.java

public class AlertBoltFunction implements
        PairFlatMapFunction<Iterator<Tuple2<Integer, Iterable<PartitionedEvent>>>, PublishPartition, AlertStreamEvent> {

    private static final Logger LOG = LoggerFactory.getLogger(AlertBoltFunction.class);
    private static final long serialVersionUID = -7876789777660951749L;
    private AtomicReference<Map<String, StreamDefinition>> sdsRef;