public class TestSQLContext extends SQLContext
Modifier and Type | Class and Description |
---|---|
static class |
org.apache.spark.sql.SQLConf.Deprecated$ |
Constructor and Description |
---|
TestSQLContext() |
Modifier and Type | Method and Description |
---|---|
String |
AUTO_BROADCASTJOIN_THRESHOLD() |
int |
autoBroadcastJoinThreshold()
Upper bound on the sizes (in bytes) of the tables qualified for the auto conversion to
a broadcast value during the physical executions of join operations.
|
void |
clear() |
String |
CODEGEN_ENABLED() |
boolean |
codegenEnabled()
When set to true, Spark SQL will use the Scala compiler at runtime to generate custom bytecode
that evaluates expressions found in queries.
|
String |
COLUMN_BATCH_SIZE() |
int |
columnBatchSize()
The number of rows that will be
|
String |
COMPRESS_CACHED() |
String |
DEFAULT_SIZE_IN_BYTES() |
long |
defaultSizeInBytes()
The default size in bytes to assign to a logical operator's estimation statistics.
|
String |
dialect()
The SQL dialect that is used when parsing queries.
|
String |
DIALECT() |
scala.collection.immutable.Map<String,String> |
getAllConfs()
Return all the configuration properties that have been set (i.e.
|
String |
getConf(String key)
Return the value of Spark SQL configuration property for the given key.
|
String |
getConf(String key,
String defaultValue)
Return the value of Spark SQL configuration property for the given key.
|
boolean |
isParquetBinaryAsString()
When set to true, we always treat byte arrays in Parquet files as strings.
|
int |
numShufflePartitions()
Number of partitions to use for shuffle operators.
|
String |
PARQUET_BINARY_AS_STRING() |
String |
PARQUET_CACHE_METADATA() |
String |
PARQUET_COMPRESSION() |
String |
parquetCompressionCodec()
The compression codec for writing to a Parquetfile
|
<T> void |
registerFunction(String name,
scala.Function1<?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$1)
registerFunction 1-22 were generated by this script
|
<T> void |
registerFunction(String name,
scala.Function10<?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$10) |
<T> void |
registerFunction(String name,
scala.Function11<?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$11) |
<T> void |
registerFunction(String name,
scala.Function12<?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$12) |
<T> void |
registerFunction(String name,
scala.Function13<?,?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$13) |
<T> void |
registerFunction(String name,
scala.Function14<?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$14) |
<T> void |
registerFunction(String name,
scala.Function15<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$15) |
<T> void |
registerFunction(String name,
scala.Function16<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$16) |
<T> void |
registerFunction(String name,
scala.Function17<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$17) |
<T> void |
registerFunction(String name,
scala.Function18<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$18) |
<T> void |
registerFunction(String name,
scala.Function19<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$19) |
<T> void |
registerFunction(String name,
scala.Function2<?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$2) |
<T> void |
registerFunction(String name,
scala.Function20<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$20) |
<T> void |
registerFunction(String name,
scala.Function21<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$21) |
<T> void |
registerFunction(String name,
scala.Function22<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$22) |
<T> void |
registerFunction(String name,
scala.Function3<?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$3) |
<T> void |
registerFunction(String name,
scala.Function4<?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$4) |
<T> void |
registerFunction(String name,
scala.Function5<?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$5) |
<T> void |
registerFunction(String name,
scala.Function6<?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$6) |
<T> void |
registerFunction(String name,
scala.Function7<?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$7) |
<T> void |
registerFunction(String name,
scala.Function8<?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$8) |
<T> void |
registerFunction(String name,
scala.Function9<?,?,?,?,?,?,?,?,?,T> func,
scala.reflect.api.TypeTags.TypeTag<T> evidence$9) |
void |
registerPython(String name,
byte[] command,
java.util.Map<String,String> envVars,
java.util.List<String> pythonIncludes,
String pythonExec,
Accumulator<java.util.List<byte[]>> accumulator,
String stringDataType) |
void |
setConf(java.util.Properties props)
Set Spark SQL configuration properties.
|
void |
setConf(String key,
String value)
Set the given Spark SQL configuration property.
|
java.util.Map<String,String> |
settings()
Only low degree of contention is expected for conf, thus NOT using ConcurrentHashMap.
|
String |
SHUFFLE_PARTITIONS() |
String |
THRIFTSERVER_POOL() |
boolean |
useCompression()
When true tables cached using the in-memory columnar caching will be compressed.
|
applySchema, cacheTable, createParquetFile, createSchemaRDD, isCached, jsonFile, jsonFile, jsonFile, jsonRDD, jsonRDD, jsonRDD, logicalPlanToSparkQuery, parquetFile, registerRDDAsTable, sparkContext, sql, table, uncacheTable
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialized, initializeIfNecessary, initializeLogging, initLock, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public String COMPRESS_CACHED()
public String COLUMN_BATCH_SIZE()
public String AUTO_BROADCASTJOIN_THRESHOLD()
public String DEFAULT_SIZE_IN_BYTES()
public String SHUFFLE_PARTITIONS()
public String CODEGEN_ENABLED()
public String DIALECT()
public String PARQUET_BINARY_AS_STRING()
public String PARQUET_CACHE_METADATA()
public String PARQUET_COMPRESSION()
public String THRIFTSERVER_POOL()
public java.util.Map<String,String> settings()
public String dialect()
When using a HiveContext, this value defaults to 'hiveql', which uses the Hive 0.12.0 HiveQL parser. Users can change this to 'sql' if they want to run queries that aren't supported by HiveQL (e.g., SELECT 1).
Note that the choice of dialect does not affect things like what tables are available or how query execution is performed.
public boolean useCompression()
public String parquetCompressionCodec()
public int columnBatchSize()
public int numShufflePartitions()
public boolean codegenEnabled()
Defaults to false as this feature is currently experimental.
public int autoBroadcastJoinThreshold()
Hive setting: hive.auto.convert.join.noconditionaltask.size, whose default value is also 10000.
public long defaultSizeInBytes()
autoBroadcastJoinThreshold
, hence any logical operator
without a properly implemented estimation of this statistic will not be incorrectly broadcasted
in joins.public boolean isParquetBinaryAsString()
public void setConf(java.util.Properties props)
public void setConf(String key, String value)
public String getConf(String key)
public String getConf(String key, String defaultValue)
defaultValue
.public scala.collection.immutable.Map<String,String> getAllConfs()
public void clear()
public void registerPython(String name, byte[] command, java.util.Map<String,String> envVars, java.util.List<String> pythonIncludes, String pythonExec, Accumulator<java.util.List<byte[]>> accumulator, String stringDataType)
public <T> void registerFunction(String name, scala.Function1<?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$1)
(1 to 22).map { x => val types = (1 to x).map(x => "_").reduce(_ + ", " + _) s""" def registerFunction[T: TypeTag](name: String, func: Function$x[$types, T]): Unit = { def builder(e: Seq[Expression]) = ScalaUdf(func, ScalaReflection.schemaFor(typeTag[T]).dataType, e) functionRegistry.registerFunction(name, builder) } """ }
public <T> void registerFunction(String name, scala.Function2<?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$2)
public <T> void registerFunction(String name, scala.Function3<?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$3)
public <T> void registerFunction(String name, scala.Function4<?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$4)
public <T> void registerFunction(String name, scala.Function5<?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$5)
public <T> void registerFunction(String name, scala.Function6<?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$6)
public <T> void registerFunction(String name, scala.Function7<?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$7)
public <T> void registerFunction(String name, scala.Function8<?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$8)
public <T> void registerFunction(String name, scala.Function9<?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$9)
public <T> void registerFunction(String name, scala.Function10<?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$10)
public <T> void registerFunction(String name, scala.Function11<?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$11)
public <T> void registerFunction(String name, scala.Function12<?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$12)
public <T> void registerFunction(String name, scala.Function13<?,?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$13)
public <T> void registerFunction(String name, scala.Function14<?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$14)
public <T> void registerFunction(String name, scala.Function15<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$15)
public <T> void registerFunction(String name, scala.Function16<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$16)
public <T> void registerFunction(String name, scala.Function17<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$17)
public <T> void registerFunction(String name, scala.Function18<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$18)
public <T> void registerFunction(String name, scala.Function19<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$19)
public <T> void registerFunction(String name, scala.Function20<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$20)
public <T> void registerFunction(String name, scala.Function21<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$21)
public <T> void registerFunction(String name, scala.Function22<?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,T> func, scala.reflect.api.TypeTags.TypeTag<T> evidence$22)