public class HiveUtils
extends java.lang.Object
Constructor and Description |
---|
HiveUtils() |
Modifier and Type | Method and Description |
---|---|
static |
CONVERT_CTAS() |
static |
CONVERT_METASTORE_ORC() |
static |
CONVERT_METASTORE_PARQUET_WITH_SCHEMA_MERGING() |
static |
CONVERT_METASTORE_PARQUET() |
static |
HIVE_EXECUTION_VERSION() |
static |
HIVE_METASTORE_BARRIER_PREFIXES() |
static |
HIVE_METASTORE_JARS() |
static |
HIVE_METASTORE_SHARED_PREFIXES() |
static |
HIVE_METASTORE_VERSION() |
static |
HIVE_THRIFT_SERVER_ASYNC() |
static java.lang.String |
hiveExecutionVersion()
The version of hive used internally by Spark SQL.
|
protected static void |
initializeLogIfNecessary(boolean isInterpreter) |
protected static boolean |
isTraceEnabled() |
protected static org.slf4j.Logger |
log() |
protected static void |
logDebug(scala.Function0<java.lang.String> msg) |
protected static void |
logDebug(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logError(scala.Function0<java.lang.String> msg) |
protected static void |
logError(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logInfo(scala.Function0<java.lang.String> msg) |
protected static void |
logInfo(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static java.lang.String |
logName() |
protected static void |
logTrace(scala.Function0<java.lang.String> msg) |
protected static void |
logTrace(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logWarning(scala.Function0<java.lang.String> msg) |
protected static void |
logWarning(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static org.apache.spark.sql.hive.client.HiveClientImpl |
newClientForExecution(SparkConf conf,
org.apache.hadoop.conf.Configuration hadoopConf)
Create a
HiveClient used for execution. |
protected static org.apache.spark.sql.hive.client.HiveClient |
newClientForMetadata(SparkConf conf,
org.apache.hadoop.conf.Configuration hadoopConf)
Create a
HiveClient used to retrieve metadata from the Hive MetaStore. |
protected static org.apache.spark.sql.hive.client.HiveClient |
newClientForMetadata(SparkConf conf,
org.apache.hadoop.conf.Configuration hadoopConf,
scala.collection.immutable.Map<java.lang.String,java.lang.String> configurations) |
static scala.collection.immutable.Map<java.lang.String,java.lang.String> |
newTemporaryConfiguration(boolean useInMemoryDerby)
Constructs a configuration for hive, where the metastore is located in a temp directory.
|
protected static scala.collection.Seq<org.apache.spark.sql.types.AtomicType> |
primitiveTypes() |
protected static java.lang.String |
toHiveString(scala.Tuple2<java.lang.Object,DataType> a) |
protected static java.lang.String |
toHiveStructString(scala.Tuple2<java.lang.Object,DataType> a)
Hive outputs fields of structs slightly differently than top level attributes.
|
static SparkContext |
withHiveExternalCatalog(SparkContext sc) |
public static SparkContext withHiveExternalCatalog(SparkContext sc)
public static java.lang.String hiveExecutionVersion()
public staticHIVE_METASTORE_VERSION()
public staticHIVE_EXECUTION_VERSION()
public staticHIVE_METASTORE_JARS()
public staticCONVERT_METASTORE_PARQUET()
public staticCONVERT_METASTORE_PARQUET_WITH_SCHEMA_MERGING()
public staticCONVERT_CTAS()
public staticCONVERT_METASTORE_ORC()
public staticHIVE_METASTORE_SHARED_PREFIXES()
public staticHIVE_METASTORE_BARRIER_PREFIXES()
public staticHIVE_THRIFT_SERVER_ASYNC()
protected static org.apache.spark.sql.hive.client.HiveClientImpl newClientForExecution(SparkConf conf, org.apache.hadoop.conf.Configuration hadoopConf)
HiveClient
used for execution.
Currently this must always be Hive 13 as this is the version of Hive that is packaged with Spark SQL. This copy of the client is used for execution related tasks like registering temporary functions or ensuring that the ThreadLocal SessionState is correctly populated. This copy of Hive is *not* used for storing persistent metadata, and only point to a dummy metastore in a temporary directory.
conf
- (undocumented)hadoopConf
- (undocumented)protected static org.apache.spark.sql.hive.client.HiveClient newClientForMetadata(SparkConf conf, org.apache.hadoop.conf.Configuration hadoopConf)
HiveClient
used to retrieve metadata from the Hive MetaStore.
The version of the Hive client that is used here must match the metastore that is configured in the hive-site.xml file.
conf
- (undocumented)hadoopConf
- (undocumented)protected static org.apache.spark.sql.hive.client.HiveClient newClientForMetadata(SparkConf conf, org.apache.hadoop.conf.Configuration hadoopConf, scala.collection.immutable.Map<java.lang.String,java.lang.String> configurations)
public static scala.collection.immutable.Map<java.lang.String,java.lang.String> newTemporaryConfiguration(boolean useInMemoryDerby)
protected static scala.collection.Seq<org.apache.spark.sql.types.AtomicType> primitiveTypes()
protected static java.lang.String toHiveString(scala.Tuple2<java.lang.Object,DataType> a)
protected static java.lang.String toHiveStructString(scala.Tuple2<java.lang.Object,DataType> a)
protected static java.lang.String logName()
protected static org.slf4j.Logger log()
protected static void logInfo(scala.Function0<java.lang.String> msg)
protected static void logDebug(scala.Function0<java.lang.String> msg)
protected static void logTrace(scala.Function0<java.lang.String> msg)
protected static void logWarning(scala.Function0<java.lang.String> msg)
protected static void logError(scala.Function0<java.lang.String> msg)
protected static void logInfo(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logDebug(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logTrace(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logWarning(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logError(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static boolean isTraceEnabled()
protected static void initializeLogIfNecessary(boolean isInterpreter)