apache / apache/kyuubi

[Bug] ApplicationOperation uses conf instead of sessionConf

Open
#6,385 2 comments 1 reaction 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

When using a Kyuubi cluster to proxy multiple big data environments, we use the kyuubi.engineEnv.HADOOP_CONF_DIR in sessionConf to specify the configuration related to the big data environment. However, after creating the engine, the yarnClient used in KyuubiApplicationManager.getApplicationInfo is not created using sessionConf, which will result in the connection not being the cluster specified by kyuubi.engineEnv.HADOOP_CONF_DIR.

Related classes:
org.apache.kyuubi.engine.KyuubiApplicationManager#getApplicationInfo
org.apache.kyuubi.engine.ApplicationOperation#getApplicationInfoByTag
org.apache.kyuubi.engine.ApplicationOperation#killApplicationByTag
org.apache.kyuubi.engine.YarnApplicationOperation#initialize
org.apache.kyuubi.util.KyuubiHadoopUtils#newYarnConfiguration

The same problem will also occur in BatchSession, KubernetesApplicationOperation, HiveEngine YARN mode, and so on.

### Affects Version(s)

1.9.0

### Kyuubi Server Log Output

```logtalk
None
```

### Kyuubi Engine Log Output

```logtalk
None
```

### Kyuubi Server Configurations

```yaml
None
```

### Kyuubi Engine Configurations

```yaml
None
```

### Additional context

_No response_

### Are you willing to submit PR?

- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- [ ] No. I cannot submit a PR at this time.

Contributor guide

Open the contributing guide

Research direction

Start by tracing KyuubiApplicationManager#getApplicationInfo and ApplicationOperation#getApplicationInfoByTag and #killApplicationByTag, then inspect YarnApplicationOperation#initialize and KyuubiHadoopUtils#newYarnConfiguration. Verify how sessionConf and conf are passed for YARN, BatchSession, Kubernetes, and Hive YARN paths; done means each operation uses the intended session-specific environment without breaking existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
hadoop, kubernetes, scala
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.