Class SparkRuntime


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

      Constructors 
      Modifier Constructor Description
      private SparkRuntime()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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 getSparkContext​(DataContext root)
      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
    • Constructor Detail

      • SparkRuntime

        private SparkRuntime()
    • Method Detail

      • 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.