You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2020/07/13 20:27:02 UTC

[GitHub] [incubator-gobblin] autumnust commented on a change in pull request #3056: GOBBLIN-1209: Provide an option to configure the java tmp dir to the …

autumnust commented on a change in pull request #3056:
URL: https://github.com/apache/incubator-gobblin/pull/3056#discussion_r453911728



##########
File path: gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinClusterManager.java
##########
@@ -142,23 +142,25 @@
 
   public GobblinClusterManager(String clusterName, String applicationId, Config sysConfig,
       Optional<Path> appWorkDirOptional) throws Exception {
+    // Set system properties passed in via application config. As an example, Helix uses System#getProperty() for ZK configuration
+    // overrides such as sessionTimeout. In this case, the overrides specified
+    // in the application configuration have to be extracted and set before initializing HelixManager.
+    GobblinClusterUtils.setSystemProperties(sysConfig);
+
+    //Add dynamic config
+    this.config = GobblinClusterUtils.addDynamicConfig(sysConfig);

Review comment:
       Q: Does the location of adding `dynamicConfig` matter? Is dynamicConfig specifically used for SSL-relevant configs? 

##########
File path: gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinClusterUtils.java
##########
@@ -112,6 +116,28 @@ public static Path getJobStateFilePath(boolean usingStateStore, Path appWorkPath
     return jobStateFilePath;
   }
 
+  /**
+   * Set the system properties from the input {@link Config} instance
+   * @param config
+   */
+  public static void setSystemProperties(Config config) {
+    Properties properties = ConfigUtils.configToProperties(ConfigUtils.getConfig(config, GobblinClusterConfigurationKeys.GOBBLIN_CLUSTER_SYSTEM_PROPERTY_PREFIX,
+        ConfigFactory.empty()));
+
+    for (Map.Entry<Object, Object> entry: properties.entrySet()) {
+      if (entry.getKey().toString().equals("java.io.tmpdir")) {

Review comment:
       Shall we add `java.io.tmpdir` to a string constant ? 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org