This is an automated email from the ASF dual-hosted git repository. mhubail pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push: new 627666d782 [ASTERIXDB-3160][CONF] Add option to indicate cloud deployment 627666d782 is described below commit 627666d78235df45813f00e40968049382b249c7 Author: Murtadha Hubail <murtadha.hub...@couchbase.com> AuthorDate: Fri Mar 31 17:38:57 2023 +0300 [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 <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Murtadha Hubail <mhub...@apache.org> Reviewed-by: Ali Alsuliman <ali.al.solai...@gmail.com> --- .../results/api/cluster_state_1/cluster_state_1.1.regexadm | 1 + .../api/cluster_state_1_full/cluster_state_1_full.1.regexadm | 1 + .../api/cluster_state_1_less/cluster_state_1_less.1.regexadm | 1 + .../apache/hyracks/control/common/controllers/ControllerConfig.java | 6 +++++- 4 files changed, 8 insertions(+), 1 deletion(-) 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 0d42b1b374..4e96365008 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 6a123e1adf..415e96de01 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 d72d8bc2b3..add09ca27c 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 19eba57d88..de0c174535 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 @@ public class ControllerConfig implements Serializable { (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 @@ public class ControllerConfig implements Serializable { return getAppConfig().getBoolean(Option.SSL_ENABLED); } + public boolean isCloudDeployment() { + return getAppConfig().getBoolean(Option.CLOUD_DEPLOYMENT); + } }