How to close the Kyuubi session and spark cluster? #4449
-
I am currently using JayDeBeApi to connect to kyuubi service on K8S to run some SQL queries on Spark. The usage is like this import jaydebeapi
connection = jaydebeapi.connect("org.apache.kyuubi.jdbc.KyuubiHiveDriver", <kyuubi service endpoint>, jars = [<kyuubi_jdbc_hive_jar>])
cursor = connection.cursor()
cursor.execute(<sql query>)
cursor.close()
connection.close() I meet a problem when doing this, which I cannot close the Kyuubi session and the Spark cluster. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
If you want to terminate the spark app when closing the connection, you need to set the share level to CONNECTION, see https://kyuubi.readthedocs.io/en/master/deployment/engine_lifecycle.html. |
Beta Was this translation helpful? Give feedback.
-
Another thread shuts down the currently running connection, which should do just that |
Beta Was this translation helpful? Give feedback.
-
Setting |
Beta Was this translation helpful? Give feedback.
If you want to terminate the spark app when closing the connection, you need to set the share level to CONNECTION, see https://kyuubi.readthedocs.io/en/master/deployment/engine_lifecycle.html.