apache / kyuubi

Apache Kyuubi is a distributed and multi-tenant gateway to provide serverless SQL on data warehouses and lakehouses.
https://kyuubi.apache.org/
Apache License 2.0
2.11k stars 915 forks source link

Shutdown the executor service in KubernetesApplicationOperation and prevent NPE #6785

Open turboFei opened 3 weeks ago

turboFei commented 3 weeks ago

:mag: Description

Issue References ๐Ÿ”—

As title.

Fix NPE, because the cleanupTerminatedAppInfoTrigger will be set to null. https://github.com/apache/kyuubi/blob/d3520ddbcea96ec55c525600126047c44c7adb35/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala#L269

Also shutdown the ExecutorService when KubernetesApplicationOperation stoped.

Describe Your Solution ๐Ÿ”ง

Shutdown the thread executor service and check the null.

Types of changes :bookmark:

Test Plan ๐Ÿงช

Behavior Without This Pull Request :coffin:

Behavior With This Pull Request :tada:

Related Unit Tests


Checklist ๐Ÿ“

Be nice. Be informative.

codecov-commenter commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (d3520dd) to head (78c2a6c).

Files with missing lines Patch % Lines
...kyuubi/engine/KubernetesApplicationOperation.scala 0.00% 7 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6785 +/- ## ====================================== Coverage 0.00% 0.00% ====================================== Files 687 687 Lines 42439 42447 +8 Branches 5793 5796 +3 ====================================== - Misses 42439 42447 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.