Class

org.apache.spark.sql.execution.columnar.impl

BaseColumnFormatRelation

Related Doc: package impl

Permalink

abstract class BaseColumnFormatRelation extends JDBCAppendableRelation with PartitionedDataSourceScan with RowInsertableRelation with MutableRelation

This class acts as a DataSource provider for column format tables provided Snappy. It uses GemFireXD as actual datastore to physically locate the tables. Column tables can be used for storing data in columnar compressed format. A example usage is given below.

val data = Seq(Seq(1, 2, 3), Seq(7, 8, 9), Seq(9, 2, 3), Seq(4, 2, 3), Seq(5, 6, 7)) val rdd = sc.parallelize(data, data.length).map(s => new Data(s(0), s(1), s(2))) val dataDF = snc.createDataFrame(rdd) snc.createTable(tableName, "column", dataDF.schema, props) dataDF.write.insertInto(tableName)

This provider scans underlying tables in parallel and is aware of the data partition. It does not introduces a shuffle if simple table query is fired. One can insert a single or multiple rows into this table as well as do a bulk insert by a Spark DataFrame. Bulk insert example is shown above.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BaseColumnFormatRelation
  2. MutableRelation
  3. RowInsertableRelation
  4. SingleRowInsertableRelation
  5. PartitionedDataSourceScan
  6. JDBCAppendableRelation
  7. Product
  8. Equals
  9. Serializable
  10. Serializable
  11. NativeTableRowLevelSecurityRelation
  12. RowLevelSecurityRelation
  13. Logging
  14. IndexableRelation
  15. PlanInsertableRelation
  16. DestroyRelation
  17. InsertableRelation
  18. PrunedUnsafeFilteredScan
  19. BaseRelation
  20. AnyRef
  21. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BaseColumnFormatRelation(_table: String, _provider: String, _mode: SaveMode, _userSchema: StructType, schemaExtensions: String, ddlExtensionForShadowTable: String, _origOptions: Map[String, String], _externalStore: ExternalStore, partitioningColumns: Seq[String], _context: SQLContext, _relationInfo: (RelationInfo, Option[LocalRegion]))

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var _relationInfoAndRegion: (RelationInfo, Option[LocalRegion])

    Permalink
    Attributes
    protected[this]
    Definition Classes
    NativeTableRowLevelSecurityRelation
  5. var _schema: StructType

    Permalink
    Attributes
    protected[this]
    Definition Classes
    NativeTableRowLevelSecurityRelation
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def buildRowBufferRDD(partitionEvaluator: () ⇒ Array[Partition], requiredColumns: Array[String], filters: Array[Expression], useResultSet: Boolean, projection: Array[Int]): RDD[Any]

    Permalink
  8. def buildUnsafeScan(requiredColumns: Array[String], filters: Array[Expression]): (RDD[Any], Seq[RDD[InternalRow]])

    Permalink
  9. def buildUnsafeScanForSampledRelation(requiredColumns: Array[String], filters: Array[Expression]): (RDD[Any], RDD[Any], Seq[RDD[InternalRow]])

    Permalink
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final val connFactory: () ⇒ Connection

    Permalink
  12. final def connProperties: ConnectionProperties

    Permalink
  13. val connectionType: ConnectionType.Value

    Permalink
  14. def createActualTables(conn: Connection): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    BaseColumnFormatRelationNativeTableRowLevelSecurityRelation
  15. def createIndex(indexIdent: TableIdentifier, tableIdent: TableIdentifier, indexColumns: Map[String, Option[SortDirection]], options: Map[String, String]): Unit

    Permalink

    Create an index on a table.

    Create an index on a table.

    indexIdent

    Index Identifier which goes in the catalog

    tableIdent

    Table identifier on which the index is created.

    indexColumns

    Columns on which the index has to be created with the direction of sorting. Direction can be specified as None.

    options

    Options for indexes. For e.g. column table index - ("COLOCATE_WITH"->"CUSTOMER"). row table index - ("INDEX_TYPE"->"GLOBAL HASH") or ("INDEX_TYPE"->"UNIQUE")

    Definition Classes
    JDBCAppendableRelationIndexableRelation
  16. def createTable(conn: Connection, tableStr: String, tableName: String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    JDBCAppendableRelation
  17. def createTable(mode: SaveMode): Unit

    Permalink
  18. val ddlExtensionForShadowTable: String

    Permalink
  19. var delayRollover: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    JDBCAppendableRelation
  20. def destroy(ifExists: Boolean): Unit

    Permalink

    Destroy and cleanup this relation.

    Destroy and cleanup this relation. It may include, but not limited to, dropping the external table that this relation represents.

    Definition Classes
    BaseColumnFormatRelationDestroyRelation
  21. final def dialect: JdbcDialect

    Permalink
    Attributes
    protected
    Definition Classes
    JDBCAppendableRelationNativeTableRowLevelSecurityRelation
  22. def dropIndex(indexIdent: TableIdentifier, tableIdent: TableIdentifier, ifExists: Boolean): Unit

    Permalink

    Drops an index on this table

    Drops an index on this table

    indexIdent

    Index identifier

    tableIdent

    Table identifier

    ifExists

    Drop if exists

    Definition Classes
    JDBCAppendableRelationIndexableRelation
  23. def enableOrDisableRowLevelSecurity(tableIdent: TableIdentifier, enableRowLevelSecurity: Boolean): Unit

    Permalink
  24. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. def executeUpdate(sql: String, defaultSchema: String): Int

    Permalink

    Execute a DML SQL and return the number of rows affected.

    Execute a DML SQL and return the number of rows affected.

    Definition Classes
    BaseColumnFormatRelationSingleRowInsertableRelation
  26. val externalStore: ExternalStore

    Permalink
    Definition Classes
    JDBCAppendableRelation
  27. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def flushRowBuffer(): Unit

    Permalink
  29. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  30. def getColumnBatchParams: (Int, Int, String)

    Permalink
    Definition Classes
    JDBCAppendableRelation
  31. def getColumnBatchStatistics(schema: Seq[AttributeReference]): PartitionStatistics

    Permalink
  32. def getCompressionCodec: String

    Permalink
    Definition Classes
    JDBCAppendableRelation
  33. def getDeletePlan(relation: LogicalRelation, child: SparkPlan, keyColumns: Seq[Attribute]): SparkPlan

    Permalink

    Get a spark plan to delete rows the relation.

    Get a spark plan to delete rows the relation. The result of SparkPlan execution should be a count of number of updated rows.

    Definition Classes
    BaseColumnFormatRelationMutableRelation
  34. def getInsertPlan(relation: LogicalRelation, child: SparkPlan): SparkPlan

    Permalink

    Get a spark plan for insert.

    Get a spark plan for insert. The result of SparkPlan execution should be a count of number of inserted rows.

    Definition Classes
    BaseColumnFormatRelationPlanInsertableRelation
  35. def getKeyColumns: Seq[String]

    Permalink

    Get the "key" columns for the table that need to be projected out by UPDATE and DELETE operations for affecting the selected rows.

    Get the "key" columns for the table that need to be projected out by UPDATE and DELETE operations for affecting the selected rows.

    Definition Classes
    BaseColumnFormatRelationMutableRelation
  36. def getPrimaryKeyColumns: Seq[String]

    Permalink

    Get key columns of the column table

    Get key columns of the column table

    Definition Classes
    BaseColumnFormatRelationMutableRelation
  37. def getUpdatePlan(relation: LogicalRelation, child: SparkPlan, updateColumns: Seq[Attribute], updateExpressions: Seq[Expression], keyColumns: Seq[Attribute]): SparkPlan

    Permalink

    Get a spark plan to update rows in the relation.

    Get a spark plan to update rows in the relation. The result of SparkPlan execution should be a count of number of updated rows.

    Definition Classes
    BaseColumnFormatRelationMutableRelation
  38. def initializeLogIfNecessary(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  39. def insert(rows: Seq[Row]): Int

    Permalink

    Insert a sequence of rows into the table represented by this relation.

    Insert a sequence of rows into the table represented by this relation.

    rows

    the rows to be inserted

    returns

    number of rows inserted

    Definition Classes
    BaseColumnFormatRelationRowInsertableRelation
  40. def insert(data: DataFrame, overwrite: Boolean): Unit

    Permalink
    Definition Classes
    JDBCAppendableRelation → InsertableRelation
  41. final def isDebugEnabled: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  42. final def isInfoEnabled: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  43. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  44. def isPartitioned: Boolean

    Permalink
  45. def isRowLevelSecurityEnabled: Boolean

    Permalink
  46. final def isRowTable: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    JDBCAppendableRelationNativeTableRowLevelSecurityRelation
  47. final def isTraceEnabled: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  48. final var levelFlags: Int

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  49. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  50. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  51. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  52. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  53. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  54. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  55. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  56. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  57. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  58. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  59. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  60. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  61. final var log_: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  62. val mode: SaveMode

    Permalink
    Definition Classes
    JDBCAppendableRelation
  63. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  64. val needConversion: Boolean

    Permalink
    Definition Classes
    JDBCAppendableRelation → BaseRelation
  65. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  66. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  67. def numBuckets: Int

    Permalink
  68. val origOptions: Map[String, String]

    Permalink
    Definition Classes
    JDBCAppendableRelation
  69. def partitionColumns: Seq[String]

    Permalink

    Get the partitioning columns for the table, if any.

    Get the partitioning columns for the table, if any.

    Definition Classes
    BaseColumnFormatRelationMutableRelationPartitionedDataSourceScan
  70. val partitioningColumns: Seq[String]

    Permalink
  71. val provider: String

    Permalink
    Definition Classes
    JDBCAppendableRelation
  72. def refreshTableSchema(invalidateCached: Boolean, fetchFromStore: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    NativeTableRowLevelSecurityRelation
  73. lazy val region: LocalRegion

    Permalink
  74. def relationInfo: RelationInfo

    Permalink
  75. def relationInfoAndRegion: (RelationInfo, Option[LocalRegion])

    Permalink
    Attributes
    protected
    Definition Classes
    NativeTableRowLevelSecurityRelation
  76. def resetLogger(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  77. final def resolvedName: String

    Permalink
  78. lazy val rowInsertStr: String

    Permalink
  79. def scanTable(tableName: String, requiredColumns: Array[String], filters: Array[Expression], _ignore: () ⇒ Int): (RDD[Any], Array[Int])

    Permalink
  80. def schema: StructType

    Permalink
    Definition Classes
    NativeTableRowLevelSecurityRelation → BaseRelation
  81. val schemaExtensions: String

    Permalink
  82. lazy val schemaName: String

    Permalink
  83. def sizeInBytes: Long

    Permalink
    Definition Classes
    JDBCAppendableRelation → BaseRelation
  84. val sqlContext: SQLContext

    Permalink
    Definition Classes
    JDBCAppendableRelationNativeTableRowLevelSecurityRelation → BaseRelation
  85. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  86. val table: String

    Permalink
  87. lazy val tableName: String

    Permalink
  88. def toString(): String

    Permalink
    Definition Classes
    BaseColumnFormatRelationJDBCAppendableRelation → AnyRef → Any
  89. def truncate(): Unit

    Permalink

    Truncate the table represented by this relation.

    Truncate the table represented by this relation.

    Definition Classes
    BaseColumnFormatRelationDestroyRelation
  90. def unhandledFilters(filters: Seq[Expression]): Seq[Expression]

    Permalink

    Returns the list of Expressions that this datasource may not be able to handle.

    Returns the list of Expressions that this datasource may not be able to handle. By default, this function will return all filters, as it is always safe to double evaluate an Expression.

    Definition Classes
    BaseColumnFormatRelationPrunedUnsafeFilteredScan
  91. def unhandledFilters(filters: Array[Filter]): Array[Filter]

    Permalink
    Definition Classes
    BaseRelation
  92. val userSchema: StructType

    Permalink
    Definition Classes
    JDBCAppendableRelation
  93. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  94. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  95. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  96. def withKeyColumns(relation: LogicalRelation, keyColumns: Seq[String]): LogicalRelation

    Permalink

    If required inject the key columns in the original relation.

    If required inject the key columns in the original relation.

    Definition Classes
    MutableRelation
  97. def withoutUserSchema: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    BaseColumnFormatRelationNativeTableRowLevelSecurityRelation

Inherited from MutableRelation

Inherited from RowInsertableRelation

Inherited from PartitionedDataSourceScan

Inherited from JDBCAppendableRelation

Inherited from Product

Inherited from Equals

Inherited from Serializable

Inherited from Serializable

Inherited from RowLevelSecurityRelation

Inherited from Logging

Inherited from IndexableRelation

Inherited from PlanInsertableRelation

Inherited from DestroyRelation

Inherited from InsertableRelation

Inherited from PrunedUnsafeFilteredScan

Inherited from BaseRelation

Inherited from AnyRef

Inherited from Any

Ungrouped