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 org.datacleaner.spark.functions.RowProcessingFunction.java

public final class RowProcessingFunction
        implements PairFlatMapFunction<Iterator<InputRow>, String, NamedAnalyzerResult> {

    private static final long serialVersionUID = 1L;
    private final SparkJobContext _sparkJobContext;

From source file org.datacleaner.spark.functions.TuplesToTuplesFunction.java

/**
 * A utility {@link PairFlatMapFunction} for conversion between a
 * {@link JavaRDD} of {@link Tuple2} into a {@link JavaPairRDD} of that same
 * tuple type.
 */
public class TuplesToTuplesFunction<K, V> implements PairFlatMapFunction<Iterator<Tuple2<K, V>>, K, V> {

From source file org.deeplearning4j.spark.impl.common.score.BaseVaeScoreWithKeyFunction.java

/**
 * Function to calculate the scores (reconstruction probability, reconstruction error) for a variational autoencoder.<br>
 * Note that scoring is batched for computational efficiency.<br>
 *
 * @param <K> Type of key, associated with each example. Used to keep track of which score belongs to which example
 * @author Alex Black

From source file org.deeplearning4j.spark.impl.computationgraph.scoring.ScoreExamplesWithKeyFunction.java

/**Function to score examples individually, where each example is associated with a particular key<br>
 * Note that scoring is batched for computational efficiency.<br>
 * This is the Spark implementation of the {@link ComputationGraph#scoreExamples(MultiDataSet, boolean)} method<br>
 * <b>Note:</b> The MultiDataSet objects passed in must have exactly one example in them (otherwise: can't have a 1:1 association
 * between keys and data sets to score)
 * @author Alex Black

From source file org.icgc.dcc.release.job.document.function.PairGeneIdObservation.java

public final class PairGeneIdObservation implements PairFlatMapFunction<Occurrence, String, Occurrence> {

    @Override
    public Iterable<Tuple2<String, Occurrence>> call(Occurrence observation) throws Exception {
        val uniqueGeneIds = Sets.newHashSet(getObservationConsequenceGeneIds(observation));
        List<Tuple2<String, Occurrence>> values = Lists.newArrayListWithCapacity(uniqueGeneIds.size());

From source file sparcPlex.functions.NodeMetaDataFetcher.java

/**
 *
 * @author srini
 * 
 * from each partition, fetch how many unsolved child nodes are there
 */

From source file sparcPlex.functions.NodePlucker.java

/**
 *
 * @author srini
 */
public class NodePlucker implements
        PairFlatMapFunction<Iterator<Tuple2<Integer, ActiveSubtreeCollection>>, Integer, List<NodeAttachment>>,

From source file sparcPlex.functions.PendingNodeMetaDataFetcher.java

/**
 *
 * @author srini
 * 
 * from each partition, fetch list of unsolved child nodes  
 */

From source file uk.gov.gchq.gaffer.sparkaccumulo.operation.utils.java.ElementConverterFunction.java

public class ElementConverterFunction implements PairFlatMapFunction<Element, Key, Value>, Serializable {
    private static final long serialVersionUID = -3259752069724639102L;

    private final Broadcast<AccumuloElementConverter> converterBroadcast;

    public ElementConverterFunction(final Broadcast<AccumuloElementConverter> converterBroadcast) {