Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiSpark跟TiDB版本兼容性问题
[TiDB Usage Environment] Production Environment
[TiDB Version] 7.1.3
[Spark Version] 3.1.3
[TiSpark Version] Still using the old tispark-assembly-3.1-2.5.2.jar
[Encountered Problem: Problem Phenomenon and Impact] After upgrading TiDB to version 7, unable to connect to TiDB using PySpark
[Problem Screenshot] The official website does not provide the corresponding TiSpark version for TiDB 7.x, how to solve this?
If you use TiSpark, upgrade the version to 6.5.
Was it working well before? Is the PD information configured correctly?
Besides, just use TiKV/TiFlash directly.
TiSpark is no longer maintained, but using the latest TiSpark 3.1.x can still extract data from databases version 7.1 and above. However, it is recommended to find an alternative solution since TiSpark is no longer maintained.
Additionally, based on the error message, did you write the correct address for your PD, and is the network policy working?
This error seems unrelated to the version; it feels like pd spark cannot connect.
TiSpark is a thin layer for Spark to access the TiKV cluster. When Spark starts, it registers the cluster’s PD address through TiSpark to obtain metadata information such as the cluster’s databases and tables.
Based on the error message posted by the original poster, Spark is unable to register with PD when it starts. Therefore, you can troubleshoot and confirm the following:
- Is the current cluster accessible?
- Are the IP address and port of PD normal?
- Is the network access from the YARN cluster, including Spark driver and other Spark cluster machines, to the target TiDB cluster normal?
Check these first.
Try using the latest 3.2.x version.
TiDB version 7.1.1, used in a production environment with Spark 3.3.x and 3.1.x. TiSpark uses tispark-assembly-3.3_2.12-3.1.3.jar. It is currently in normal use without any issues. I suggest you check the PD connection problem.
Let’s try upgrading the version, upgrading might solve the bug.
Try upgrading the version.
Try upgrading the version.