$SPARK_HOME/conf/spark-defaults.conf 需要额外增加 catalog 设置,指定 PD 地址。示例如下:
# 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
spark.sql.catalog.tidb_catalog.pd.addresses 192.168.3.221:2379,192.168.3.222:2379,192.168.3.223:2379