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

feat: Document the class path / classloader issue with the shuffle manager #256

Merged
merged 5 commits into from
Apr 13, 2024
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ Comet shuffle feature is disabled by default. To enable it, please add related c
Above configs enable Comet native shuffle which only supports hash partiting and single partition.
Comet native shuffle doesn't support complext types yet.

Comet doesn't have official release yet so currently the only way to test it is to build jar and include it in your Spark application. Depending on your deployment mode you may also need to set the driver & executor class path(s) to explicitly contain Comet otherwise Spark may use a different class-loader for the Comet components than its internal components which will then fail at runtime. For example:

```
--driver-class-path spark/target/comet-spark-spark3.4_2.12-0.1.0-SNAPSHOT.jar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also add executor configuration alongside? Although it is trivial but as we already go to update this.

```

Some cluster managers may require additional configuration, see https://spark.apache.org/docs/latest/cluster-overview.html

To enable columnar shuffle which supports all partitioning and basic complex types, one more config is required:
```
--conf spark.comet.columnar.shuffle.enabled=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,14 @@ class SpillSorter extends SpillWriter {
// As we cannot access the address of the internal array in the sorter, so we need to
// allocate the array manually and expand the pointer array in the sorter.
// We don't want in-memory sorter to allocate memory but the initial size cannot be zero.
this.inMemSorter = new ShuffleInMemorySorter(allocator, 1, true);
try {
this.inMemSorter = new ShuffleInMemorySorter(allocator, 1, true);
} catch (java.lang.IllegalAccessError e) {
throw new java.lang.RuntimeException(
"Error loading in-memory sorter check class path -- see "
+ "https://github.com/apache/arrow-datafusion-comet?tab=readme-ov-file#enable-comet-shuffle",
e);
}
sorterArray = allocator.allocateArray(initialSize);
this.inMemSorter.expandPointerArray(sorterArray);

Expand Down
Loading