Skip to content

[KYUUBI #7664][DOC] Reformat and improve docs for KSHC - #7667

Open
maomaodev wants to merge 7 commits into
apache:masterfrom
maomaodev:kyuubi-7664
Open

[KYUUBI #7664][DOC] Reformat and improve docs for KSHC#7667
maomaodev wants to merge 7 commits into
apache:masterfrom
maomaodev:kyuubi-7664

Conversation

@maomaodev

Copy link
Copy Markdown
Contributor

Why are the changes needed?

  1. Reformat KSHC docs from RST to Markdown, as described in the issue 📝 Consolidate a documentation format to a single approach #7434.
  2. Enrich the description for KSCH.

How was this patch tested?

Tested by building the documentation and comparing the pages against the live site:

open https://kyuubi.readthedocs.io/en/master/connector/spark/hive.html
open _build/html/connector/spark/hive.html

Was this patch assisted by generative AI tooling?

Assisted-by: DeepSeek-V4-Pro

@github-actions github-actions Bot added the kind:documentation Documentation is a feature! label Aug 27, 2026
Comment thread docs/connector/spark/hive.md Outdated
for such cases, consider setting up Cross-Realm Kerberos trusts, then you just need to talk with one KDC.

For HMS Thrift API used by Spark, it's known that Hive 2.3.9 client is compatible with HMS from 2.1 to 4.0, and
Hive 2.3.10 client is compatible with HMS from 1.1 to 4.0, such version combinations should cover the most cases.

@pan3793 pan3793 Aug 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the claim is no longer valid; HIVE-26537 (4.1.0, 4.0.1) actually broke the Thrift wire protocol by removing the Thrift API used by Spark (the get_table method).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so let's be conservative, replace the 4.0 with 3.1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, replaced 4.0 with 3.1 for both Hive client versions.

Comment thread docs/connector/spark/hive.md Outdated
Since v1.13.0, KSHC supports Dynamic Partition Pruning (DPP) for partitioned Hive tables, which
significantly reduces the amount of data scanned when joining against large partitioned tables.
DPP is implemented by wrapping Spark's built-in `ParquetScan` / `OrcScan`. As a result, native
engines such as Gluten and Comet cannot recognize these scans by class name, so KSHC-converted

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can promise nothing for those ecosystem projects because they use the spark private api, I would drop this statement

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped the statement entirely.

Comment thread docs/connector/spark/hive.md Outdated

Currently, KSHC has the following limitations:

- KSHC does not support Hive functions / UDFs.

@pan3793 pan3793 Aug 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might confuse and scare users, since it can be interpreted as:

"all my existing Hive UDFs, including those ADD JAR ... and CREATE TEMPORARY FUNCTION ..., will stop working if I want to use KSHC"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrased to clarify that only persistent views/UDFs (CREATE VIEW / CREATE FUNCTION / SHOW VIEWS / SHOW FUNCTIONS) fail through a KSHC catalog, while temporary views and temporary functions are unaffected. Also added spark_catalog as the workaround.

Comment thread docs/connector/spark/hive.md Outdated
```{note}
Catalog-level configurations (`spark.sql.catalog.<catalog>.*`) are captured when the catalog is
initialized, so they must be present at the Spark application bootstrap (in `spark-defaults.conf`
or via `--conf`). Setting them through `SET` after the catalog has been created does not take

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... so they must be present at the Spark application bootstrap (in spark-defaults.conf or via --conf).

I don't think the "must" is correct, the V2 session catalog is lazily initialized and session-isolated, so technically configs will take effect as long as it set before the catalog is initialized, of course, for ONE_FOR_ALL, configs only apply to the first initialized Hive client instance.

What matters here is that, for the kerberized cluster mode, if you want to distribute HMS tokens (non-keytab mode), you must declare all catalogs with metastore.uris at bootstrap so that spark-submit can fetch the HMS tokens ahead.

The above words are just an explanation, which do not fit the docs standard and need to be reorganized and polished

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, the V2 catalog is lazily initialized and session-isolated, so configs apply as long as they're set before first access. Only the Kerberized cluster mode (no keytab) genuinely needs metastore.uris declared at bootstrap.

Comment thread docs/connector/spark/hive.md Outdated
Comment thread docs/connector/spark/hive.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:documentation Documentation is a feature!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants