HiveClient — Contract for Retrieving Metadata from Hive Metastore
HiveClient
is the contract for…FIXME
Note
|
HiveClientImpl is the only available HiveClient in Spark SQL.
|
HiveClient
offers safe variants of many methods that do not report exceptions when a relational entity is not found in a Hive metastore, e.g. getTableOption for getTable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
package org.apache.spark.sql.hive.client trait HiveClient { // only required methods that have no implementation // FIXME List of the methods def alterPartitions( db: String, table: String, newParts: Seq[CatalogTablePartition]): Unit def getTableOption(dbName: String, tableName: String): Option[CatalogTable] def getPartitions( catalogTable: CatalogTable, partialSpec: Option[TablePartitionSpec] = None): Seq[CatalogTablePartition] def getPartitionsByFilter( catalogTable: CatalogTable, predicates: Seq[Expression]): Seq[CatalogTablePartition] def getPartitionOption( table: CatalogTable, spec: TablePartitionSpec): Option[CatalogTablePartition] def renamePartitions( db: String, table: String, specs: Seq[TablePartitionSpec], newSpecs: Seq[TablePartitionSpec]): Unit } |
Note
|
HiveClient is a private[hive] contract.
|
Method | Description | ||||
---|---|---|---|---|---|
|
|||||
|
Returns the CatalogTablePartition of a table Used exclusively when |
||||
|
|||||
|
|||||
|
Retrieves a table metadata if available Used exclusively when
|
||||
|
Retrieving Table Metadata If Available or Throwing NoSuchTableException — getTable
Method
1 2 3 4 5 |
getTable(dbName: String, tableName: String): CatalogTable |
getTable
retrieves the metadata of a table in a Hive metastore if available or reports a NoSuchTableException
.
Note
|
|