[ASTERIXDB-3160][CONF] Add option to indicate cloud deployment
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Add a config to indicate if the cluster is being deployed in
a cloud environment. This config can be used to optimize certain
operations for cloud environments.
Change-Id: I38c2bd3691b5f17b9c557533478f790fbb8e3cbe
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17459
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
index 0d42b1b..4e96365 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
@@ -9,6 +9,7 @@
"active\.stop\.timeout" : 3600,
"active\.suspend\.timeout" : 3600,
"azure.request.timeout" : 120,
+ "cloud.deployment" : false,
"compiler\.arrayindex" : true,
"compiler.batch.lookup" : true,
"compiler.cbo" : false,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
index 6a123e1..415e96d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
@@ -9,6 +9,7 @@
"active\.stop\.timeout" : 3600,
"active\.suspend\.timeout" : 3600,
"azure.request.timeout" : 120,
+ "cloud.deployment" : false,
"compiler\.arrayindex" : true,
"compiler.batch.lookup" : true,
"compiler.cbo" : false,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
index d72d8bc..add09ca 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
@@ -9,6 +9,7 @@
"active\.stop\.timeout" : 3600,
"active\.suspend\.timeout" : 3600,
"azure.request.timeout" : 120,
+ "cloud.deployment" : false,
"compiler\.arrayindex" : true,
"compiler.batch.lookup" : true,
"compiler.cbo" : false,
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/ControllerConfig.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/ControllerConfig.java
index 19eba57..de0c174 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/ControllerConfig.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/ControllerConfig.java
@@ -50,7 +50,8 @@
(Function<IApplicationConfig, String>) appConfig -> FileUtil
.joinPath(appConfig.getString(ControllerConfig.Option.DEFAULT_DIR), "logs"),
"The directory where logs for this node are written"),
- SSL_ENABLED(BOOLEAN, false, "A flag indicating if cluster communications should use secured connections");
+ SSL_ENABLED(BOOLEAN, false, "A flag indicating if cluster communications should use secured connections"),
+ CLOUD_DEPLOYMENT(BOOLEAN, false, "A flag indicating if the cluster is deployed in a cloud environment"),;
private final IOptionType type;
private final String description;
@@ -133,4 +134,7 @@
return getAppConfig().getBoolean(Option.SSL_ENABLED);
}
+ public boolean isCloudDeployment() {
+ return getAppConfig().getBoolean(Option.CLOUD_DEPLOYMENT);
+ }
}