sv2000 commented on a change in pull request #3083:
URL: https://github.com/apache/incubator-gobblin/pull/3083#discussion_r471827430



##########
File path: 
gobblin-service/src/main/java/org/apache/gobblin/service/modules/flowgraph/DataNode.java
##########
@@ -38,6 +38,12 @@
    */
   Config getRawConfig();
 
+  /**
+   * Set raw config. This should only be used in cases where the data node's 
actual config should be different from the
+   * config it is constructed with (e.g. constructing with a resolved config).
+   */
+  void setRawConfig(Config config);

Review comment:
       Same comment as earlier.

##########
File path: 
gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitFlowGraphMonitor.java
##########
@@ -184,10 +184,13 @@ private void addDataNode(DiffEntry change) {
     if (checkFilePath(change.getNewPath(), NODE_FILE_DEPTH)) {
       Path nodeFilePath = new Path(this.repositoryDir, change.getNewPath());
       try {
-        Config config = loadNodeFileWithOverrides(nodeFilePath);
-        Class dataNodeClass = Class.forName(ConfigUtils.getString(config, 
FlowGraphConfigurationKeys.DATA_NODE_CLASS,
+        // Temporarily resolve the data node config when constructing it, but 
leave it unresolved after to allow overriding
+        Config unresolvedConfig = loadNodeFileWithOverrides(nodeFilePath);
+        Config resolvedConfig = unresolvedConfig.resolve();

Review comment:
       Can the resolution be pushed into the BaseDataNode class? 

##########
File path: 
gobblin-service/src/main/java/org/apache/gobblin/service/modules/flowgraph/BaseDataNode.java
##########
@@ -39,6 +40,7 @@
   @Getter
   private String id;
   @Getter
+  @Setter

Review comment:
       We probably do not need a setter, if we do the resolution inside 
BaseDataNode.




----------------------------------------------------------------
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:
[email protected]


Reply via email to