public class HiveContext extends SQLContext
Constructor and Description |
---|
HiveContext(SparkContext sc) |
Modifier and Type | Method and Description |
---|---|
<A extends scala.Product> |
createTable(String tableName,
boolean allowExisting,
scala.reflect.api.TypeTags.TypeTag<A> evidence$1)
Creates a table using the schema of the given class.
|
org.apache.spark.sql.SQLContext.SparkPlanner |
hivePlanner() |
SchemaRDD |
hiveql(String hqlQuery)
Executes a query expressed in HiveQL using Spark, returning the result as a SchemaRDD.
|
SchemaRDD |
hql(String hqlQuery)
An alias for `hiveql`.
|
void |
set(String key,
String value) |
cacheTable, createParquetFile, createSchemaRDD, isCached, jsonFile, jsonFile, jsonRDD, jsonRDD, logicalPlanToSparkQuery, parquetFile, registerRDDAsTable, sparkContext, sql, table, uncacheTable
public HiveContext(SparkContext sc)
public SchemaRDD hiveql(String hqlQuery)
public SchemaRDD hql(String hqlQuery)
public <A extends scala.Product> void createTable(String tableName, boolean allowExisting, scala.reflect.api.TypeTags.TypeTag<A> evidence$1)
tableName
- The name of the table to create.allowExisting
- When false, an exception will be thrown if the table already exists.public void set(String key, String value)
public org.apache.spark.sql.SQLContext.SparkPlanner hivePlanner()