summaryrefslogtreecommitdiff
path: root/groot-bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'groot-bootstrap')
-rw-r--r--groot-bootstrap/src/main/java/com/geedgenetworks/bootstrap/execution/JobRuntimeEnvironment.java7
-rw-r--r--groot-bootstrap/src/main/java/com/geedgenetworks/bootstrap/execution/RuntimeEnvironment.java4
-rw-r--r--groot-bootstrap/src/test/resources/grootstream_job_etl_test.yaml4
3 files changed, 6 insertions, 9 deletions
diff --git a/groot-bootstrap/src/main/java/com/geedgenetworks/bootstrap/execution/JobRuntimeEnvironment.java b/groot-bootstrap/src/main/java/com/geedgenetworks/bootstrap/execution/JobRuntimeEnvironment.java
index 1962ce8..07fde4d 100644
--- a/groot-bootstrap/src/main/java/com/geedgenetworks/bootstrap/execution/JobRuntimeEnvironment.java
+++ b/groot-bootstrap/src/main/java/com/geedgenetworks/bootstrap/execution/JobRuntimeEnvironment.java
@@ -35,8 +35,6 @@ public class JobRuntimeEnvironment implements RuntimeEnvironment{
private String jobName = Constants.DEFAULT_JOB_NAME;
private Set<String> splitSet = new HashSet<>();
- private final Map<String, String> taskProperties= new HashMap<>();
-
private JobRuntimeEnvironment(Config config, GrootStreamConfig grootStreamConfig) {
this.grootStreamConfig = grootStreamConfig;
this.initialize(config);
@@ -65,8 +63,8 @@ public class JobRuntimeEnvironment implements RuntimeEnvironment{
}
@Override
- public RuntimeEnvironment initTaskProperties(Config taskProperties) {
- this.taskProperties.putAll(taskProperties.root().unwrapped().entrySet()
+ public RuntimeEnvironment loadJobProperties(Config jobProperties) {
+ this.grootStreamConfig.getCommonConfig().getPropertiesConfig().putAll(jobProperties.root().unwrapped().entrySet()
.stream()
.collect(Collectors.toMap(Map.Entry::getKey, entry -> String.valueOf(entry.getValue()))));
return this;
@@ -144,7 +142,6 @@ public class JobRuntimeEnvironment implements RuntimeEnvironment{
}
configuration.setString(Constants.SYSPROP_UDF_PLUGIN_CONFIG, JSON.toJSONString(grootStreamConfig.getUDFPluginConfig()));
configuration.setString(Constants.SYSPROP_GROOTSTREAM_CONFIG, JSON.toJSONString(grootStreamConfig.getCommonConfig()));
- configuration.setString(Constants.SYSPROP_GROOTSTREAM_TASK_PROPERTIES, JSON.toJSONString(taskProperties));
environment.getConfig().setGlobalJobParameters(configuration);
setTimeCharacteristic();
setCheckpoint();
diff --git a/groot-bootstrap/src/main/java/com/geedgenetworks/bootstrap/execution/RuntimeEnvironment.java b/groot-bootstrap/src/main/java/com/geedgenetworks/bootstrap/execution/RuntimeEnvironment.java
index 3b06c0c..710e7f6 100644
--- a/groot-bootstrap/src/main/java/com/geedgenetworks/bootstrap/execution/RuntimeEnvironment.java
+++ b/groot-bootstrap/src/main/java/com/geedgenetworks/bootstrap/execution/RuntimeEnvironment.java
@@ -13,14 +13,14 @@ import java.util.List;
public interface RuntimeEnvironment {
RuntimeEnvironment setEnvConfig(Config envConfig);
Config getEnvConfig();
- RuntimeEnvironment initTaskProperties(Config taskProperties);
+ RuntimeEnvironment loadJobProperties(Config jobProperties);
CheckResult checkConfig();
RuntimeEnvironment prepare();
void registerPlugin(List<URL> pluginPaths);
default void initialize(Config config) {
if (config.getConfig(Constants.APPLICATION).hasPath(Constants.PROPERTIES)) {
- this.initTaskProperties(config.getConfig(ConfigUtil.joinPath(Constants.APPLICATION, Constants.PROPERTIES)));
+ this.loadJobProperties(config.getConfig(ConfigUtil.joinPath(Constants.APPLICATION, Constants.PROPERTIES)));
}
this.setEnvConfig(config.getConfig(ConfigUtil.joinPath(Constants.APPLICATION, Constants.APPLICATION_ENV))).prepare();
}
diff --git a/groot-bootstrap/src/test/resources/grootstream_job_etl_test.yaml b/groot-bootstrap/src/test/resources/grootstream_job_etl_test.yaml
index 7716d33..76dcf7f 100644
--- a/groot-bootstrap/src/test/resources/grootstream_job_etl_test.yaml
+++ b/groot-bootstrap/src/test/resources/grootstream_job_etl_test.yaml
@@ -205,6 +205,6 @@ application: # [object] Application Configuration
downstream: [collect_sink]
- name: collect_sink
parallelism: 1
-# properties:
-# hos.bucket.name.policy_capture_file: traffic_policy_capture_file_bucket
+ properties:
+ hos.bucket.name.policy_capture_file: traffic_policy_capture_file_bucket