class HiveContext extends SQLContext with Logging
An instance of the Spark SQL execution engine that integrates with data stored in Hive. Configuration for Hive is read from hive-site.xml on the classpath.
- Self Type
- HiveContext
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) Use SparkSession.builder.enableHiveSupport instead
- Alphabetic
- By Inheritance
- HiveContext
- SQLContext
- Serializable
- Serializable
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
baseRelationToDataFrame(baseRelation: BaseRelation): DataFrame
- Definition Classes
- SQLContext
-
def
cacheTable(tableName: String): Unit
- Definition Classes
- SQLContext
-
def
clearCache(): Unit
- Definition Classes
- SQLContext
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
createDataFrame(data: List[_], beanClass: Class[_]): DataFrame
- Definition Classes
- SQLContext
-
def
createDataFrame(rdd: JavaRDD[_], beanClass: Class[_]): DataFrame
- Definition Classes
- SQLContext
-
def
createDataFrame(rdd: RDD[_], beanClass: Class[_]): DataFrame
- Definition Classes
- SQLContext
-
def
createDataFrame(rows: List[Row], schema: StructType): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @DeveloperApi()
-
def
createDataFrame(rowRDD: JavaRDD[Row], schema: StructType): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @DeveloperApi()
-
def
createDataFrame(rowRDD: RDD[Row], schema: StructType): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @DeveloperApi()
-
def
createDataFrame[A <: Product](data: Seq[A])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[A]): DataFrame
- Definition Classes
- SQLContext
-
def
createDataFrame[A <: Product](rdd: RDD[A])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[A]): DataFrame
- Definition Classes
- SQLContext
-
def
createDataset[T](data: List[T])(implicit arg0: Encoder[T]): Dataset[T]
- Definition Classes
- SQLContext
-
def
createDataset[T](data: RDD[T])(implicit arg0: Encoder[T]): Dataset[T]
- Definition Classes
- SQLContext
-
def
createDataset[T](data: Seq[T])(implicit arg0: Encoder[T]): Dataset[T]
- Definition Classes
- SQLContext
-
def
dropTempTable(tableName: String): Unit
- Definition Classes
- SQLContext
-
def
emptyDataFrame: DataFrame
- Definition Classes
- SQLContext
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
experimental: ExperimentalMethods
- Definition Classes
- SQLContext
- Annotations
- @Experimental() @transient() @Unstable()
-
def
getAllConfs: Map[String, String]
- Definition Classes
- SQLContext
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getConf(key: String, defaultValue: String): String
- Definition Classes
- SQLContext
-
def
getConf(key: String): String
- Definition Classes
- SQLContext
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
isCached(tableName: String): Boolean
- Definition Classes
- SQLContext
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
listenerManager: ExecutionListenerManager
- Definition Classes
- SQLContext
-
def
log: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logName: String
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newSession(): HiveContext
Returns a new HiveContext as new session, which will have separated SQLConf, UDF/UDAF, temporary tables and SessionState, but sharing the same CacheManager, IsolatedClientLoader and Hive client (both of execution and metadata) with existing HiveContext.
Returns a new HiveContext as new session, which will have separated SQLConf, UDF/UDAF, temporary tables and SessionState, but sharing the same CacheManager, IsolatedClientLoader and Hive client (both of execution and metadata) with existing HiveContext.
- Definition Classes
- HiveContext → SQLContext
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
range(start: Long, end: Long, step: Long, numPartitions: Int): DataFrame
- Definition Classes
- SQLContext
-
def
range(start: Long, end: Long, step: Long): DataFrame
- Definition Classes
- SQLContext
-
def
range(start: Long, end: Long): DataFrame
- Definition Classes
- SQLContext
-
def
range(end: Long): DataFrame
- Definition Classes
- SQLContext
-
def
read: DataFrameReader
- Definition Classes
- SQLContext
-
def
readStream: DataStreamReader
- Definition Classes
- SQLContext
-
def
refreshTable(tableName: String): Unit
Invalidate and refresh all the cached the metadata of the given table.
Invalidate and refresh all the cached the metadata of the given table. For performance reasons, Spark SQL or the external data source library it uses might cache certain metadata about a table, such as the location of blocks. When those change outside of Spark SQL, users should call this function to invalidate the cache.
- Since
1.3.0
-
def
setConf(key: String, value: String): Unit
- Definition Classes
- SQLContext
-
def
setConf(props: Properties): Unit
- Definition Classes
- SQLContext
-
def
sparkContext: SparkContext
- Definition Classes
- SQLContext
-
val
sparkSession: SparkSession
- Definition Classes
- SQLContext
-
def
sql(sqlText: String): DataFrame
- Definition Classes
- SQLContext
-
def
streams: StreamingQueryManager
- Definition Classes
- SQLContext
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
table(tableName: String): DataFrame
- Definition Classes
- SQLContext
-
def
tableNames(databaseName: String): Array[String]
- Definition Classes
- SQLContext
-
def
tableNames(): Array[String]
- Definition Classes
- SQLContext
-
def
tables(databaseName: String): DataFrame
- Definition Classes
- SQLContext
-
def
tables(): DataFrame
- Definition Classes
- SQLContext
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
udf: UDFRegistration
- Definition Classes
- SQLContext
-
def
uncacheTable(tableName: String): Unit
- Definition Classes
- SQLContext
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
applySchema(rdd: JavaRDD[_], beanClass: Class[_]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.0) Use createDataFrame instead.
-
def
applySchema(rdd: RDD[_], beanClass: Class[_]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.0) Use createDataFrame instead.
-
def
applySchema(rowRDD: JavaRDD[Row], schema: StructType): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.0) Use createDataFrame instead.
-
def
applySchema(rowRDD: RDD[Row], schema: StructType): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.0) Use createDataFrame instead.
-
def
createExternalTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use sparkSession.catalog.createTable instead.
-
def
createExternalTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use sparkSession.catalog.createTable instead.
-
def
createExternalTable(tableName: String, source: String, options: Map[String, String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use sparkSession.catalog.createTable instead.
-
def
createExternalTable(tableName: String, source: String, options: Map[String, String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use sparkSession.catalog.createTable instead.
-
def
createExternalTable(tableName: String, path: String, source: String): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use sparkSession.catalog.createTable instead.
-
def
createExternalTable(tableName: String, path: String): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use sparkSession.catalog.createTable instead.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.
-
def
jdbc(url: String, table: String, theParts: Array[String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.jdbc() instead.
-
def
jdbc(url: String, table: String, columnName: String, lowerBound: Long, upperBound: Long, numPartitions: Int): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.jdbc() instead.
-
def
jdbc(url: String, table: String): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.jdbc() instead.
-
def
jsonFile(path: String, samplingRatio: Double): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.json() instead.
-
def
jsonFile(path: String, schema: StructType): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.json() instead.
-
def
jsonFile(path: String): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.json() instead.
-
def
jsonRDD(json: JavaRDD[String], samplingRatio: Double): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.json() instead.
-
def
jsonRDD(json: RDD[String], samplingRatio: Double): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.json() instead.
-
def
jsonRDD(json: JavaRDD[String], schema: StructType): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.json() instead.
-
def
jsonRDD(json: RDD[String], schema: StructType): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.json() instead.
-
def
jsonRDD(json: JavaRDD[String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.json() instead.
-
def
jsonRDD(json: RDD[String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.json() instead.
-
def
load(source: String, schema: StructType, options: Map[String, String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.format(source).schema(schema).options(options).load() instead.
-
def
load(source: String, schema: StructType, options: Map[String, String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.format(source).schema(schema).options(options).load() instead.
-
def
load(source: String, options: Map[String, String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.format(source).options(options).load() instead.
-
def
load(source: String, options: Map[String, String]): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.format(source).options(options).load() instead.
-
def
load(path: String, source: String): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.format(source).load(path) instead.
-
def
load(path: String): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use read.load(path) instead.
-
def
parquetFile(paths: String*): DataFrame
- Definition Classes
- SQLContext
- Annotations
- @deprecated @varargs()
- Deprecated
(Since version 1.4.0) Use read.parquet() instead.