Skip to content

Commit ca7de40

Browse files
committed
Address comments
1 parent 2590b59 commit ca7de40

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ private[spark] object PythonUtils {
8383
}
8484

8585
def getBroadcastThreshold(sc: JavaSparkContext): Long = {
86-
sc.conf.get(org.apache.spark.internal.config.BROADCAST_UDF_THRESHOLD)
86+
sc.conf.get(org.apache.spark.internal.config.BROADCAST_FOR_UDF_COMPRESSION_THRESHOLD)
8787
}
8888
}

core/src/main/scala/org/apache/spark/internal/config/package.scala

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,11 +1246,13 @@ package object config {
12461246
"mechanisms to guarantee data won't be corrupted during broadcast")
12471247
.booleanConf.createWithDefault(true)
12481248

1249-
private[spark] val BROADCAST_UDF_THRESHOLD = ConfigBuilder("spark.broadcast.UDFThreshold")
1250-
.doc("The threshold at which a serialized command is compressed by broadcast, in " +
1251-
"bytes unless otherwise specified")
1252-
.bytesConf(ByteUnit.BYTE)
1253-
.createWithDefault(1 << 20)
1249+
private[spark] val BROADCAST_FOR_UDF_COMPRESSION_THRESHOLD =
1250+
ConfigBuilder("spark.broadcast.UDFCompressionThreshold")
1251+
.doc("The threshold at which a a user-defined function (UDF) is compressed by broadcast, " +
1252+
"in bytes unless otherwise specified")
1253+
.bytesConf(ByteUnit.BYTE)
1254+
.checkValue(v => v >= 0, "The threshold should be non-negative.")
1255+
.createWithDefault(1L * 1024 * 1024)
12541256

12551257
private[spark] val RDD_COMPRESS = ConfigBuilder("spark.rdd.compress")
12561258
.doc("Whether to compress serialized RDD partitions " +

0 commit comments

Comments
 (0)