This plugin is still under active development now, and doesn't have a stable release. Welcome to evaluate it. If you encounter any issues or have any suggestions, please submit to our issue list. We'd like to hear your feedback
Gluten Trino is to enable Velox native compute engine for Trino performance acceleration. This project is based on Trino and Velox. Meanwhile we referred a lot from Prestissimo. We appreciate the excellent work from Trino, Velox and Prestissimo.
Current development is based on Trino 411 release.
All TPC-H queries are supported with all plan fragments offloaded. Currently only Hive-connector was supported.
TPC-DS support is ongoing. Q18 is failed and result of some queries are incorrect.
Gluten-Trino provides task level native offload mechanism via JNI. We will try to translate trino logical plan fragment into native acceptable formats, if the whole plan node tree are supported to be executed in native side, it will offload, otherwise it will fall back to vanilla Java path to execute. Below is Gluten Trino archtecture diagram.
To minimize develop effort, we reused Prestissimo Plan represenatation and serde framework. Original Prestissmo plan conversion code path is like:
PlanFragment(Prestodb-Java) -> Json -> PlanFragment(Prestissimo) -> PlanFragment(Velox)
Our solution is translate Trino PlanFragment to Presto-like PlanFragment, and reuse later code path.
PlanFragment(Trino-Java) -> PlanFragment(Gluten-Trino-Java, e.g., Prestodb like) -> Json -> PlanFragment(Gluten-Trino-CPP) -> PlanFragment(Velox)
For data source, we will convert connector/split info and pass to native, leverage Velox connector to fetch data from data source. Currently, only hive connector is supported.
For exchange and output data, we will serialize Velox RowVector to Trino protocol binary data at native side, and Trino java side will wrap this to ByteBuffer and wait for downstream task to pull data. Downstream native exchange node will pull data and deserialize to Velox RowVector.
git clone --recursive https://github.com/oap-project/Gluten-Trino.git
cd Gluten-Trino
# if you are updating an existing checkout
git submodule sync --recursive
git submodule update --init --recursive
It's verfied on x86_64 Linux build on Ubuntu 20.04 or later.
# python3
$ pip install regex pyyaml chevron clang-format
$ apt-get install jq
cd ${REPO}/cpp
export TRINO_HOME=/path/to/Gluten-Trino/repo
make depends # this will install all dependency
make release
Once build completed, you can get src/libgluten_trino.so
under build dir.
cd ${REPO}/java
mvn clean package -DskipTests=True -Dair.check.skip-duplicate-finder=True
- Copy
libgluten_trino.so
to your systemLD_LIBRARY_PATH
on each worker node. - Modify
launcher.py
, addGluten-Trino-{Trino-version}.jar
to your classpath, make sure it is the first. - Add the configs below to your
config.properties
file:
query.launch-native-engine=true
optimizer.optimize-hash-generation=false
enable-dynamic-filtering=false
gluten-trino.plugin.dir=/path/to/Gluten-Trino-{Trino-version}.jar
- Start Trino server normally.