HyukjinKwon commented on code in PR #37721:
URL: https://github.com/apache/spark/pull/37721#discussion_r958284861


##########
core/src/main/scala/org/apache/spark/internal/config/package.scala:
##########
@@ -2429,4 +2429,21 @@ package object config {
       .version("3.4.0")
       .timeConf(TimeUnit.MILLISECONDS)
       .createWithDefaultString("5s")
+
+  private[spark] val CUSTOM_SERVICE_PORT =
+    ConfigBuilder("spark.service.port.custom")
+      .doc("Customize the spark service port range, " +
+        "service like SparkUI.port, SparkDriver.port, NettyService.port etc." +
+        "The starting port number is spark.service.port.custom.origin " +
+        "and the port range is limited by spark.port.maxRetries. " +
+        "e.g. spark.service.port.custom.origin=49152 and 
spark.port.maxRetries=10, " +
+        "the actual range of the port is greater than or equal to 49152 and 
less than 49163")
+      .booleanConf
+      .createWithDefault(false)
+
+  private[spark] val CUSTOM_SERVICE_PORT_ORIGIN =
+    ConfigBuilder("spark.service.port.custom.origin")
+      .intConf
+      .checkValue(v => v >= 1024, "The threshold should be greater than or 
equal to 1024.")
+      .createWithDefault(49152)

Review Comment:
   You can just make it optional instead of deciding a default value here 
(e.g., if it's set, enable this feature).
   
   If you need to specify a specific range, the configuration would have to be 
able to specify both lower bound and upper bound.
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to