登录 注册
AI 模型与开发框架数据分析与数据处理开发者工具 arrowclickhousesimdspark-sqlvectorizationvelox
1,621
Stars
677
Forks
37
Watchers
1,125
Open Issues
Apache-2.0
许可证
Scala
语言
2021-12-06
创建时间
2026-11-12
最近更新

项目能做什么

Gluten 是一个为 Spark SQL 提速的中间层插件。它复用 Spark 的分布式控制流,将 JVM 中计算密集的数据处理卸载给 ClickHouse、Velox 等高性能原生引擎。通过 Substrait 转换执行计划并结合 Arrow 列存格式,无需改动现有 SQL 或 DataFrame API 即可实现原生向量化加速。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<img src="docs/image/gluten-logo.svg" alt="Gluten" width="260">


**A Middle Layer for Offloading JVM-Based SQL Execution to Native Engines**

[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8452/badge)](https://www.bestpractices.dev/projects/8452)

## 1. Introduction

### Background

Apache Spark is a mature and stable project that has been under continuous development for many years. It is one of the most widely used frameworks for scaling out the processing of petabyte-scale datasets.
Over time, the Spark community has had to address significant performance challenges, which required a variety of optimizations. A major milestone came with Spark 2.0, where Whole-Stage Code Generation
replaced the Volcano Model, delivering up to a 2× speedup. Since then, most subsequent improvements have focused on the query plan level, while the performance of individual operators has almost stopped improving.

<p align="center">
<img src="https://user-images.githubusercontent.com/47296334/199853029-b6d0ea19-f8e4-4f62-9562-2838f7f159a7.png" width="700">
</p>

In recent years, several native SQL engines have been developed, such as ClickHouse and Velox. With features like native execution, columnar data formats, and vectorized
data processing, these engines can outperform Spark’s JVM-based SQL engine. However, they currently don't directly support Spark SQL execution.

### Design Overview

“Gluten” is Latin for "glue". The main goal of the Gluten project is to glue native engines to Spark SQL. Thus, we can benefit from the high performance of native engines and the high scalability enabled by the Spark ecosystem.

The basic design principle is to reuse Spark’s control flow, while offloading compute-intensive data processing to the native side. More specifically:

* Transform Spark’s physical plan into a Substrait plan, then transform it into the native engine's plan.
* Offload performance-critical data processing to native engine.
* Define clear JNI interfaces for native SQL engines.
* Allow easy switching between available native backends.
* Reuse Spark’s distributed control flow.
* Manage data sharing between JVM and native.
* Provide extensibility to support more native engines.

### Target Users

Gluten's target users include anyone who wants to fundamentally accelerate Spark SQL. As a plugin to Spark, Gluten requires no changes to the DataFrame API or SQL queries; users only need to configure it correctly.

## 2. Architecture

The overview chart is shown below. [Substrait](https://substrait.io/) provides a well-defined, cross-language specification for data compute operations. Spark’s physical plan is transformed into a Substrait plan,
which is then passed to the native side through a JNI call. On the native side, a chain of native operators is constructed and offloaded to the native engine. Gluten returns the results as a ColumnarBatch,
and Spark’s Columnar API (introduced in Spark 3.0) is used during execution. Gluten adopts the Apache A
阅读完整原文

项目深度分析 AI 生成

Gluten企业级稳定版与多环境兼容发行包(Gluten Distribution)

产品构想提供预编译好的、深度兼容各大主流云厂商(AWS EMR、GCP Dataproc、阿里云EMR等)及主流操作系统/CPU架构(如ARM64、x86_64)的开箱即用二进制企业发行版,解决原生代码编译极其复杂且耗时的问题。
核心功能一键集成脚本、针对特定Spark版本的预编译动态链接库、跨架构优化二进制分发、CVE安全补丁快速通道。
目标用户缺乏底层C++编译运维基础设施但急需上线的数仓平台团队。
难度/周期高 · 3-6个月 · 成本:中(需要持续的多架构CI/CD编译机器与云环境测试矩阵支出)
收费模式按集群节点规模或年订阅制收取企业版许可及更新费用。
竞争风险Apache开源社区自身若完善预编译产物分发,将削弱该方案的核心价值壁垒。
依据 已验证事实

Spark转原生计算集群的FinOps降本咨询与落地服务

产品构想针对自建或云上大规模Spark集群的企业,提供端到端的Gluten引入、算子回退(Fallback)分析调优及计算资源降本实施服务,按节省的算力成本分成或固定交付费。
核心功能作业兼容性与Fallback率扫描工具、内存配置(Off-Heap/JVM内存配比)自动化调优引擎、端到端提速报告。
目标用户年度云账单超百万级、有强烈算力降本压力的中大型技术企业技术负责人/FinOps团队。
难度/周期中等偏高 · 1-3个月(按项目交付) · 成本:低(主要为人力与调优测试算力)
收费模式专业服务费 + 成本节省阶梯分成(Gain-share模式)。
竞争风险不同客户作业特异性强,若大量算子回退回Vanilla Spark(如复杂UDF),加速效果不达预期导致交付延期。
依据 数据支持的判断

Gluten算子加速观测与自动Fallback分析诊断平台(SaaS/私有化)

产品构想构建针对Gluten运行时的APM与诊断平台,可视化展示SQL中Substrait转化详情、ColumnarToRow(C2R)转换开销、原生内存泄漏排查指标,并给出针对性调优建议。
核心功能JNI/Native执行耗时跟踪、C2R/R2C转换损耗检测、原生内存使用水位与OOM捕获预警、调优建议知识库。
目标用户负责Spark运维的数据平台SRE和大数据平台组件运维人员。
难度/周期高 · 6-9个月 · 成本:中等(研发与分布式追踪探针开销)
收费模式按活跃监控的Executor/Core数量收取订阅费用(SaaS或私有化部署)。
竞争风险插桩探针可能带来额外的性能开销,抵消原生引擎带来的部分性能红利。
依据 尚需验证的假设
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
apache/arrow 中文介绍暂未生成
Apache Arrow is the universal columnar format and multi-lang
17,302 C++
apache/datafusion 中文介绍暂未生成
Apache DataFusion SQL Query Engine
9,595 Rust
arrow-py/arrow 中文介绍暂未生成
🏹 Better dates & times for Python
9,055 Python
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2021-12-06,近 30 天仍在推送,发布过 29 个 Release
社区活跃Star 1,621 / Fork 677 / Issue 1,125(数据支持,可自行核实)
许可证Apache-2.0
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/apache/gluten.git
cd gluten
docker compose up -d   # 或参考 README 中的 docker run 命令
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。