turboFei commented on code in PR #3109:
URL: https://github.com/apache/celeborn/pull/3109#discussion_r2094532010
##########
tests/spark-it/src/test/scala/org/apache/celeborn/tests/spark/CelebornFetchFailureSuite.scala:
##########
@@ -331,19 +264,7 @@ class CelebornFetchFailureSuite extends AnyFunSuite
}
test(s"celeborn spark integration test - resubmit a failed barrier stage
across jobs") {
- val sparkConf = new
SparkConf().setAppName("rss-demo").setMaster("local[2]")
- val sparkSession = SparkSession.builder()
- .config(updateSparkConf(sparkConf, ShuffleMode.HASH))
- .config("spark.sql.shuffle.partitions", 2)
- .config("spark.celeborn.shuffle.forceFallback.partition.enabled", false)
- .config("spark.celeborn.client.spark.stageRerun.enabled", "true")
- .config("spark.celeborn.client.push.buffer.max.size", 0)
- .config("spark.stage.maxConsecutiveAttempts", "1")
- .config("spark.stage.maxAttempts", "1")
- .config(
- "spark.shuffle.manager",
- "org.apache.spark.shuffle.celeborn.TestCelebornShuffleManager")
- .getOrCreate()
+ val sparkSession = createSparkSession(overrideShuffleMgr = false)
Review Comment:
```suggestion
val sparkSession = createSparkSession()
```
##########
tests/spark-it/src/test/scala/org/apache/celeborn/tests/spark/CelebornFetchFailureSuite.scala:
##########
@@ -25,14 +25,15 @@ import org.apache.spark.celeborn.ExceptionMakerHelper
import org.apache.spark.rdd.RDD
import org.apache.spark.shuffle.celeborn.{SparkShuffleManager, SparkUtils,
TestCelebornShuffleManager}
import org.apache.spark.sql.SparkSession
-import org.scalatest.BeforeAndAfterEach
+import org.scalatest.{BeforeAndAfterEach, Ignore}
Review Comment:
NIT: seems unnecessary change
##########
tests/spark-it/src/test/scala/org/apache/celeborn/tests/spark/CelebornFetchFailureSuite.scala:
##########
@@ -285,17 +228,7 @@ class CelebornFetchFailureSuite extends AnyFunSuite
}
test(s"celeborn spark integration test - fetch failure in child of an
unordered barrier stage with throwsFetchFailure enabled") {
- val sparkConf = new
SparkConf().setAppName("rss-demo").setMaster("local[2]")
- val sparkSession = SparkSession.builder()
- .config(updateSparkConf(sparkConf, ShuffleMode.HASH))
- .config("spark.sql.shuffle.partitions", 2)
- .config("spark.celeborn.shuffle.forceFallback.partition.enabled", false)
- .config("spark.celeborn.client.spark.stageRerun.enabled", "true")
- .config("spark.celeborn.client.push.buffer.max.size", 0)
- .config(
- "spark.shuffle.manager",
- "org.apache.spark.shuffle.celeborn.TestCelebornShuffleManager")
- .getOrCreate()
+ val sparkSession = createSparkSession(overrideShuffleMgr = false)
Review Comment:
```suggestion
val sparkSession = createSparkSession()
```
##########
tests/spark-it/src/test/scala/org/apache/celeborn/tests/spark/CelebornFetchFailureSuite.scala:
##########
@@ -241,17 +194,7 @@ class CelebornFetchFailureSuite extends AnyFunSuite
}
test(s"celeborn spark integration test - resubmit an unordered barrier stage
with throwsFetchFailure enabled") {
- val sparkConf = new
SparkConf().setAppName("rss-demo").setMaster("local[2]")
- val sparkSession = SparkSession.builder()
- .config(updateSparkConf(sparkConf, ShuffleMode.HASH))
- .config("spark.sql.shuffle.partitions", 2)
- .config("spark.celeborn.shuffle.forceFallback.partition.enabled", false)
- .config("spark.celeborn.client.spark.stageRerun.enabled", "true")
- .config("spark.celeborn.client.push.buffer.max.size", 0)
- .config(
- "spark.shuffle.manager",
- "org.apache.spark.shuffle.celeborn.TestCelebornShuffleManager")
- .getOrCreate()
+ val sparkSession = createSparkSession(overrideShuffleMgr = false)
Review Comment:
```suggestion
val sparkSession = createSparkSession()
```
##########
tests/spark-it/src/test/scala/org/apache/celeborn/tests/spark/fetch/failure/FetchFailureTestBase.scala:
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package org.apache.celeborn.tests.spark.fetch.failure
+
+import org.apache.spark.SparkConf
+import org.apache.spark.sql.SparkSession
+
+import org.apache.celeborn.common.protocol.ShuffleMode
+import org.apache.celeborn.tests.spark.SparkTestBase
+
+private[tests] trait FetchFailureTestBase extends SparkTestBase {
+
+ def createSparkSession(
+ overrideShuffleMgr: Boolean = true,
+ enableFailedShuffleCleaner: Boolean = false,
+ enableCustomizedRunningStageMgr: Boolean = false): SparkSession = {
Review Comment:
seems you can remove this flag
--
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]