Skip to content

Commit

Permalink
remove DEFAULT_RPC_PORT
Browse files Browse the repository at this point in the history
  • Loading branch information
coderzc committed Nov 22, 2022
1 parent 875baeb commit 0b5a3fe
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ public class ComputerJobDeployer {
private static final String TRANSPORT_PORT_NAME = "transport-port";
private static final String RPC_PORT_NAME = "rpc-port";
private static final int DEFAULT_TRANSPORT_PORT = 8099;
private static final int DEFAULT_RPC_PORT = 8093;
private static final String COMPUTER_CONFIG_MAP_VOLUME =
"computer-config-map-volume";
private static final String COMPUTER_CONFIG_MAP_VOLUME = "computer-config-map-volume";

private static final String POD_IP_KEY = "status.podIP";
private static final String POD_NAMESPACE_KEY = "metadata.namespace";
Expand Down Expand Up @@ -199,18 +197,12 @@ private Set<ContainerPort> handleConfig(ComputerJobSpec spec) {
transportPort);
}

String rpcPort = config.get(
ComputerOptions.RPC_SERVER_PORT.name());
if (StringUtils.isBlank(rpcPort) || RANDOM_PORT.equals(rpcPort)) {
rpcPort = String.valueOf(DEFAULT_RPC_PORT);
config.put(ComputerOptions.RPC_SERVER_PORT.name(), rpcPort);
}

ContainerPort transportContainerPort = new ContainerPortBuilder()
.withName(TRANSPORT_PORT_NAME)
.withContainerPort(Integer.valueOf(transportPort))
.withProtocol(PROTOCOL)
.build();
String rpcPort = config.get(ComputerOptions.RPC_SERVER_PORT.name());
ContainerPort rpcContainerPort = new ContainerPortBuilder()
.withName(RPC_PORT_NAME)
.withContainerPort(Integer.valueOf(rpcPort))
Expand Down

0 comments on commit 0b5a3fe

Please sign in to comment.