Skip to content

Commit

Permalink
[VL] Quick fix for Uniffle CI error (#5986)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer authored Jun 5, 2024
1 parent 00dda1b commit 59aaa1c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class BaseMixin {
@CommandLine.Option(names = {"--shuffle-partitions"}, description = "Shuffle partition number", defaultValue = "100")
private int shufflePartitions;

@CommandLine.Option(names = {"--scan-partitions"}, description = "Scan partition number. This is an approximate value, so the actual scan partition number might vary around this value", defaultValue = "100")
@CommandLine.Option(names = {"--scan-partitions"}, description = "Scan partition number. This is an approximate value, so the actual scan partition number might vary around this value. -1 for letting Spark choose an appropriate number.", defaultValue = "-1")
private int scanPartitions;

@CommandLine.Option(names = {"--extra-conf"}, description = "Extra Spark config entries applying to generated Spark session. E.g. --extra-conf=k1=v1 --extra-conf=k2=v2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,18 @@ abstract class Suite(
sessionSwitcher.defaultConf().setWarningOnOverriding("spark.sql.codegen.wholeStage", "false")
}

// Scan partition number.
sessionSwitcher
.defaultConf()
.setWarningOnOverriding("spark.sql.files.maxPartitionBytes", s"${ByteUnit.PiB.toBytes(1L)}")
sessionSwitcher
.defaultConf()
.setWarningOnOverriding("spark.sql.files.openCostInBytes", "0")
sessionSwitcher
.defaultConf()
.setWarningOnOverriding("spark.sql.files.minPartitionNum", s"${(scanPartitions - 1) max 1}")
if (scanPartitions != -1) {
// Scan partition number.
sessionSwitcher
.defaultConf()
.setWarningOnOverriding("spark.sql.files.maxPartitionBytes", s"${ByteUnit.PiB.toBytes(1L)}")
sessionSwitcher
.defaultConf()
.setWarningOnOverriding("spark.sql.files.openCostInBytes", "0")
sessionSwitcher
.defaultConf()
.setWarningOnOverriding("spark.sql.files.minPartitionNum", s"${(scanPartitions - 1) max 1}")
}

extraSparkConf.toStream.foreach { kv =>
sessionSwitcher.defaultConf().setWarningOnOverriding(kv._1, kv._2)
Expand Down

0 comments on commit 59aaa1c

Please sign in to comment.