apache / apache/kyuubi

[Bug]

Open
#7,321 2 comments 0 reactions 0 assignees View on GitHub
kind:bug priority:major
Dominant language
Scala
Stars
2.4k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

### Search before asking

- [x] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.

### Describe the bug

WARN AtlasLineageDispatcher: Send lineage to atlas failed. java.lang.IllegalStateException: Shutdown in progress, cannot add a shutdownHook

### Affects Version(s)

master

### Kyuubi Server Log Output

```logtalk

```

### Kyuubi Engine Log Output

```logtalk

```

### Kyuubi Server Configurations

```yaml

```

### Kyuubi Engine Configurations

```yaml

```

### Additional context

Hello, I’m a student studying big data, and recently I’ve been researching the integration of Apache Atlas and Spark lineage. I noticed that the Kyuubi extension you contributed can send Spark lineage to Atlas. However, in my usage, when I execute a single SQL statement using spark-sql -e, I encounter the following error:

WARN AtlasLineageDispatcher: Send lineage to atlas failed. java.lang.IllegalStateException: Shutdown in progress, cannot add a shutdownHook

As a result, the lineage data cannot be uploaded to Atlas. But if I run multiple SQL statements, it seems to “warm up” the Atlas client, and the error does not occur. Do you know how I could optimize this so that lineage can be sent successfully even when running only a single SQL statement?

### Are you willing to submit PR?

- [x] #7322
- [ ] No. I cannot submit a PR at this time.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the AtlasLineageDispatcher warning with a single SQL statement using spark-sql -e, then inspect the Atlas lineage integration and its shutdown-hook initialization. The fix is done when lineage uploads successfully for one statement without the shutdown-in-progress warning, while the existing multi-statement behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala, spark
Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.