Repository: incubator-gobblin
Updated Branches:
  refs/heads/master 0fe256f22 -> 8f72514c6


[GOBBLIN-667] Pass encrypt.key.loc configuration to GitFlowGraphMonitor.[]

Closes #2537 from sv2000/encryptKeyLoc


Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/8f72514c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/8f72514c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/8f72514c

Branch: refs/heads/master
Commit: 8f72514c68aeb029bea5138dcc1941c2aac08ae0
Parents: 0fe256f
Author: suvasude <[email protected]>
Authored: Fri Jan 18 16:14:57 2019 -0800
Committer: Hung Tran <[email protected]>
Committed: Fri Jan 18 16:14:57 2019 -0800

----------------------------------------------------------------------
 .../gobblin/service/modules/flow/MultiHopFlowCompiler.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/8f72514c/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopFlowCompiler.java
----------------------------------------------------------------------
diff --git 
a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopFlowCompiler.java
 
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopFlowCompiler.java
index 01ed778..3f412f4 100644
--- 
a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopFlowCompiler.java
+++ 
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopFlowCompiler.java
@@ -95,7 +95,13 @@ public class MultiHopFlowCompiler extends 
BaseFlowToJobSpecCompiler {
       throw new RuntimeException("Cannot instantiate " + getClass().getName(), 
e);
     }
     this.flowGraph = new BaseFlowGraph();
-    this.gitFlowGraphMonitor = new GitFlowGraphMonitor(this.config, 
flowCatalog, this.flowGraph, this.topologySpecMap, this.getInitComplete());
+    Config gitFlowGraphConfig = this.config;
+    if (this.config.hasPath(ConfigurationKeys.ENCRYPT_KEY_LOC)) {
+      //Add encrypt.key.loc config to the config passed to GitFlowGraphMonitor
+      gitFlowGraphConfig = this.config
+          .withValue(GitFlowGraphMonitor.GIT_FLOWGRAPH_MONITOR_PREFIX + "." + 
ConfigurationKeys.ENCRYPT_KEY_LOC, 
config.getValue(ConfigurationKeys.ENCRYPT_KEY_LOC));
+    }
+    this.gitFlowGraphMonitor = new GitFlowGraphMonitor(gitFlowGraphConfig, 
flowCatalog, this.flowGraph, this.topologySpecMap, this.getInitComplete());
     this.serviceManager = new 
ServiceManager(Lists.newArrayList(this.gitFlowGraphMonitor));
     addShutdownHook();
     //Start the git flow graph monitor

Reply via email to