apache / apache/linkis

[Feature][EnginePlugin] Enhance Hive engine concurrency capability

Open
#5,306 1 comment 0 reactions 0 assignees View on GitHub
feature
Dominant language
Java
Stars
3.4k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

### Linkis Component

linkis-engineconn-plugins/hive

### What happened

**English:**

The current Hive engine has performance bottlenecks or stability issues in high-concurrency scenarios, unable to meet the needs of large-scale concurrent jobs.

**Problem Description:**
1. Hive engine's concurrent processing capability is insufficient
2. Job delays or failures may occur in high-concurrency scenarios
3. Connection pool management needs optimization

---

**中文:**

当前Linkis的Hive引擎在高并发场景下存在性能瓶颈或稳定性问题,无法满足大规模并发作业的需求。

**问题描述:**
1. Hive引擎并发处理能力不足
2. 高并发场景下可能出现作业延迟或失败
3. 连接池管理需要优化

### What you expected to happen

**English:**

Users need to submit a large number of Hive jobs simultaneously on the Linkis platform, requiring the system to handle them stably and efficiently.

**Expected Improvements:**
1. Increase maximum concurrent job limit per Hive EC
2. Optimize connection pool size and lifecycle management
3. Improve job queue and scheduling mechanism
4. Add backpressure handling for overload scenarios
5. Optimize resource allocation and recycling

---

**中文:**

用户需要在Linkis平台上同时提交大量Hive作业,要求系统能够稳定高效地处理。

**期望改进:**
1. 增加每个Hive EC的最大并发作业限制
2. 优化连接池大小和生命周期管理
3. 改进作业队列和调度机制
4. 为过载场景添加背压处理
5. 优化资源分配和回收

### How to reproduce

**English:**
1. Configure Hive engine in Linkis
2. Submit 50+ concurrent Hive SQL jobs
3. Monitor job execution status and system performance
4. Observe job queuing, delays, or timeout failures

---

**中文:**
1. 在Linkis中配置Hive引擎
2. 提交50+个并发Hive SQL作业
3. 监控作业执行状态和系统性能
4. 观察作业排队、延迟或超时失败

### Anything else

**English:**

**Suggested Solutions:**
1. **Analyze Hive engine concurrency bottlenecks**: Profile to identify performance hotspots
2. **Optimize connection pool management**:
- Increase HiveServer2 connection pool size
- Implement connection reuse and lifecycle management
3. **Enhance concurrent job scheduling and execution mechanism**:
- Implement job prioritization
- Add fair scheduling policies
- Optimize thread pool configuration
4. **Conduct high-concurrency scenario performance testing and optimization**:
- Load testing with 100+ concurrent jobs
- Tune JVM parameters for high concurrency
5. **Optimize resource allocation and recycling mechanism**:
- Implement dynamic resource allocation
- Add resource cleanup on job completion

**Technical Considerations:**
- HiveServer2 connection pooling (HikariCP recommended)
- Executor thread pool sizing (based on core count and workload)
- Memory management for concurrent queries
- Metastore connection pool optimization
- Query result caching strategy

---

**中文:**

**建议解决方案:**
1. **分析Hive引擎并发处理的瓶颈**:进行性能分析以识别性能热点
2. **优化Hive引擎的连接池管理**:
- 增加HiveServer2连接池大小
- 实现连接重用和生命周期管理
3. **增强并发作业的调度和执行机制**:
- 实现作业优先级
- 添加公平调度策略
- 优化线程池配置
4. **进行高并发场景下的性能测试和优化**:
- 使用100+并发作业进行负载测试
- 为高并发调优JVM参数
5. **优化资源分配和回收机制**:
- 实现动态资源分配
- 在作业完成时添加资源清理

**技术考虑:**
- HiveServer2连接池(推荐HikariCP)
- 执行器线程池大小(基于核心数和工作负载)
- 并发查询的内存管理
- Metastore连接池优化
- 查询结果缓存策略

### Are you willing to submit a PR?

- [ ] Yes I am willing to submit a PR!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.