|
|
Hive Sink |
SPARK_HOME/conf
Required files include:
metastore_db
spark.sql.warehouse.dir
By default the warehouse directory is located at:
spark-warehouse
This directory is used to store Hive tables created by Spark.
Partition Fields : year,month
This means that the data will be stored in a directory structure like:
/warehouse/user_activity/year=2025/month=02/
Mode Description
-------------------------------------------------
append Add new data without deleting old data
overwrite Deleting old data and replacing it with new data
ignore Do nothing
ErrorIfExist Generates an error if the table already exists
Format Description
---------------------------------------
csv Text file with comma separator
parquet Highly efficient columnar format
orc Optimized Row Columnar for Hive
json JSON-based data format
Connection Description
-----------------------------------------------
SparkSession Using Spark SQL to interact with Hive
HiveWarehouseSession Using Hive Warehouse Connector
Spark 2.x
The following libraries must be included when running a Spark job:
hive-warehouse-connector-assembly-1.0.0.3.1.0.0-78.jar
This library is used to enable communication between Spark and Hive LLAP .
| Map Reduce |
Spark 1.x RDD |
Spark 2.x RDD |
Spark 2.x Dataset |
Apache Beam 2.29.0 Batch |
Apache Beam 2.29.0 Streaming |
Apache Flink 1.12.0 Batch |
Apache Flink 1.12.0 Streaming |
Apache Tez 0.9.1 |
PySpark |
|---|---|---|---|---|---|---|---|---|---|