You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by hu...@apache.org on 2019/04/12 20:04:41 UTC
[incubator-heron] branch master updated: Fix extra link shallow
copy (#3237)
This is an automated email from the ASF dual-hosted git repository.
huijun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new 809be6f Fix extra link shallow copy (#3237)
809be6f is described below
commit 809be6f78795bd1fd98f739a1fb32b0b1c07d289
Author: Xiaoyao Qian <qi...@illinois.edu>
AuthorDate: Fri Apr 12 13:04:35 2019 -0700
Fix extra link shallow copy (#3237)
---
heron/tools/tracker/src/python/tracker.py | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/heron/tools/tracker/src/python/tracker.py b/heron/tools/tracker/src/python/tracker.py
index 421bc24..d8914bb 100644
--- a/heron/tools/tracker/src/python/tracker.py
+++ b/heron/tools/tracker/src/python/tracker.py
@@ -281,9 +281,10 @@ class Tracker(object):
}
for extra_link in self.config.extra_links:
- extra_link["url"] = self.config.get_formatted_url(executionState,
- extra_link[EXTRA_LINK_FORMATTER_KEY])
- executionState["extra_links"].append(extra_link)
+ link = extra_link.copy()
+ link["url"] = self.config.get_formatted_url(executionState,
+ link[EXTRA_LINK_FORMATTER_KEY])
+ executionState["extra_links"].append(link)
return executionState
def extract_metadata(self, topology):
@@ -306,9 +307,10 @@ class Tracker(object):
}
for extra_link in self.config.extra_links:
- extra_link["url"] = self.config.get_formatted_url(metadata,
- extra_link[EXTRA_LINK_FORMATTER_KEY])
- metadata["extra_links"].append(extra_link)
+ link = extra_link.copy()
+ link["url"] = self.config.get_formatted_url(metadata,
+ link[EXTRA_LINK_FORMATTER_KEY])
+ metadata["extra_links"].append(link)
return metadata
@staticmethod