You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by dl...@apache.org on 2017/01/16 21:53:35 UTC
[1/2] incubator-edgent git commit: Set auto-assigned Job name at
construction time instead of in getName()
Repository: incubator-edgent
Updated Branches:
refs/heads/master 18d8f8b07 -> 282d14167
Set auto-assigned Job name at construction time instead of in getName()
Just simplifies the logic.
Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/4266957b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/4266957b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/4266957b
Branch: refs/heads/master
Commit: 4266957be396321cc297a290f3ca985161a5201d
Parents: a6090c8
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Mon Jan 16 15:51:37 2017 -0500
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Mon Jan 16 15:51:37 2017 -0500
----------------------------------------------------------------------
.../java/org/apache/edgent/runtime/etiao/EtiaoJob.java | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/4266957b/runtime/etiao/src/main/java/org/apache/edgent/runtime/etiao/EtiaoJob.java
----------------------------------------------------------------------
diff --git a/runtime/etiao/src/main/java/org/apache/edgent/runtime/etiao/EtiaoJob.java b/runtime/etiao/src/main/java/org/apache/edgent/runtime/etiao/EtiaoJob.java
index 95bf8ce..db57e55 100644
--- a/runtime/etiao/src/main/java/org/apache/edgent/runtime/etiao/EtiaoJob.java
+++ b/runtime/etiao/src/main/java/org/apache/edgent/runtime/etiao/EtiaoJob.java
@@ -55,13 +55,15 @@ public class EtiaoJob extends AbstractGraphJob implements JobContext {
*
* @param graph graph representation of the topology
* @param topologyName name of the topology
- * @param jobName name of the Job
+ * @param jobName name of the Job. If null, a name of {@code topologyName_jobId} is assigned.
* @param container service container
*/
EtiaoJob(DirectGraph graph, String topologyName, String jobName, ServiceContainer container) {
this.graph = graph;
this.id = ID_PREFIX + String.valueOf(jobID.getAndIncrement());
this.topologyName = topologyName;
+ if (jobName == null)
+ jobName = this.topologyName + "_" + this.id;
this.name = jobName;
this.containerServices = container;
@@ -74,16 +76,9 @@ public class EtiaoJob extends AbstractGraphJob implements JobContext {
jobs.addJob(this);
}
- /**
- * {@inheritDoc}
- * <P>
- * If a job name is not specified, this implementation
- * creates a job name with the following format: {@code topologyName_jobId}.
- * </P>
- */
@Override
public String getName() {
- return name != null ? name : topologyName + "_" + this.id;
+ return name;
}
@Override
[2/2] incubator-edgent git commit: Merge pull request #274
Posted by dl...@apache.org.
Merge pull request #274
This closes #274
Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/282d1416
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/282d1416
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/282d1416
Branch: refs/heads/master
Commit: 282d141678769001de51c8ffe706108034cbba4b
Parents: 18d8f8b 4266957
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Mon Jan 16 16:53:31 2017 -0500
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Mon Jan 16 16:53:31 2017 -0500
----------------------------------------------------------------------
.../java/org/apache/edgent/runtime/etiao/EtiaoJob.java | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------