You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "zhouyifan279 (via GitHub)" <gi...@apache.org> on 2023/08/25 09:55:23 UTC
[GitHub] [incubator-celeborn] zhouyifan279 opened a new pull request, #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
zhouyifan279 opened a new pull request, #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843
### What changes were proposed in this pull request?
Move Columnar Shuffle code into an individual module
### Why are the changes needed?
Spark 3.5 made a lot of changes to AtomicType in https://issues.apache.org/jira/browse/SPARK-42887.
This causes compilation error when building columnar shuffle code.
As columnar shuffle is a configurable feature, I think it's better to move related code into a individual module. Then we can exclude this module when build with Spark 3.5 for now.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Add test `ColumnarHashBasedShuffleWriterSuiteJ` and `CelebornColumnarShuffleReaderSuite`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] kerwin-zk commented on pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "kerwin-zk (via GitHub)" <gi...@apache.org>.
kerwin-zk commented on PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#issuecomment-1695574908
LGTM. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] zhouyifan279 closed pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "zhouyifan279 (via GitHub)" <gi...@apache.org>.
zhouyifan279 closed pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
URL: https://github.com/apache/incubator-celeborn/pull/1843
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] zhouyifan279 commented on a diff in pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "zhouyifan279 (via GitHub)" <gi...@apache.org>.
zhouyifan279 commented on code in PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#discussion_r1305540695
##########
client-spark/spark-3/src/main/scala/org/apache/spark/shuffle/celeborn/CelebornShuffleReader.scala:
##########
@@ -50,21 +49,7 @@ class CelebornShuffleReader[K, C](
override def read(): Iterator[Product2[K, C]] = {
- var serializerInstance = dep.serializer.newInstance()
- if (conf.columnarShuffleEnabled) {
- val schema = SparkUtils.getSchema(dep)
- if (CelebornBatchBuilder.supportsColumnarType(
- schema)) {
- val dataSize = SparkUtils.getDataSize(
- dep.serializer.asInstanceOf[UnsafeRowSerializer])
- serializerInstance = new CelebornColumnarBatchSerializer(
- schema,
- conf.columnarShuffleBatchSize,
- conf.columnarShuffleDictionaryEnabled,
- conf.columnarShuffleOffHeapEnabled,
- dataSize).newInstance()
- }
- }
+ val serializerInstance = newSerializerInstance(dep)
Review Comment:
Gluten Columnar Shuffle is different from Celeborn Columnar Shuffle.
The above code is clean and won't stop us to upgrade spark dependency version.
Let's leave it here for now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture commented on code in PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#discussion_r1307436967
##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/SparkShuffleManager.java:
##########
@@ -304,17 +309,8 @@ public <K, C> ShuffleReader<K, C> getReaderForRange(
TaskContext context,
ShuffleReadMetricsReporter metrics) {
if (handle instanceof CelebornShuffleHandle) {
- @SuppressWarnings("unchecked")
- CelebornShuffleHandle<K, ?, C> h = (CelebornShuffleHandle<K, ?, C>) handle;
- return new CelebornShuffleReader<>(
- h,
- startPartition,
- endPartition,
- startMapIndex,
- endMapIndex,
- context,
- celebornConf,
- metrics);
+ return getCelebornShuffleReader(
+ handle, startPartition, endPartition, startMapIndex, endMapIndex, context, metrics);
Review Comment:
Should put `startMapIndex/endMapIndex` before `startPartition/startPartition`. BTW, should we make the order of map indices and partition indices consist among different methods?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture commented on PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#issuecomment-1693183141
cc @kerwin-zk
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] cfmcgrady commented on a diff in pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady commented on code in PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#discussion_r1307701674
##########
project/CelebornBuild.scala:
##########
@@ -540,7 +576,20 @@ trait SparkClientProjects {
) ++ commonUnitTestDependencies
)
}
-
+
+ def sparkColumnarShuffle: Project = {
Review Comment:
let's add the project `sparkColumnarShuffle` to the spark tests group `sparkGroup` to enable the columnar-related tests for SBT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] zhouyifan279 commented on pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "zhouyifan279 (via GitHub)" <gi...@apache.org>.
zhouyifan279 commented on PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#issuecomment-1693113417
cc @cfmcgrady @pan3793
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture commented on code in PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#discussion_r1307436967
##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/SparkShuffleManager.java:
##########
@@ -304,17 +309,8 @@ public <K, C> ShuffleReader<K, C> getReaderForRange(
TaskContext context,
ShuffleReadMetricsReporter metrics) {
if (handle instanceof CelebornShuffleHandle) {
- @SuppressWarnings("unchecked")
- CelebornShuffleHandle<K, ?, C> h = (CelebornShuffleHandle<K, ?, C>) handle;
- return new CelebornShuffleReader<>(
- h,
- startPartition,
- endPartition,
- startMapIndex,
- endMapIndex,
- context,
- celebornConf,
- metrics);
+ return getCelebornShuffleReader(
+ handle, startPartition, endPartition, startMapIndex, endMapIndex, context, metrics);
Review Comment:
Should put `startMapIndex/endMapIndex` before `startPartition/startPartition`. BTW, should we make it consist of the order of map indices and partition indices among different methods?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] zwangsheng commented on a diff in pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on code in PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#discussion_r1305473728
##########
client-spark/spark-3-columnar-shuffle/src/main/java/org/apache/spark/shuffle/celeborn/CustomShuffleDependencyUtils.java:
##########
@@ -0,0 +1,26 @@
+package org.apache.spark.shuffle.celeborn;
Review Comment:
License header
##########
client-spark/spark-3-columnar-shuffle/src/test/scala/org/apache/spark/shuffle/celeborn/CelebornColumnarShuffleReaderSuite.scala:
##########
@@ -0,0 +1,42 @@
+package org.apache.spark.shuffle.celeborn
Review Comment:
ditto
##########
client-spark/spark-3/src/main/scala/org/apache/spark/shuffle/celeborn/CelebornShuffleReader.scala:
##########
@@ -50,21 +49,7 @@ class CelebornShuffleReader[K, C](
override def read(): Iterator[Product2[K, C]] = {
- var serializerInstance = dep.serializer.newInstance()
- if (conf.columnarShuffleEnabled) {
- val schema = SparkUtils.getSchema(dep)
- if (CelebornBatchBuilder.supportsColumnarType(
- schema)) {
- val dataSize = SparkUtils.getDataSize(
- dep.serializer.asInstanceOf[UnsafeRowSerializer])
- serializerInstance = new CelebornColumnarBatchSerializer(
- schema,
- conf.columnarShuffleBatchSize,
- conf.columnarShuffleDictionaryEnabled,
- conf.columnarShuffleOffHeapEnabled,
- dataSize).newInstance()
- }
- }
+ val serializerInstance = newSerializerInstance(dep)
Review Comment:
Consider we merged #1838, we should rebase and tweak the logic below:
```scala
val iterWithUpdatedRecordsRead =
if (GlutenColumnarBatchSerdeHelper.isGlutenSerde(serializerInstance.getClass.getName)) {
GlutenColumnarBatchSerdeHelper.withUpdatedRecordsRead(recordIter, metrics)
} else {
recordIter.map { record =>
metrics.incRecordsRead(1)
record
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] zhouyifan279 commented on a diff in pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "zhouyifan279 (via GitHub)" <gi...@apache.org>.
zhouyifan279 commented on code in PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#discussion_r1308382932
##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/SparkShuffleManager.java:
##########
@@ -304,17 +309,8 @@ public <K, C> ShuffleReader<K, C> getReaderForRange(
TaskContext context,
ShuffleReadMetricsReporter metrics) {
if (handle instanceof CelebornShuffleHandle) {
- @SuppressWarnings("unchecked")
- CelebornShuffleHandle<K, ?, C> h = (CelebornShuffleHandle<K, ?, C>) handle;
- return new CelebornShuffleReader<>(
- h,
- startPartition,
- endPartition,
- startMapIndex,
- endMapIndex,
- context,
- celebornConf,
- metrics);
+ return getCelebornShuffleReader(
+ handle, startPartition, endPartition, startMapIndex, endMapIndex, context, metrics);
Review Comment:
I created a new PR #1853 to unify the order.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] codecov[bot] commented on pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#issuecomment-1693142624
## [Codecov](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1843?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#1843](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1843?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (d8692a2) into [main](https://app.codecov.io/gh/apache/incubator-celeborn/commit/1550f92086f15ff49ddac0a4f36b70dc445aeed2?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (1550f92) will **increase** coverage by `0.04%`.
> Report is 6 commits behind head on main.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## main #1843 +/- ##
==========================================
+ Coverage 46.45% 46.48% +0.04%
==========================================
Files 163 163
Lines 10135 10143 +8
Branches 934 934
==========================================
+ Hits 4707 4714 +7
- Misses 5117 5118 +1
Partials 311 311
```
[see 1 file with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1843/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 closed pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
URL: https://github.com/apache/incubator-celeborn/pull/1843
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] pan3793 commented on pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#issuecomment-1695598034
Thanks, merged to main
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] zhouyifan279 commented on a diff in pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "zhouyifan279 (via GitHub)" <gi...@apache.org>.
zhouyifan279 commented on code in PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#discussion_r1305540695
##########
client-spark/spark-3/src/main/scala/org/apache/spark/shuffle/celeborn/CelebornShuffleReader.scala:
##########
@@ -50,21 +49,7 @@ class CelebornShuffleReader[K, C](
override def read(): Iterator[Product2[K, C]] = {
- var serializerInstance = dep.serializer.newInstance()
- if (conf.columnarShuffleEnabled) {
- val schema = SparkUtils.getSchema(dep)
- if (CelebornBatchBuilder.supportsColumnarType(
- schema)) {
- val dataSize = SparkUtils.getDataSize(
- dep.serializer.asInstanceOf[UnsafeRowSerializer])
- serializerInstance = new CelebornColumnarBatchSerializer(
- schema,
- conf.columnarShuffleBatchSize,
- conf.columnarShuffleDictionaryEnabled,
- conf.columnarShuffleOffHeapEnabled,
- dataSize).newInstance()
- }
- }
+ val serializerInstance = newSerializerInstance(dep)
Review Comment:
Gluten Columnar Shuffle is different from Celeborn Columnar Shuffle.
It is clean and won't stop us to upgrade spark dependency version.
Let's leave it here for now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture commented on code in PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#discussion_r1307437376
##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/SparkShuffleManager.java:
##########
@@ -247,17 +263,8 @@ public <K, C> ShuffleReader<K, C> getReader(
TaskContext context,
ShuffleReadMetricsReporter metrics) {
if (handle instanceof CelebornShuffleHandle) {
- @SuppressWarnings("unchecked")
- CelebornShuffleHandle<K, ?, C> h = (CelebornShuffleHandle<K, ?, C>) handle;
- return new CelebornShuffleReader<>(
- h,
- startPartition,
- endPartition,
- startMapIndex,
- endMapIndex,
- context,
- celebornConf,
- metrics);
+ return getCelebornShuffleReader(
+ handle, startPartition, endPartition, startMapIndex, endMapIndex, context, metrics);
Review Comment:
ditto
##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/SparkShuffleManager.java:
##########
@@ -304,17 +309,8 @@ public <K, C> ShuffleReader<K, C> getReaderForRange(
TaskContext context,
ShuffleReadMetricsReporter metrics) {
if (handle instanceof CelebornShuffleHandle) {
- @SuppressWarnings("unchecked")
- CelebornShuffleHandle<K, ?, C> h = (CelebornShuffleHandle<K, ?, C>) handle;
- return new CelebornShuffleReader<>(
- h,
- startPartition,
- endPartition,
- startMapIndex,
- endMapIndex,
- context,
- celebornConf,
- metrics);
+ return getCelebornShuffleReader(
+ handle, startPartition, endPartition, startMapIndex, endMapIndex, context, metrics);
Review Comment:
Should put `startMapIndex/endMapIndex` before `startPartition/startPartition`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] zhouyifan279 commented on a diff in pull request #1843: [CELEBORN-919] Move Columnar Shuffle code into an individual module
Posted by "zhouyifan279 (via GitHub)" <gi...@apache.org>.
zhouyifan279 commented on code in PR #1843:
URL: https://github.com/apache/incubator-celeborn/pull/1843#discussion_r1308410638
##########
project/CelebornBuild.scala:
##########
@@ -540,7 +576,20 @@ trait SparkClientProjects {
) ++ commonUnitTestDependencies
)
}
-
+
+ def sparkColumnarShuffle: Project = {
Review Comment:
Created a new PR #1854
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org