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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]