Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GJ-13] Refine docs on Velox #125

Merged
merged 1 commit into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/GlutenUsage.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ Submit the above script from spark-shell to trigger a Spark Job with certain con
```shell script
cat query.scala | spark-shell --name query --master yarn --deploy-mode client --conf spark.plugins=io.glutenproject.GlutenPlugin --conf spark.gluten.sql.columnar.backend.lib=${BACKEND} --conf spark.driver.extraClassPath=${gluten_jvm_jar} --conf spark.executor.extraClassPath=${gluten_jvm_jar} --conf spark.memory.offHeap.size=20g --conf spark.sql.sources.useV1SourceList=avro --num-executors 6 --executor-cores 6 --driver-memory 20g --executor-memory 25g --conf spark.executor.memoryOverhead=5g --conf spark.driver.maxResultSize=32g
```

Please note that there is a WIP [pull request](https://github.com/oap-project/gluten/pull/124) to add the fallback mechanism.
Unsupported operators are expected to be executed in vanilla Spark.
14 changes: 13 additions & 1 deletion docs/Velox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

Currently, Gluten requires Velox being pre-compiled.
In general, please refer to [Velox Installation](https://github.com/facebookincubator/velox/blob/main/scripts/setup-ubuntu.sh) to install all the dependencies and compile Velox.

Gluten depends on this [Velox branch](https://github.com/rui-mo/velox/tree/velox_for_gazelle_jni).
The changes to Velox are planned to be upstreamed in the future.
In addition to that, there are several points worth attention when compiling Gluten with Velox.

Gluten depends on this [Arrow branch](https://github.com/oap-project/arrow/tree/arrow-7.0.0-oap) with this [pull request](https://github.com/oap-project/arrow/pull/94).
In the future, Gluten with Velox backend will swift to use the upstream Arrow.

In addition to above notes, there are several points worth attention when compiling Gluten with Velox.

Firstly, please note that all the Gluten required libraries should be compiled as **position independent code**.
That means, for static libraries, "-fPIC" option should be added in their compiling processes.
Expand Down Expand Up @@ -64,6 +69,13 @@ Considering only Hive LRE V1 is supported in Velox, below Spark option was adopt
--conf spark.hive.exec.orc.write.format=0.11
```

Spark SQL will try to use its own ORC support instead of Hive SerDe for better performance
which is incompatible with Velox's String column. Add below option to disable this behavior.

```shell script
--conf spark.sql.hive.convertMetastoreOrc=false
```

Considering Velox's support for Decimal, Date, Long types are not fully ready, the related columns of TPC-H Q6 were all transformed into Double type.
Below script shows how to convert Parquet into ORC format, and transforming TPC-H Q6 related columns into Double type.
To align with this data type change, the TPC-H Q6 query was changed accordingly.
Expand Down