public class HiveFileFormat extends Object implements org.apache.spark.sql.execution.datasources.FileFormat, DataSourceRegister, Logging
FileFormat
for writing Hive tables.
TODO: implement the read logic.
Constructor and Description |
---|
HiveFileFormat() |
HiveFileFormat(org.apache.spark.sql.hive.HiveShim.ShimFileSinkDesc fileSinkConf) |
Modifier and Type | Method and Description |
---|---|
scala.Option<StructType> |
inferSchema(SparkSession sparkSession,
scala.collection.immutable.Map<String,String> options,
scala.collection.Seq<org.apache.hadoop.fs.FileStatus> files) |
org.apache.spark.sql.execution.datasources.OutputWriterFactory |
prepareWrite(SparkSession sparkSession,
org.apache.hadoop.mapreduce.Job job,
scala.collection.immutable.Map<String,String> options,
StructType dataSchema) |
String |
shortName()
The string that represents the format that this data source provider uses.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
buildReader, buildReaderWithPartitionValues, isSplitable, supportBatch
initializeLogging, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public HiveFileFormat(org.apache.spark.sql.hive.HiveShim.ShimFileSinkDesc fileSinkConf)
public HiveFileFormat()
public String shortName()
DataSourceRegister
override def shortName(): String = "parquet"
shortName
in interface DataSourceRegister
public scala.Option<StructType> inferSchema(SparkSession sparkSession, scala.collection.immutable.Map<String,String> options, scala.collection.Seq<org.apache.hadoop.fs.FileStatus> files)
inferSchema
in interface org.apache.spark.sql.execution.datasources.FileFormat
public org.apache.spark.sql.execution.datasources.OutputWriterFactory prepareWrite(SparkSession sparkSession, org.apache.hadoop.mapreduce.Job job, scala.collection.immutable.Map<String,String> options, StructType dataSchema)
prepareWrite
in interface org.apache.spark.sql.execution.datasources.FileFormat