You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "jerqi (via GitHub)" <gi...@apache.org> on 2023/03/31 10:44:35 UTC

[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #723: [#720] feat(netty): support random port for netty

jerqi commented on code in PR #723:
URL: https://github.com/apache/incubator-uniffle/pull/723#discussion_r1154321398


##########
server/src/main/java/org/apache/uniffle/server/ShuffleServerConf.java:
##########
@@ -400,7 +400,8 @@ public class ShuffleServerConf extends RssBaseConf {
   public static final ConfigOption<Integer> NETTY_SERVER_PORT = ConfigOptions
       .key("rss.server.netty.port")
       .intType()
-      .checkValue(ConfigUtils.POSITIVE_INTEGER_VALIDATOR_2, "netty port must be positive")
+      .checkValue(ConfigUtils.SERVER_PORT_VALIDATOR, "check server port value is -1 or 0 "

Review Comment:
   We can't use `-1`.



##########
common/src/main/java/org/apache/uniffle/common/config/ConfigUtils.java:
##########
@@ -207,6 +207,8 @@ && isFinal(modifiers) && field.getType().isAssignableFrom(ConfigOption.class)) {
 
   public static final Function<Long, Boolean> NON_NEGATIVE_LONG_VALIDATOR = value -> value >= 0;
 
+  public static final Function<Integer, Boolean> SERVER_PORT_VALIDATOR = value -> ((value == -1 || value == 0)

Review Comment:
   This value can't be `-1` in the configuration. `-1` is our default value, but we can't use it as a configuration value.



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org