package function
Set of interfaces to represent functions in Spark's Java API. Users create implementations of these interfaces to pass functions to various Java API methods for Spark. Please visit Spark's Java programming guide for more details.
- Source
- package.scala
Type Members
- trait CoGroupFunction[K, V1, V2, R] extends Serializable
A function that returns zero or more output records from each grouping key and its values from 2 Datasets.
A function that returns zero or more output records from each grouping key and its values from 2 Datasets.
- Annotations
- @FunctionalInterface()
- trait DoubleFlatMapFunction[T] extends Serializable
A function that returns zero or more records of type Double from each input record.
A function that returns zero or more records of type Double from each input record.
- Annotations
- @FunctionalInterface()
- trait DoubleFunction[T] extends Serializable
A function that returns Doubles, and can be used to construct DoubleRDDs.
A function that returns Doubles, and can be used to construct DoubleRDDs.
- Annotations
- @FunctionalInterface()
- trait FilterFunction[T] extends Serializable
Base interface for a function used in Dataset's filter function.
Base interface for a function used in Dataset's filter function.
If the function returns true, the element is included in the returned Dataset.
- Annotations
- @FunctionalInterface()
- trait FlatMapFunction[T, R] extends Serializable
A function that returns zero or more output records from each input record.
A function that returns zero or more output records from each input record.
- Annotations
- @FunctionalInterface()
- trait FlatMapFunction2[T1, T2, R] extends Serializable
A function that takes two inputs and returns zero or more output records.
A function that takes two inputs and returns zero or more output records.
- Annotations
- @FunctionalInterface()
- trait FlatMapGroupsFunction[K, V, R] extends Serializable
A function that returns zero or more output records from each grouping key and its values.
A function that returns zero or more output records from each grouping key and its values.
- Annotations
- @FunctionalInterface()
- trait FlatMapGroupsWithStateFunction[K, V, S, R] extends Serializable
::Experimental:: Base interface for a map function used in
org.apache.spark.sql.KeyValueGroupedDataset.flatMapGroupsWithState( FlatMapGroupsWithStateFunction, org.apache.spark.sql.streaming.OutputMode, org.apache.spark.sql.Encoder, org.apache.spark.sql.Encoder)
::Experimental:: Base interface for a map function used in
org.apache.spark.sql.KeyValueGroupedDataset.flatMapGroupsWithState( FlatMapGroupsWithStateFunction, org.apache.spark.sql.streaming.OutputMode, org.apache.spark.sql.Encoder, org.apache.spark.sql.Encoder)
- Annotations
- @Experimental() @Evolving()
- Since
2.1.1
- trait ForeachFunction[T] extends Serializable
Base interface for a function used in Dataset's foreach function.
Base interface for a function used in Dataset's foreach function.
Spark will invoke the call function on each element in the input Dataset.
- Annotations
- @FunctionalInterface()
- trait ForeachPartitionFunction[T] extends Serializable
Base interface for a function used in Dataset's foreachPartition function.
Base interface for a function used in Dataset's foreachPartition function.
- Annotations
- @FunctionalInterface()
- trait Function[T1, R] extends Serializable
Base interface for functions whose return types do not create special RDDs.
Base interface for functions whose return types do not create special RDDs. PairFunction and DoubleFunction are handled separately, to allow PairRDDs and DoubleRDDs to be constructed when mapping RDDs of other types.
- Annotations
- @FunctionalInterface()
- trait Function0[R] extends Serializable
A zero-argument function that returns an R.
A zero-argument function that returns an R.
- Annotations
- @FunctionalInterface()
- trait Function2[T1, T2, R] extends Serializable
A two-argument function that takes arguments of type T1 and T2 and returns an R.
A two-argument function that takes arguments of type T1 and T2 and returns an R.
- Annotations
- @FunctionalInterface()
- trait Function3[T1, T2, T3, R] extends Serializable
A three-argument function that takes arguments of type T1, T2 and T3 and returns an R.
A three-argument function that takes arguments of type T1, T2 and T3 and returns an R.
- Annotations
- @FunctionalInterface()
- trait Function4[T1, T2, T3, T4, R] extends Serializable
A four-argument function that takes arguments of type T1, T2, T3 and T4 and returns an R.
A four-argument function that takes arguments of type T1, T2, T3 and T4 and returns an R.
- Annotations
- @FunctionalInterface()
- trait MapFunction[T, U] extends Serializable
Base interface for a map function used in Dataset's map function.
Base interface for a map function used in Dataset's map function.
- Annotations
- @FunctionalInterface()
- trait MapGroupsFunction[K, V, R] extends Serializable
Base interface for a map function used in GroupedDataset's mapGroup function.
Base interface for a map function used in GroupedDataset's mapGroup function.
- Annotations
- @FunctionalInterface()
- trait MapGroupsWithStateFunction[K, V, S, R] extends Serializable
::Experimental:: Base interface for a map function used in
MapGroupsWithStateFunction, org.apache.spark.sql.Encoder, org.apache.spark.sql.Encoder)
::Experimental:: Base interface for a map function used in
MapGroupsWithStateFunction, org.apache.spark.sql.Encoder, org.apache.spark.sql.Encoder)
- Annotations
- @Experimental() @Evolving()
- Since
2.1.1
- trait MapPartitionsFunction[T, U] extends Serializable
Base interface for function used in Dataset's mapPartitions.
Base interface for function used in Dataset's mapPartitions.
- Annotations
- @FunctionalInterface()
- trait PairFlatMapFunction[T, K, V] extends Serializable
A function that returns zero or more key-value pair records from each input record.
A function that returns zero or more key-value pair records from each input record. The key-value pairs are represented as scala.Tuple2 objects.
- Annotations
- @FunctionalInterface()
- trait PairFunction[T, K, V] extends Serializable
A function that returns key-value pairs (Tuple2<K, V>), and can be used to construct PairRDDs.
A function that returns key-value pairs (Tuple2<K, V>), and can be used to construct PairRDDs.
- Annotations
- @FunctionalInterface()
- trait ReduceFunction[T] extends Serializable
Base interface for function used in Dataset's reduce.
Base interface for function used in Dataset's reduce.
- Annotations
- @FunctionalInterface()
- trait VoidFunction[T] extends Serializable
A function with no return value.
A function with no return value.
- Annotations
- @FunctionalInterface()
- trait VoidFunction2[T1, T2] extends Serializable
A two-argument function that takes arguments of type T1 and T2 with no return value.
A two-argument function that takes arguments of type T1 and T2 with no return value.
- Annotations
- @FunctionalInterface()