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 the deprecated ConfigGroup.instanceIds field.
Date Tue, 22 Dec 2015 00:30:32 GMT
Repository: aurora
Updated Branches:
  refs/heads/master df5200b70 -> 0813e3a44


Remove the deprecated ConfigGroup.instanceIds field.

Bugs closed: AURORA-1519

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


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

Branch: refs/heads/master
Commit: 0813e3a4445997b6a25a75f0401bbeb7aa87363b
Parents: df5200b
Author: Bill Farner <wfarner@apache.org>
Authored: Mon Dec 21 16:30:25 2015 -0800
Committer: Bill Farner <wfarner@apache.org>
Committed: Mon Dec 21 16:30:25 2015 -0800

----------------------------------------------------------------------
 NEWS                                                          | 4 ++++
 api/src/main/thrift/org/apache/aurora/gen/api.thrift          | 1 -
 .../apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java | 7 +++----
 .../aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java    | 4 ----
 4 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/0813e3a4/NEWS
----------------------------------------------------------------------
diff --git a/NEWS b/NEWS
index 79d8668..ebfc3a6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+0.12.0
+------
+- Removed the deprecated field 'ConfigGroup.instanceIds' from the API.
+
 0.11.0
 ------
 - Upgraded Mesos to 0.24.1.

http://git-wip-us.apache.org/repos/asf/aurora/blob/0813e3a4/api/src/main/thrift/org/apache/aurora/gen/api.thrift
----------------------------------------------------------------------
diff --git a/api/src/main/thrift/org/apache/aurora/gen/api.thrift b/api/src/main/thrift/org/apache/aurora/gen/api.thrift
index bdfadbb..f099620 100644
--- a/api/src/main/thrift/org/apache/aurora/gen/api.thrift
+++ b/api/src/main/thrift/org/apache/aurora/gen/api.thrift
@@ -329,7 +329,6 @@ struct Range {
 
 struct ConfigGroup {
   1: TaskConfig config
-  2: set<i32> instanceIds //TODO(maxim): deprecated. Remove in AURORA-1519.
   3: set<Range> instances
 }
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/0813e3a4/src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java b/src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java
index 9f0cf86..7235902 100644
--- a/src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java
@@ -109,10 +109,9 @@ import static org.apache.aurora.scheduler.thrift.Responses.ok;
 
 class ReadOnlySchedulerImpl implements ReadOnlyScheduler.Iface {
   private static final Function<Entry<ITaskConfig, Collection<Integer>>, ConfigGroup>
TO_GROUP =
-      input -> new ConfigGroup(
-          input.getKey().newBuilder(),
-          ImmutableSet.copyOf(input.getValue()),
-          IRange.toBuildersSet(convertRanges(toRanges(input.getValue()))));
+      input -> new ConfigGroup()
+          .setConfig(input.getKey().newBuilder())
+          .setInstances(IRange.toBuildersSet(convertRanges(toRanges(input.getValue()))));
 
   private final Storage storage;
   private final NearestFit nearestFit;

http://git-wip-us.apache.org/repos/asf/aurora/blob/0813e3a4/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
b/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
index 77d5c1d..011b79a 100644
--- a/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
@@ -94,7 +94,6 @@ import static org.apache.aurora.scheduler.ResourceAggregates.MEDIUM;
 import static org.apache.aurora.scheduler.ResourceAggregates.SMALL;
 import static org.apache.aurora.scheduler.ResourceAggregates.XLARGE;
 import static org.apache.aurora.scheduler.base.Numbers.convertRanges;
-import static org.apache.aurora.scheduler.base.Numbers.rangesToInstanceIds;
 import static org.apache.aurora.scheduler.base.Numbers.toRanges;
 import static org.apache.aurora.scheduler.thrift.Fixtures.CRON_JOB;
 import static org.apache.aurora.scheduler.thrift.Fixtures.CRON_SCHEDULE;
@@ -560,11 +559,9 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
 
     ConfigGroup group1 = new ConfigGroup()
         .setConfig(firstGroupTask)
-        .setInstanceIds(Sets.newHashSet(0, 1))
         .setInstances(IRange.toBuildersSet(convertRanges(toRanges(ImmutableSet.of(0, 1)))));
     ConfigGroup group2 = new ConfigGroup()
         .setConfig(secondGroupTask)
-        .setInstanceIds(Sets.newHashSet(2))
         .setInstances(IRange.toBuildersSet(convertRanges(toRanges(ImmutableSet.of(2)))));
 
     ConfigSummary summary = new ConfigSummary()
@@ -867,7 +864,6 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
   private static ConfigGroup group(TaskConfig task, Range range) {
     return new ConfigGroup()
         .setConfig(task)
-        .setInstanceIds(rangesToInstanceIds(ImmutableSet.of(IRange.build(range))))
         .setInstances(ImmutableSet.of(range));
   }
 }


Mime
View raw message