Tispark-assembly-3.1_2.12-3.0.2.jar, unable to display information using Hive JDBC connection

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tispark-assembly-3.1_2.12-3.0.2.jar ,使用hive jdbc连接无法显示信息

| username: TiDBer_J9NiNCXD

Environment Information:
spark-3.1.2 tispark-assembly-3.1_2.12-3.0.2.jar tidb5.4

Issue: After starting the thrift service of Spark and connecting to the TiDB cluster through Hive’s JDBC, the command show databases cannot display the database names and other information of the TiDB cluster. However, tispark-assembly-2.5.0 works fine. Is it because the new version of the tispark jar package is not compatible with Hive JDBC?

| username: 数据小黑 | Original post link

Spark 3.+ needs to switch catalog.

| username: OnTheRoad | Original post link

You need to add an additional catalog setting in the $SPARK_HOME/conf/spark-defaults.conf file to specify the PD address. An example is as follows:

# For TiSpark version >= 2.5.0, please add the following additional configuration to enable Catalog provided by spark-3.0.
spark.sql.catalog.tidb_catalog org.apache.spark.sql.catalyst.catalog.TiCatalog
| username: wfxxh | Original post link

Have you chosen the catalog?

| username: TiDBer_J9NiNCXD | Original post link

This has been added and repeatedly confirmed.

| username: TiDBer_CEVsub | Original post link

This is possible.