Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🍒 ][CDAP-21096] Separate bind and announce port configurations for appfabric server and processor #15863

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import io.cdap.cdap.app.runtime.ProgramRuntimeService;
import io.cdap.cdap.common.conf.CConfiguration;
import io.cdap.cdap.common.conf.Constants;
import io.cdap.cdap.common.conf.Constants.AppFabric;
import io.cdap.cdap.common.conf.Constants.Service;
import io.cdap.cdap.common.conf.SConfiguration;
import io.cdap.cdap.common.discovery.ResolvingDiscoverable;
Expand Down Expand Up @@ -182,7 +183,7 @@ protected void startUp() throws Exception {
Constants.AppFabric.DEFAULT_BOSS_THREADS))
.setWorkerThreadPoolSize(cConf.getInt(Constants.AppFabric.WORKER_THREADS,
Constants.AppFabric.DEFAULT_WORKER_THREADS))
.setPort(cConf.getInt(Constants.AppFabric.SERVER_PORT));
.setPort(cConf.getInt(Constants.AppFabric.PROCESSOR_PORT));
if (sslEnabled) {
new HttpsEnabler().configureKeyStore(cConf, sConf).enable(httpServiceBuilder);
}
Expand Down Expand Up @@ -217,7 +218,7 @@ private Cancellable startHttpService(NettyHttpService httpService) throws Except

String announceAddress = cConf.get(Constants.Service.MASTER_SERVICES_ANNOUNCE_ADDRESS,
httpService.getBindAddress().getHostName());
int announcePort = cConf.getInt(Constants.AppFabric.SERVER_ANNOUNCE_PORT,
int announcePort = cConf.getInt(AppFabric.PROCESSOR_ANNOUNCE_PORT,
httpService.getBindAddress().getPort());

final InetSocketAddress socketAddress = new InetSocketAddress(announceAddress, announcePort);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,18 @@ public static final class Dangerous {
*/
public static final class AppFabric {

/**
* App Fabric Processor.
*/

public static final String PROCESSOR_PORT = "appfabric.processor.bind.port";
public static final String PROCESSOR_ANNOUNCE_PORT = "appfabric.processor.announce.port";

/**
* App Fabric Server.
*/
public static final String SERVER_PORT = "app.bind.port";
public static final String SERVER_ANNOUNCE_PORT = "app.announce.port";
public static final String SERVER_PORT = "appfabric.bind.port";
public static final String SERVER_ANNOUNCE_PORT = "appfabric.announce.port";
public static final String OUTPUT_DIR = "app.output.dir";
public static final String TEMP_DIR = "app.temp.dir";
public static final String REST_PORT = "app.rest.port";
Expand Down
12 changes: 10 additions & 2 deletions cdap-common/src/main/resources/cdap-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,18 @@
</property>

<property>
<name>app.bind.port</name>
<name>appfabric.processor.bind.port</name>
<value>0</value>
<description>
App Fabric service bind port; if 0, binds to a random port
App Fabric processor bind port; if 0, binds to a random port
</description>
</property>

<property>
<name>appfabric.bind.port</name>
<value>0</value>
<description>
App Fabric server bind port; if 0, binds to a random port
</description>
</property>

Expand Down