aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wfar...@apache.org
Subject aurora git commit: Remove timestamp from task IDs.
Date Fri, 19 Feb 2016 23:13:45 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 8501d8219 -> 9f796ffbc


Remove timestamp from task IDs.

Reviewed at https://reviews.apache.org/r/42896/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/9f796ffb
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/9f796ffb
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/9f796ffb

Branch: refs/heads/master
Commit: 9f796ffbc9abd1c3ab796d5614682a3dd60fcb27
Parents: 8501d82
Author: Bill Farner <wfarner@apache.org>
Authored: Fri Feb 19 15:12:44 2016 -0800
Committer: Bill Farner <wfarner@apache.org>
Committed: Fri Feb 19 15:12:44 2016 -0800

----------------------------------------------------------------------
 NEWS                                                         | 1 +
 .../java/org/apache/aurora/scheduler/TaskIdGenerator.java    | 8 +++-----
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/9f796ffb/NEWS
----------------------------------------------------------------------
diff --git a/NEWS b/NEWS
index 11a57bb..b84a945 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Deprecations and removals:
   - `TaskConfig.environment`
   - `TaskConfig.jobName`
   - `TaskQuery.owner`
+- Task ID strings are no longer prefixed by a timestamp.
 
 0.12.0
 ------

http://git-wip-us.apache.org/repos/asf/aurora/blob/9f796ffb/src/main/java/org/apache/aurora/scheduler/TaskIdGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/TaskIdGenerator.java b/src/main/java/org/apache/aurora/scheduler/TaskIdGenerator.java
index 35675ac..5fca5b1 100644
--- a/src/main/java/org/apache/aurora/scheduler/TaskIdGenerator.java
+++ b/src/main/java/org/apache/aurora/scheduler/TaskIdGenerator.java
@@ -48,17 +48,15 @@ public interface TaskIdGenerator {
     public String generate(ITaskConfig task, int instanceId) {
       String sep = "-";
       return new StringBuilder()
-          .append(clock.nowMillis())               // Allows chronological sorting.
-          .append(sep)
-          .append(task.getJob().getRole())       // Identification and collision prevention.
+          .append(task.getJob().getRole())
           .append(sep)
           .append(task.getJob().getEnvironment())
           .append(sep)
           .append(task.getJob().getName())
           .append(sep)
-          .append(instanceId)                      // Collision prevention within job.
+          .append(instanceId)
           .append(sep)
-          .append(UUID.randomUUID())               // Just-in-case collision prevention.
+          .append(UUID.randomUUID())
           .toString().replaceAll("[^\\w-]", sep);  // Constrain character set.
     }
   }


Mime
View raw message