Repository: aurora Updated Branches: refs/heads/master 824e396ab -> e1b55fa54
Fixing duplicate instances in the UI. Bugs closed: AURORA-1604 Reviewed at https://reviews.apache.org/r/43080/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/e1b55fa5 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/e1b55fa5 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/e1b55fa5 Branch: refs/heads/master Commit: e1b55fa544765c12251ce6c1736e6352da3f7edb Parents: 824e396 Author: Maxim Khutornenko <[email protected]> Authored: Mon Feb 1 20:31:28 2016 -0800 Committer: Maxim Khutornenko <[email protected]> Committed: Mon Feb 1 20:31:28 2016 -0800 ---------------------------------------------------------------------- NEWS | 1 + .../thrift/org/apache/aurora/gen/api.thrift | 2 -- .../thrift/SchedulerThriftInterface.java | 4 ---- .../resources/scheduler/assets/js/services.js | 22 +------------------- .../thrift/SchedulerThriftInterfaceTest.java | 4 +--- 5 files changed, 3 insertions(+), 30 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/e1b55fa5/NEWS ---------------------------------------------------------------------- diff --git a/NEWS b/NEWS index ef1e75f..aef8a1a 100644 --- a/NEWS +++ b/NEWS @@ -53,6 +53,7 @@ - `Identity.role` - `TaskConfig.environment` - `TaskConfig.jobName` + - `TaskQuery.owner` 0.11.0 ------ http://git-wip-us.apache.org/repos/asf/aurora/blob/e1b55fa5/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 12400a7..8409c9b 100644 --- a/api/src/main/thrift/org/apache/aurora/gen/api.thrift +++ b/api/src/main/thrift/org/apache/aurora/gen/api.thrift @@ -503,8 +503,6 @@ struct GetJobsResult { * (terms are AND'ed together). */ struct TaskQuery { - // TODO(maxim): Remove in 0.7.0. (AURORA-749) - 8: Identity owner 14: string role 9: string environment 2: string jobName http://git-wip-us.apache.org/repos/asf/aurora/blob/e1b55fa5/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java b/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java index ae05cd4..d217faf 100644 --- a/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java +++ b/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java @@ -23,7 +23,6 @@ import javax.inject.Inject; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Optional; -import com.google.common.base.Preconditions; import com.google.common.collect.ContiguousSet; import com.google.common.collect.DiscreteDomain; import com.google.common.collect.FluentIterable; @@ -453,9 +452,6 @@ class SchedulerThriftInterface implements AnnotatedAuroraAdmin { } query = implicitKillQuery(Query.arbitrary(mutableQuery)); - Preconditions.checkState( - !mutableQuery.isSetOwner(), - "The owner field in a query should have been unset by Query.Builder."); } return storage.write(storeProvider -> { http://git-wip-us.apache.org/repos/asf/aurora/blob/e1b55fa5/src/main/resources/scheduler/assets/js/services.js ---------------------------------------------------------------------- diff --git a/src/main/resources/scheduler/assets/js/services.js b/src/main/resources/scheduler/assets/js/services.js index 1a76a3f..d9ce520 100644 --- a/src/main/resources/scheduler/assets/js/services.js +++ b/src/main/resources/scheduler/assets/js/services.js @@ -17,7 +17,6 @@ ACTIVE_STATES:false, ACTIVE_JOB_UPDATE_STATES: false, CronCollisionPolicy: false, - Identity:false, JobKey: false, JobUpdateQuery:false, JobUpdateAction:false, @@ -29,10 +28,8 @@ 'use strict'; function makeJobTaskQuery(role, environment, jobName, instance) { - var id = new Identity(); - id.role = role; var taskQuery = new TaskQuery(); - taskQuery.owner = id; + taskQuery.role = role; taskQuery.environment = environment; taskQuery.jobName = jobName; @@ -88,23 +85,6 @@ }); }, - getTasks: function (role, environment, jobName) { - var id = new Identity(); - id.role = role; - var taskQuery = new TaskQuery(); - taskQuery.owner = id; - taskQuery.environment = environment; - taskQuery.jobName = jobName; - return async(function (deferred) { - auroraClient.getSchedulerClient().getTasksStatus(taskQuery, function (response) { - var result = auroraClient.processResponse(response); - result.tasks = response.result !== null ? - response.result.scheduleStatusResult.tasks : []; - deferred.resolve(result); - }); - }); - }, - getTasksWithoutConfigs: function (role, environment, jobName, instance) { var query = makeJobTaskQuery(role, environment, jobName, instance); http://git-wip-us.apache.org/repos/asf/aurora/blob/e1b55fa5/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java index 2b0451b..c774ac0 100644 --- a/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java +++ b/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java @@ -670,9 +670,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testKillTasksInvalidJobName() throws Exception { - TaskQuery query = new TaskQuery() - .setOwner(IDENTITY) - .setJobName(""); + TaskQuery query = new TaskQuery().setJobName(""); control.replay();
