How to Dynamically Add TiSpark Component to a TiDB Cluster with TLS Enabled

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

Original topic: 开启tls的tidb集群如何动态添加tispark组件

| username: WRAllen

[Test Environment for TiDB] Testing Environment
The version is 5.4. How can I dynamically expand TiSpark in an existing cluster (with TLS authentication enabled)?
I used the scale-out.yaml format and executed tiup cluster scale-out tidb-test scale-out.yaml, but I got the following message:
image
How can I add the TiSpark machine to the existing cluster?
Additional information:
There is an existing independent Spark cluster (version 3.3)
The TiSpark package is: tispark-assembly-3.3_2.12-3.2.0.jar

| username: WalterWj | Original post link

Do not use tiup to install Spark in production; the Spark installed by tiup does not have high availability.

| username: WRAllen | Original post link

Uh, it’s just a test environment to verify something… How do you expand it, boss? The old cluster already has data in it.

| username: WalterWj | Original post link

The error indicates that TiSpark does not support TLS.

| username: WRAllen | Original post link

Is there an official explanation? Is it not supported to add dynamically? Shutting down the cluster, configuring it, and then restarting it would also work.

| username: WalterWj | Original post link

It looks like we need to upgrade to 3.0, and the Spark configuration files need to be adjusted accordingly. I haven’t done it before, so I’m not sure. Please research it and share your findings.

| username: WRAllen | Original post link

TiSpark is using the latest version 3.2.0. I’ve searched for a long time but couldn’t find an answer. Let’s see if any other experts know…

| username: WalterWj | Original post link

Manually modify it

| username: WRAllen | Original post link

I tried it, but it still doesn’t work…

| username: WalterWj | Original post link

I see it on the official website.


But I haven’t tried it…

| username: WRAllen | Original post link

This configuration is for Spark, and adding TiSpark to the existing TiDB cluster is not the same thing, right?

| username: WalterWj | Original post link

I recommend manually deploying Spark and TiSpark.

TiSpark is actually just a jar package, simply a “bridge” for Spark to access TiKV/TiFlash.

| username: WRAllen | Original post link

Yes, the current issue is that after configuring Spark, I encountered an access error. I believe it’s because the topology of my TiDB cluster hasn’t been configured with TiSpark. If that’s not the case, could you please advise? (So, can I use Spark directly without configuring TiSpark on the TiDB side?)
The Spark error message is as follows:

| username: WalterWj | Original post link

No, it needs to be configured.
My test environment # did not enable TLS


When using it, use tidb_catalog first: TiSpark 用户指南 | PingCAP 文档中心

Otherwise, it defaults to querying Hive, if I remember correctly.

| username: WalterWj | Original post link

There is no problem with the query.

| username: WalterWj | Original post link

However, I tried it without using cat, and it seems to work as well. :thinking:

| username: WRAllen | Original post link

The question then goes back to how to expand TiSpark nodes on a cluster with TLS authentication enabled. :slightly_frowning_face:

| username: WalterWj | Original post link

Tomorrow I will study it in my environment :thinking: