You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gobblin.apache.org by hu...@apache.org on 2019/02/08 04:35:45 UTC

[incubator-gobblin] branch master updated: [GOBBLIN-678] Make flow.executionId available in the GaaS Flow config for use in job templates.[]

This is an automated email from the ASF dual-hosted git repository.

hutran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git


The following commit(s) were added to refs/heads/master by this push:
     new ed45025  [GOBBLIN-678] Make flow.executionId available in the GaaS Flow config for use in job templates.[]
ed45025 is described below

commit ed45025e3ab07aabc02e798a456ff3c84d47e730
Author: suvasude <su...@linkedin.biz>
AuthorDate: Thu Feb 7 20:35:42 2019 -0800

    [GOBBLIN-678] Make flow.executionId available in the GaaS Flow config for use in job templates.[]
    
    Closes #2549 from sv2000/flow-exec-id
---
 .../service/modules/flowgraph/pathfinder/AbstractPathFinder.java        | 2 +-
 .../resources/template_catalog/multihop/jobTemplates/distcp.template    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flowgraph/pathfinder/AbstractPathFinder.java b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flowgraph/pathfinder/AbstractPathFinder.java
index 918f4a6..880532f 100644
--- a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flowgraph/pathfinder/AbstractPathFinder.java
+++ b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flowgraph/pathfinder/AbstractPathFinder.java
@@ -84,8 +84,8 @@ public abstract class AbstractPathFinder implements PathFinder {
       throws ReflectiveOperationException {
     this.flowGraph = flowGraph;
     this.flowSpec = flowSpec;
-    this.flowConfig = flowSpec.getConfig();
     this.flowExecutionId = FlowUtils.getOrCreateFlowExecutionId(flowSpec);
+    this.flowConfig = flowSpec.getConfig().withValue(ConfigurationKeys.FLOW_EXECUTION_ID_KEY, ConfigValueFactory.fromAnyRef(flowExecutionId));
 
     //Get src/dest DataNodes from the flow config
     String srcNodeId = ConfigUtils.getString(flowConfig, ServiceConfigKeys.FLOW_SOURCE_IDENTIFIER_KEY, "");
diff --git a/gobblin-service/src/test/resources/template_catalog/multihop/jobTemplates/distcp.template b/gobblin-service/src/test/resources/template_catalog/multihop/jobTemplates/distcp.template
index 1a29262..63a4f89 100644
--- a/gobblin-service/src/test/resources/template_catalog/multihop/jobTemplates/distcp.template
+++ b/gobblin-service/src/test/resources/template_catalog/multihop/jobTemplates/distcp.template
@@ -25,7 +25,7 @@ state.store.fs.uri=${fs.uri}
 target.filebased.fs.uri=${destination.data.node.fs.uri}
 writer.fs.uri=${target.filebased.fs.uri}
 
-work.dir=/tmp/${user.to.proxy}
+work.dir=/tmp/${user.to.proxy}/${flow.executionId}
 
 # ====================================================================
 # Distcp configurations