Packages

class CacheManager extends Logging with AdaptiveSparkPlanHelper

Provides support in a SQLContext for caching query results and automatically using these cached results when subsequent queries are executed. Data is cached using byte buffers stored in an InMemoryRelation. This relation is automatically substituted query plans that return the sameResult as the originally cached query.

Internal to Spark SQL.

Linear Supertypes
AdaptiveSparkPlanHelper, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CacheManager
  2. AdaptiveSparkPlanHelper
  3. Logging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CacheManager()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def cacheQuery(spark: SparkSession, planToCache: LogicalPlan, tableName: Option[String], storageLevel: StorageLevel): Unit

    Caches the data produced by the given LogicalPlan.

  6. def cacheQuery(spark: SparkSession, planToCache: LogicalPlan, tableName: Option[String]): Unit

    Caches the data produced by the given LogicalPlan.

    Caches the data produced by the given LogicalPlan. Unlike RDD.cache(), the default storage level is set to be MEMORY_AND_DISK because recomputing the in-memory columnar representation of the underlying table is expensive.

  7. def cacheQuery(query: Dataset[_], tableName: Option[String] = None, storageLevel: StorageLevel = MEMORY_AND_DISK): Unit

    Caches the data produced by the logical representation of the given Dataset.

    Caches the data produced by the logical representation of the given Dataset. Unlike RDD.cache(), the default storage level is set to be MEMORY_AND_DISK because recomputing the in-memory columnar representation of the underlying table is expensive.

  8. def clearCache(): Unit

    Clears all cached tables.

  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. def collect[B](p: SparkPlan)(pf: PartialFunction[SparkPlan, B]): Seq[B]

    Returns a Seq containing the result of applying a partial function to all elements in this tree on which the function is defined.

    Returns a Seq containing the result of applying a partial function to all elements in this tree on which the function is defined.

    Definition Classes
    AdaptiveSparkPlanHelper
  11. def collectFirst[B](p: SparkPlan)(pf: PartialFunction[SparkPlan, B]): Option[B]

    Finds and returns the first SparkPlan of the tree for which the given partial function is defined (pre-order), and applies the partial function to it.

    Finds and returns the first SparkPlan of the tree for which the given partial function is defined (pre-order), and applies the partial function to it.

    Definition Classes
    AdaptiveSparkPlanHelper
  12. def collectLeaves(p: SparkPlan): Seq[SparkPlan]

    Returns a Seq containing the leaves in this tree.

    Returns a Seq containing the leaves in this tree.

    Definition Classes
    AdaptiveSparkPlanHelper
  13. def collectWithSubqueries[B](p: SparkPlan)(f: PartialFunction[SparkPlan, B]): Seq[B]

    Returns a sequence containing the result of applying a partial function to all elements in this plan, also considering all the plans in its (nested) subqueries

    Returns a sequence containing the result of applying a partial function to all elements in this plan, also considering all the plans in its (nested) subqueries

    Definition Classes
    AdaptiveSparkPlanHelper
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  17. def find(p: SparkPlan)(f: (SparkPlan) => Boolean): Option[SparkPlan]

    Find the first SparkPlan that satisfies the condition specified by f.

    Find the first SparkPlan that satisfies the condition specified by f. The condition is recursively applied to this node and all of its children (pre-order).

    Definition Classes
    AdaptiveSparkPlanHelper
  18. def flatMap[A](p: SparkPlan)(f: (SparkPlan) => TraversableOnce[A]): Seq[A]

    Returns a Seq by applying a function to all nodes in this tree and using the elements of the resulting collections.

    Returns a Seq by applying a function to all nodes in this tree and using the elements of the resulting collections.

    Definition Classes
    AdaptiveSparkPlanHelper
  19. def foreach(p: SparkPlan)(f: (SparkPlan) => Unit): Unit

    Runs the given function on this node and then recursively on children.

    Runs the given function on this node and then recursively on children.

    f

    the function to be applied to each node in the tree.

    Definition Classes
    AdaptiveSparkPlanHelper
  20. def foreachUp(p: SparkPlan)(f: (SparkPlan) => Unit): Unit

    Runs the given function recursively on children then on this node.

    Runs the given function recursively on children then on this node.

    f

    the function to be applied to each node in the tree.

    Definition Classes
    AdaptiveSparkPlanHelper
  21. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  24. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  25. def isEmpty: Boolean

    Checks if the cache is empty.

  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  28. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  29. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  30. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  31. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  32. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  33. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  34. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  35. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  36. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  37. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  38. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  39. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  40. def lookupCachedData(plan: LogicalPlan): Option[CachedData]

    Optionally returns cached data for the given LogicalPlan.

  41. def lookupCachedData(query: Dataset[_]): Option[CachedData]

    Optionally returns cached data for the given Dataset

  42. def mapPlans[A](p: SparkPlan)(f: (SparkPlan) => A): Seq[A]

    Returns a Seq containing the result of applying the given function to each node in this tree in a preorder traversal.

    Returns a Seq containing the result of applying the given function to each node in this tree in a preorder traversal.

    f

    the function to be applied.

    Definition Classes
    AdaptiveSparkPlanHelper
  43. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  44. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  45. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. def recacheByPath(spark: SparkSession, resourcePath: Path, fs: FileSystem): Unit

    Tries to re-cache all the cache entries that contain resourcePath in one or more HadoopFsRelation node(s) as part of its logical plan.

  47. def recacheByPath(spark: SparkSession, resourcePath: String): Unit

    Tries to re-cache all the cache entries that contain resourcePath in one or more HadoopFsRelation node(s) as part of its logical plan.

  48. def recacheByPlan(spark: SparkSession, plan: LogicalPlan): Unit

    Tries to re-cache all the cache entries that refer to the given plan.

  49. def stripAQEPlan(p: SparkPlan): SparkPlan

    Strip the executePlan of AdaptiveSparkPlanExec leaf node.

    Strip the executePlan of AdaptiveSparkPlanExec leaf node.

    Definition Classes
    AdaptiveSparkPlanHelper
  50. def subqueriesAll(p: SparkPlan): Seq[SparkPlan]

    Returns a sequence containing the subqueries in this plan, also including the (nested) subqueries in its children

    Returns a sequence containing the subqueries in this plan, also including the (nested) subqueries in its children

    Definition Classes
    AdaptiveSparkPlanHelper
  51. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  52. def toString(): String
    Definition Classes
    AnyRef → Any
  53. def uncacheQuery(spark: SparkSession, plan: LogicalPlan, cascade: Boolean, blocking: Boolean = false): Unit

    Un-cache the given plan or all the cache entries that refer to the given plan.

    Un-cache the given plan or all the cache entries that refer to the given plan.

    spark

    The Spark session.

    plan

    The plan to be un-cached.

    cascade

    If true, un-cache all the cache entries that refer to the given plan; otherwise un-cache the given plan only.

    blocking

    Whether to block until all blocks are deleted.

  54. def uncacheQuery(query: Dataset[_], cascade: Boolean): Unit

    Un-cache the given plan or all the cache entries that refer to the given plan.

    Un-cache the given plan or all the cache entries that refer to the given plan.

    query

    The Dataset to be un-cached.

    cascade

    If true, un-cache all the cache entries that refer to the given Dataset; otherwise un-cache the given Dataset only.

  55. def useCachedData(plan: LogicalPlan): LogicalPlan

    Replaces segments of the given logical plan with cached versions where possible.

  56. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  58. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped