Class SparkRuntime

java.lang.Object
org.apache.calcite.adapter.spark.SparkRuntime

public abstract class SparkRuntime extends Object
Runtime utilities for Calcite's Spark adapter. Generated code calls these methods.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Combines linq4j Function and Spark FlatMapFunction.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Enumerable<T>
    asEnumerable(org.apache.spark.api.java.JavaRDD<T> rdd)
    Converts an RDD into an enumerable.
    static <T> org.apache.spark.api.java.JavaRDD<T>
    createRdd(org.apache.spark.api.java.JavaSparkContext sc, Enumerable<T> enumerable)
    Converts an enumerable into an RDD.
    static <T> org.apache.spark.api.java.JavaRDD<T>
    createRdd(org.apache.spark.api.java.JavaSparkContext sc, T[] ts)
    Converts an array into an RDD.
    static org.apache.spark.api.java.JavaSparkContext
    Returns the Spark context for the current execution.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • createRdd

      public static <T> org.apache.spark.api.java.JavaRDD<T> createRdd(org.apache.spark.api.java.JavaSparkContext sc, T[] ts)
      Converts an array into an RDD.
    • createRdd

      public static <T> org.apache.spark.api.java.JavaRDD<T> createRdd(org.apache.spark.api.java.JavaSparkContext sc, Enumerable<T> enumerable)
      Converts an enumerable into an RDD.
    • asEnumerable

      public static <T> Enumerable<T> asEnumerable(org.apache.spark.api.java.JavaRDD<T> rdd)
      Converts an RDD into an enumerable.
    • getSparkContext

      public static org.apache.spark.api.java.JavaSparkContext getSparkContext(DataContext root)
      Returns the Spark context for the current execution.

      Currently a global variable; maybe later held within root.