Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 【经验分享】tispark 开启权限认证,sparksession停止了但是jvm不退出

After enabling permission authentication in TiSpark, the JVM does not exit after stopping the SparkSession
Reason:
*

Solution:
Use a custom thread factory and set it to daemon threads.