Packages

class JDBCRDD extends RDD[InternalRow] with DataSourceMetricsMixin with ExternalEngineDatasourceRDD

An RDD representing a query is related to a table in a database accessed via JDBC. Both the driver code and the workers must be able to access the database; the driver needs to fetch the schema while the workers need to fetch the data.

Linear Supertypes
ExternalEngineDatasourceRDD, DataSourceMetricsMixin, RDD[InternalRow], Logging, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JDBCRDD
  2. ExternalEngineDatasourceRDD
  3. DataSourceMetricsMixin
  4. RDD
  5. Logging
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new JDBCRDD(sc: SparkContext, getConnection: (Int) => Connection, schema: StructType, columns: Array[String], predicates: Array[Predicate], partitions: Array[Partition], url: String, options: JDBCOptions, databaseMetadata: JDBCDatabaseMetadata, groupByColumns: Option[Array[String]], sample: Option[TableSampleInfo], limit: Int, sortOrders: Array[String], offset: Int, additionalMetrics: Map[String, SQLMetric])

Type Members

  1. implicit class LogStringContext extends AnyRef
    Definition Classes
    Logging

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def ++(other: RDD[InternalRow]): RDD[InternalRow]
    Definition Classes
    RDD
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def MDC(key: LogKey, value: Any): MDC
    Attributes
    protected
    Definition Classes
    Logging
  6. def aggregate[U](zeroValue: U)(seqOp: (U, InternalRow) => U, combOp: (U, U) => U)(implicit arg0: ClassTag[U]): U
    Definition Classes
    RDD
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def barrier(): RDDBarrier[InternalRow]
    Definition Classes
    RDD
    Annotations
    @Experimental() @Since("2.4.0")
  9. def cache(): JDBCRDD.this.type
    Definition Classes
    RDD
  10. def cartesian[U](other: RDD[U])(implicit arg0: ClassTag[U]): RDD[(InternalRow, U)]
    Definition Classes
    RDD
  11. def checkpoint(): Unit
    Definition Classes
    RDD
  12. def cleanShuffleDependencies(blocking: Boolean): Unit
    Definition Classes
    RDD
    Annotations
    @DeveloperApi() @Since("3.1.0")
  13. def clearDependencies(): Unit
    Attributes
    protected
    Definition Classes
    RDD
  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  15. def coalesce(numPartitions: Int, shuffle: Boolean, partitionCoalescer: Option[PartitionCoalescer])(implicit ord: Ordering[InternalRow]): RDD[InternalRow]
    Definition Classes
    RDD
  16. def collect[U](f: PartialFunction[InternalRow, U])(implicit arg0: ClassTag[U]): RDD[U]
    Definition Classes
    RDD
  17. def collect(): Array[InternalRow]
    Definition Classes
    RDD
  18. def compute(thePart: Partition, context: TaskContext): Iterator[InternalRow]

    Runs the SQL query against the JDBC driver.

    Runs the SQL query against the JDBC driver.

    Definition Classes
    JDBCRDD → RDD
  19. def context: SparkContext
    Definition Classes
    RDD
  20. def count(): Long
    Definition Classes
    RDD
  21. def countApprox(timeout: Long, confidence: Double): PartialResult[BoundedDouble]
    Definition Classes
    RDD
  22. def countApproxDistinct(relativeSD: Double): Long
    Definition Classes
    RDD
  23. def countApproxDistinct(p: Int, sp: Int): Long
    Definition Classes
    RDD
  24. def countByValue()(implicit ord: Ordering[InternalRow]): Map[InternalRow, Long]
    Definition Classes
    RDD
  25. def countByValueApprox(timeout: Long, confidence: Double)(implicit ord: Ordering[InternalRow]): PartialResult[Map[InternalRow, BoundedDouble]]
    Definition Classes
    RDD
  26. final def dependencies: Seq[Dependency[_]]
    Definition Classes
    RDD
  27. def distinct(): RDD[InternalRow]
    Definition Classes
    RDD
  28. def distinct(numPartitions: Int)(implicit ord: Ordering[InternalRow]): RDD[InternalRow]
    Definition Classes
    RDD
  29. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  31. val fetchAndTransformToInternalRowsMetric: SQLMetric

    Time needed to fetch the data and transform it into Spark's InternalRow format.

    Time needed to fetch the data and transform it into Spark's InternalRow format.

    Usually this is spent in network transfer time, but it can be spent in transformation time as well if we are transforming some more complex datatype such as structs.

  32. def filter(f: (InternalRow) => Boolean): RDD[InternalRow]
    Definition Classes
    RDD
  33. def first(): InternalRow
    Definition Classes
    RDD
  34. def firstParent[U](implicit arg0: ClassTag[U]): RDD[U]
    Attributes
    protected[spark]
    Definition Classes
    RDD
  35. def flatMap[U](f: (InternalRow) => IterableOnce[U])(implicit arg0: ClassTag[U]): RDD[U]
    Definition Classes
    RDD
  36. def fold(zeroValue: InternalRow)(op: (InternalRow, InternalRow) => InternalRow): InternalRow
    Definition Classes
    RDD
  37. def foreach(f: (InternalRow) => Unit): Unit
    Definition Classes
    RDD
  38. def foreachPartition(f: (Iterator[InternalRow]) => Unit): Unit
    Definition Classes
    RDD
  39. def generateJdbcQuery(partition: Option[JDBCPartition]): String
  40. def getCheckpointFile: Option[String]
    Definition Classes
    RDD
  41. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  42. def getDatabaseMetadata: JDBCDatabaseMetadata

    Get the external engine database metadata.

  43. def getDependencies: Seq[Dependency[_]]
    Attributes
    protected
    Definition Classes
    RDD
  44. def getExternalEngineQuery: String
    Definition Classes
    JDBCRDDExternalEngineDatasourceRDD
  45. def getMetrics: Seq[(String, SQLMetric)]
    Definition Classes
    JDBCRDDDataSourceMetricsMixin
  46. final def getNumPartitions: Int
    Definition Classes
    RDD
    Annotations
    @Since("1.6.0")
  47. def getOutputDeterministicLevel: rdd.DeterministicLevel.Value
    Attributes
    protected
    Definition Classes
    RDD
    Annotations
    @DeveloperApi()
  48. def getPartitions: Array[Partition]

    Retrieve the list of partitions corresponding to this RDD.

    Retrieve the list of partitions corresponding to this RDD.

    Definition Classes
    JDBCRDD → RDD
  49. def getPreferredLocations(split: Partition): Seq[String]
    Attributes
    protected
    Definition Classes
    RDD
  50. def getResourceProfile(): ResourceProfile
    Definition Classes
    RDD
    Annotations
    @Experimental() @Since("3.1.0")
  51. def getStorageLevel: StorageLevel
    Definition Classes
    RDD
  52. def glom(): RDD[Array[InternalRow]]
    Definition Classes
    RDD
  53. def groupBy[K](f: (InternalRow) => K, p: Partitioner)(implicit kt: ClassTag[K], ord: Ordering[K]): RDD[(K, Iterable[InternalRow])]
    Definition Classes
    RDD
  54. def groupBy[K](f: (InternalRow) => K, numPartitions: Int)(implicit kt: ClassTag[K]): RDD[(K, Iterable[InternalRow])]
    Definition Classes
    RDD
  55. def groupBy[K](f: (InternalRow) => K)(implicit kt: ClassTag[K]): RDD[(K, Iterable[InternalRow])]
    Definition Classes
    RDD
  56. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  57. val id: Int
    Definition Classes
    RDD
  58. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  59. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  60. def intersection(other: RDD[InternalRow], numPartitions: Int): RDD[InternalRow]
    Definition Classes
    RDD
  61. def intersection(other: RDD[InternalRow], partitioner: Partitioner)(implicit ord: Ordering[InternalRow]): RDD[InternalRow]
    Definition Classes
    RDD
  62. def intersection(other: RDD[InternalRow]): RDD[InternalRow]
    Definition Classes
    RDD
  63. lazy val isBarrier_: Boolean
    Attributes
    protected
    Definition Classes
    RDD
    Annotations
    @transient()
  64. def isCheckpointed: Boolean
    Definition Classes
    RDD
  65. def isEmpty(): Boolean
    Definition Classes
    RDD
  66. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  67. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  68. final def iterator(split: Partition, context: TaskContext): Iterator[InternalRow]
    Definition Classes
    RDD
  69. def keyBy[K](f: (InternalRow) => K): RDD[(K, InternalRow)]
    Definition Classes
    RDD
  70. def localCheckpoint(): JDBCRDD.this.type
    Definition Classes
    RDD
  71. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  72. def logBasedOnLevel(level: Level)(f: => MessageWithContext): Unit
    Attributes
    protected
    Definition Classes
    Logging
  73. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  74. def logDebug(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  75. def logDebug(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  76. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  77. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  78. def logError(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  79. def logError(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  80. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  81. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  82. def logInfo(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  83. def logInfo(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  84. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  85. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  86. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  87. def logTrace(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  88. def logTrace(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  89. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  90. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  91. def logWarning(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  92. def logWarning(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  93. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  94. def map[U](f: (InternalRow) => U)(implicit arg0: ClassTag[U]): RDD[U]
    Definition Classes
    RDD
  95. def mapPartitions[U](f: (Iterator[InternalRow]) => Iterator[U], preservesPartitioning: Boolean)(implicit arg0: ClassTag[U]): RDD[U]
    Definition Classes
    RDD
  96. def mapPartitionsWithEvaluator[U](evaluatorFactory: PartitionEvaluatorFactory[InternalRow, U])(implicit arg0: ClassTag[U]): RDD[U]
    Definition Classes
    RDD
    Annotations
    @DeveloperApi() @Since("3.5.0")
  97. def mapPartitionsWithIndex[U](f: (Int, Iterator[InternalRow]) => Iterator[U], preservesPartitioning: Boolean)(implicit arg0: ClassTag[U]): RDD[U]
    Definition Classes
    RDD
  98. def max()(implicit ord: Ordering[InternalRow]): InternalRow
    Definition Classes
    RDD
  99. def min()(implicit ord: Ordering[InternalRow]): InternalRow
    Definition Classes
    RDD
  100. var name: String
    Definition Classes
    RDD
  101. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  102. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  103. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  104. def parent[U](j: Int)(implicit arg0: ClassTag[U]): RDD[U]
    Attributes
    protected[spark]
    Definition Classes
    RDD
  105. val partitioner: Option[Partitioner]
    Definition Classes
    RDD
  106. final def partitions: Array[Partition]
    Definition Classes
    RDD
  107. def persist(): JDBCRDD.this.type
    Definition Classes
    RDD
  108. def persist(newLevel: StorageLevel): JDBCRDD.this.type
    Definition Classes
    RDD
  109. def pipe(command: Seq[String], env: Map[String, String], printPipeContext: ((String) => Unit) => Unit, printRDDElement: (InternalRow, (String) => Unit) => Unit, separateWorkingDir: Boolean, bufferSize: Int, encoding: String): RDD[String]
    Definition Classes
    RDD
  110. def pipe(command: String, env: Map[String, String]): RDD[String]
    Definition Classes
    RDD
  111. def pipe(command: String): RDD[String]
    Definition Classes
    RDD
  112. final def preferredLocations(split: Partition): Seq[String]
    Definition Classes
    RDD
  113. val queryExecutionTimeMetric: SQLMetric

    Execution time of the query issued to JDBC connection

  114. def randomSplit(weights: Array[Double], seed: Long): Array[RDD[InternalRow]]
    Definition Classes
    RDD
  115. def reduce(f: (InternalRow, InternalRow) => InternalRow): InternalRow
    Definition Classes
    RDD
  116. def repartition(numPartitions: Int)(implicit ord: Ordering[InternalRow]): RDD[InternalRow]
    Definition Classes
    RDD
  117. def sample(withReplacement: Boolean, fraction: Double, seed: Long): RDD[InternalRow]
    Definition Classes
    RDD
  118. def saveAsObjectFile(path: String): Unit
    Definition Classes
    RDD
  119. def saveAsTextFile(path: String, codec: Class[_ <: CompressionCodec]): Unit
    Definition Classes
    RDD
  120. def saveAsTextFile(path: String): Unit
    Definition Classes
    RDD
  121. def setName(_name: String): JDBCRDD.this.type
    Definition Classes
    RDD
  122. def sortBy[K](f: (InternalRow) => K, ascending: Boolean, numPartitions: Int)(implicit ord: Ordering[K], ctag: ClassTag[K]): RDD[InternalRow]
    Definition Classes
    RDD
  123. def sparkContext: SparkContext
    Definition Classes
    RDD
  124. def subtract(other: RDD[InternalRow], p: Partitioner)(implicit ord: Ordering[InternalRow]): RDD[InternalRow]
    Definition Classes
    RDD
  125. def subtract(other: RDD[InternalRow], numPartitions: Int): RDD[InternalRow]
    Definition Classes
    RDD
  126. def subtract(other: RDD[InternalRow]): RDD[InternalRow]
    Definition Classes
    RDD
  127. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  128. def take(num: Int): Array[InternalRow]
    Definition Classes
    RDD
  129. def takeOrdered(num: Int)(implicit ord: Ordering[InternalRow]): Array[InternalRow]
    Definition Classes
    RDD
  130. def takeSample(withReplacement: Boolean, num: Int, seed: Long): Array[InternalRow]
    Definition Classes
    RDD
  131. def toDebugString: String
    Definition Classes
    RDD
  132. def toJavaRDD(): JavaRDD[InternalRow]
    Definition Classes
    RDD
  133. def toLocalIterator: Iterator[InternalRow]
    Definition Classes
    RDD
  134. def toString(): String
    Definition Classes
    RDD → AnyRef → Any
  135. def top(num: Int)(implicit ord: Ordering[InternalRow]): Array[InternalRow]
    Definition Classes
    RDD
  136. def treeAggregate[U](zeroValue: U, seqOp: (U, InternalRow) => U, combOp: (U, U) => U, depth: Int, finalAggregateOnExecutor: Boolean)(implicit arg0: ClassTag[U]): U
    Definition Classes
    RDD
  137. def treeAggregate[U](zeroValue: U)(seqOp: (U, InternalRow) => U, combOp: (U, U) => U, depth: Int)(implicit arg0: ClassTag[U]): U
    Definition Classes
    RDD
  138. def treeReduce(f: (InternalRow, InternalRow) => InternalRow, depth: Int): InternalRow
    Definition Classes
    RDD
  139. def union(other: RDD[InternalRow]): RDD[InternalRow]
    Definition Classes
    RDD
  140. def unpersist(blocking: Boolean): JDBCRDD.this.type
    Definition Classes
    RDD
  141. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  142. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  143. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  144. def withLogContext(context: Map[String, String])(body: => Unit): Unit
    Attributes
    protected
    Definition Classes
    Logging
  145. def withResources(rp: ResourceProfile): JDBCRDD.this.type
    Definition Classes
    RDD
    Annotations
    @Experimental() @Since("3.1.0")
  146. def zip[U](other: RDD[U])(implicit arg0: ClassTag[U]): RDD[(InternalRow, U)]
    Definition Classes
    RDD
  147. def zipPartitions[B, C, D, V](rdd2: RDD[B], rdd3: RDD[C], rdd4: RDD[D])(f: (Iterator[InternalRow], Iterator[B], Iterator[C], Iterator[D]) => Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[C], arg2: ClassTag[D], arg3: ClassTag[V]): RDD[V]
    Definition Classes
    RDD
  148. def zipPartitions[B, C, D, V](rdd2: RDD[B], rdd3: RDD[C], rdd4: RDD[D], preservesPartitioning: Boolean)(f: (Iterator[InternalRow], Iterator[B], Iterator[C], Iterator[D]) => Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[C], arg2: ClassTag[D], arg3: ClassTag[V]): RDD[V]
    Definition Classes
    RDD
  149. def zipPartitions[B, C, V](rdd2: RDD[B], rdd3: RDD[C])(f: (Iterator[InternalRow], Iterator[B], Iterator[C]) => Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[C], arg2: ClassTag[V]): RDD[V]
    Definition Classes
    RDD
  150. def zipPartitions[B, C, V](rdd2: RDD[B], rdd3: RDD[C], preservesPartitioning: Boolean)(f: (Iterator[InternalRow], Iterator[B], Iterator[C]) => Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[C], arg2: ClassTag[V]): RDD[V]
    Definition Classes
    RDD
  151. def zipPartitions[B, V](rdd2: RDD[B])(f: (Iterator[InternalRow], Iterator[B]) => Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[V]): RDD[V]
    Definition Classes
    RDD
  152. def zipPartitions[B, V](rdd2: RDD[B], preservesPartitioning: Boolean)(f: (Iterator[InternalRow], Iterator[B]) => Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[V]): RDD[V]
    Definition Classes
    RDD
  153. def zipPartitionsWithEvaluator[U](rdd2: RDD[InternalRow], evaluatorFactory: PartitionEvaluatorFactory[InternalRow, U])(implicit arg0: ClassTag[U]): RDD[U]
    Definition Classes
    RDD
    Annotations
    @DeveloperApi() @Since("3.5.0")
  154. def zipWithIndex(): RDD[(InternalRow, Long)]
    Definition Classes
    RDD
  155. def zipWithUniqueId(): RDD[(InternalRow, Long)]
    Definition Classes
    RDD

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from DataSourceMetricsMixin

Inherited from RDD[InternalRow]

Inherited from Logging

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped