You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/07/20 13:19:44 UTC
[GitHub] [incubator-kyuubi] yaooqinn commented on a diff in pull request #3099: [KYUUBI #3068][DOC] Add the Hudi connector doc for Spark SQL Query Engine
yaooqinn commented on code in PR #3099:
URL: https://github.com/apache/incubator-kyuubi/pull/3099#discussion_r925597893
##########
docs/connector/spark/hudi.rst:
##########
@@ -16,21 +16,70 @@
`Hudi`_
========
+Apache Hudi (pronounced “hoodie”) is the next generation streaming data lake platform.
+Apache Hudi brings core warehouse and database functionality directly to a data lake.
+
+.. tip::
+ This article assumes that you have mastered the basic knowledge and operation of `Hudi`_.
+ For the knowledge about Hudi not mentioned in this article,
+ you can obtain it from its `Official Documentation`_.
+
+By using Kyuubi, we can run SQL queries towards Hudi which is more convenient, easy to understand,
+and easy to expand than directly using Spark to manipulate Hudi.
+
Hudi Integration
----------------
+To enable the integration of kyuubi spark sql engine and Hudi through
+Catalog APIs, you need to:
+
+- Referencing the Hudi :ref:`dependencies`
+- Setting the Spark extension and catalog :ref:`configurations`
+
.. _dependencies:
Dependencies
************
+The **classpath** of kyuubi spark sql engine with Hudi supported consists of
+
+1. kyuubi-spark-sql-engine-|release|.jar, the engine jar deployed with Kyuubi distributions
+2. a copy of spark distribution
+3. hudi-spark<spark.version>-bundle_<scala.version>-<hudi.version>.jar, which can be found in the `Maven Central`_
+
+In order to make the Hudi packages visible for the runtime classpath of engines, we can use one of these methods:
+
+1. Put the Hudi packages into ``$SPARK_HOME/jars`` directly
+2. Set ``spark.jars=/path/to/hudi-spark-bundle``
+
.. _configurations:
Configurations
**************
+To activate functionality of Hudi, we can set the following configurations:
+
+.. code-block:: properties
+ # Spark 3.2
+ spark.serializer=org.apache.spark.serializer.KryoSerializer
+ spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension
+ spark.sql.catalog.spark_catalog=org.apache.spark.sql.hudi.catalog.HoodieCatalog
+
+ # Spark 3.1
+ spark.serializer=org.apache.spark.serializer.KryoSerializer
+ spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension
Hudi Operations
---------------
-.. _Hudi: https://hudi.apache.org/
\ No newline at end of file
+.. code-block:: sql
+
+ CREATE TABLE hudi_cow_nonpcf_tbl (
Review Comment:
how about we add 4 basic examples including `create/insert/select/delete`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org