-
Notifications
You must be signed in to change notification settings - Fork 236
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
Shim Layer to support multiple Spark versions #402
Changes from 41 commits
688c757
e9b3268
ab09032
e511110
0d97687
773edfd
8b6ec0a
ad9f2e0
c48e918
c98b38e
918cbd4
bcd5eb0
edf01fa
af27493
06c403d
5d45aeb
e138385
b77bf34
261bcc7
5731bb9
46db449
af1d79d
7952d9f
e495820
50bad9d
350c34b
0a9aeed
9b611f4
27d786c
7b7e26e
df7916d
4632228
b798a05
456b784
fa1b463
5bb4f99
f9efe33
6661e4a
507fbe5
acece84
ba377d4
8f26f12
b1b6155
e637012
4aed4d0
9bddb28
c89bdf9
787e12b
9540447
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,16 @@ | |
<artifactId>rapids-4-spark-shuffle_${scala.binary.version}</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-shims_${scala.binary.version}</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.spark</groupId> | ||
<artifactId>spark-sql_${scala.binary.version}</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
|
@@ -49,6 +59,9 @@ | |
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<configuration> | ||
<transformers> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> | ||
</transformers> | ||
<shadedArtifactAttached>false</shadedArtifactAttached> | ||
<createDependencyReducedPom>true</createDependencyReducedPom> | ||
<relocations> | ||
|
@@ -94,6 +107,30 @@ | |
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.alchim31.maven</groupId> | ||
<artifactId>scala-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>update_config</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<launchers> | ||
<launcher> | ||
<id>update_rapids_config</id> | ||
<mainClass>com.nvidia.spark.rapids.RapidsConf</mainClass> | ||
<args> | ||
<arg>${project.basedir}/../docs/configs.md</arg> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. doc generation had to move because it requires shim layer functions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is that why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes |
||
</args> | ||
</launcher> | ||
</launchers> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.rat</groupId> | ||
<artifactId>apache-rat-plugin</artifactId> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -417,11 +417,14 @@ With `nv_peer_mem`, IB/RoCE-based transfers can perform zero-copy transfers dire | |
2) Install [UCX 1.8.1](https://github.com/openucx/ucx/releases/tag/v1.8.1). | ||
|
||
3) You will need to configure your spark job with extra settings for UCX (we are looking to | ||
simplify these settings in the near future): | ||
simplify these settings in the near future). Choose the version of the shuffle manager | ||
that matches your Spark version. Currently we support | ||
Spark 3.0 (com.nvidia.spark.rapids.spark30.RapidsShuffleManager) and | ||
Spark 3.1 (com.nvidia.spark.rapids.spark31.RapidsShuffleManager): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apache Spark really broke the shuffle manager API in a minor version? 😞 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it;s not minor version 3.0 to 3.1, plus shufflemanager api is officially private. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bummer. Wish we could setup the shuffle manager via the main plugin so users don't have to get out the decoder ring when configuring the shuffle. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry guess you mean FEATURE version, I was thinking maintenance release. But its private right now anyway. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main issue is whether the executors need the shuffle manager defined before the SQL plugin gets instantiated I believe. I'd need to do some testing, but seems like it should be a follow up issue. |
||
|
||
```shell | ||
... | ||
--conf spark.shuffle.manager=com.nvidia.spark.RapidsShuffleManager \ | ||
--conf spark.shuffle.manager=com.nvidia.spark.rapids.spark30.RapidsShuffleManager \ | ||
--conf spark.shuffle.service.enabled=false \ | ||
--conf spark.rapids.shuffle.transport.enabled=true \ | ||
--conf spark.executorEnv.UCX_TLS=cuda_copy,cuda_ipc,rc,tcp \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2020, NVIDIA CORPORATION. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-parent</artifactId> | ||
tgravescs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<version>0.2.0-SNAPSHOT</version> | ||
<relativePath>../../pom.xml</relativePath> | ||
</parent> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-shims_2.12</artifactId> | ||
<packaging>jar</packaging> | ||
<name>RAPIDS Accelerator for Apache Spark SQL Plugin Shim Aggregator</name> | ||
<description>The RAPIDS SQL plugin for Apache Spark Shim Aggregator</description> | ||
<version>0.2.0-SNAPSHOT</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-shims-spark31_${scala.binary.version}</artifactId> | ||
<version>${project.version}</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-shims-spark30_${scala.binary.version}</artifactId> | ||
<version>${project.version}</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2020, NVIDIA CORPORATION. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-parent</artifactId> | ||
<version>0.2.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-shims_aggregator_2.12</artifactId> | ||
<packaging>pom</packaging> | ||
<name>RAPIDS Accelerator for Apache Spark SQL Plugin Shims</name> | ||
<description>The RAPIDS SQL plugin for Apache Spark Shims</description> | ||
<version>0.2.0-SNAPSHOT</version> | ||
|
||
<modules> | ||
<module>spark30</module> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just FYI First and Last changed recently between 3.0.0 and 3.0.1 so they are no longer compatible. Do we want to name these so it is clearer? perhaps There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I made it 30 as I wasn't sure what would change in minor release and figured we could create a spark301 if we needed. We can certainly make it 300 right now if you want. I haven't tested with it to see what all is different there. There is no hierarchy at this point, I think that could get confusing pretty quickly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that it could get confusing quickly. I am also concerned about a lot of copy/paste. The changes that went into 3.0.1 for First/Last are the same that went into 3.1. So does that mean we copy/paste these twice? What about for version 3.0.2 when nothing changed between 3.0.1 and 3.0.2 except one minor thing. Do we have to copy and paste code changes for each minor release from here on out? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. right now yes, actually I take back my first statement, I would prefer to leave this as 30 and 31 until we pull in stuff from 3.0.1 and so forth. We can add modules and stuff ot that and rearrange that that point. My problem now is that it takes a long time to everyday upmerge to spark 3.1, and other rapids changes and things keep moving, then I have to constant retest all versions. I would like to get a base set of changes in and we can iterate on it. We could look at making other hierarchies but you have to watch for circular dependencies and such. |
||
<module>spark31</module> | ||
<module>aggregator</module> | ||
</modules> | ||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2020, NVIDIA CORPORATION. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-parent</artifactId> | ||
<version>0.2.0-SNAPSHOT</version> | ||
<relativePath>../../pom.xml</relativePath> | ||
</parent> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-shims-spark30_2.12</artifactId> | ||
<name>RAPIDS Accelerator for Apache Spark SQL Plugin Spark 3.0 Shim</name> | ||
<description>The RAPIDS SQL plugin for Apache Spark 3.0 Shim</description> | ||
<version>0.2.0-SNAPSHOT</version> | ||
|
||
<properties> | ||
<spark30.version>3.0.0</spark30.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-sql_${scala.binary.version}</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ai.rapids</groupId> | ||
<artifactId>cudf</artifactId> | ||
<classifier>${cuda.version}</classifier> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.flatbuffers</groupId> | ||
<artifactId>flatbuffers-java</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.scala-lang</groupId> | ||
<artifactId>scala-library</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.spark</groupId> | ||
<artifactId>spark-sql_${scala.binary.version}</artifactId> | ||
<version>${spark30.version}</version> | ||
tgravescs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.orc</groupId> | ||
tgravescs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<artifactId>orc-core</artifactId> | ||
<classifier>${orc.classifier}</classifier> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.orc</groupId> | ||
<artifactId>orc-mapreduce</artifactId> | ||
<classifier>${orc.classifier}</classifier> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>com.google.code.findbugs</groupId> | ||
<artifactId>jsr305</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hive</groupId> | ||
<artifactId>hive-storage-api</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.protobuf</groupId> | ||
<artifactId>protobuf-java</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>net.alchim31.maven</groupId> | ||
<artifactId>scala-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.nvidia.spark.rapids.shims.spark30.Spark30ShimServiceProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows multiple serviceloaders to be properly combined into the single jar