You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by wf...@apache.org on 2014/12/04 02:29:06 UTC
incubator-aurora git commit: Remove getVersion RPC and
DEPRECATEDversion Response field.
Repository: incubator-aurora
Updated Branches:
refs/heads/master 9b1e9fbb4 -> 11da34c08
Remove getVersion RPC and DEPRECATEDversion Response field.
Bugs closed: AURORA-143, AURORA-467
Reviewed at https://reviews.apache.org/r/28623/
Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/11da34c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/11da34c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/11da34c0
Branch: refs/heads/master
Commit: 11da34c084f161db507ca2f2d4d78d4852789c1d
Parents: 9b1e9fb
Author: Bill Farner <wf...@apache.org>
Authored: Wed Dec 3 17:28:30 2014 -0800
Committer: Bill Farner <wf...@apache.org>
Committed: Wed Dec 3 17:28:30 2014 -0800
----------------------------------------------------------------------
api/src/main/thrift/org/apache/aurora/gen/api.thrift | 9 ---------
.../scheduler/thrift/SchedulerThriftInterface.java | 6 ------
.../scheduler/thrift/aop/ServerInfoInterceptor.java | 3 ---
.../scheduler/thrift/SchedulerThriftInterfaceTest.java | 11 -----------
.../aurora/scheduler/thrift/aop/ForwardingThrift.java | 5 -----
.../thrift/aop/ServerInfoInterceptorTest.java | 13 -------------
6 files changed, 47 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/11da34c0/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 6b63f04..7d55dce 100644
--- a/api/src/main/thrift/org/apache/aurora/gen/api.thrift
+++ b/api/src/main/thrift/org/apache/aurora/gen/api.thrift
@@ -880,8 +880,6 @@ struct Response {
1: ResponseCode responseCode
// TODO(wfarner): Remove the message field in 0.7.0. (AURORA-466)
2: optional string messageDEPRECATED
- // TODO(wfarner): Remove version field in 0.7.0. (AURORA-467)
- 4: APIVersion DEPRECATEDversion
5: ServerInfo serverInfo
/** Payload from the invoked RPC. */
3: optional Result result
@@ -924,13 +922,6 @@ service ReadOnlyScheduler {
/** Fetches the quota allocated for a user. */
Response getQuota(1: string ownerRole)
- // TODO(Suman Karumuri): Delete this API once it is no longer used.
- /**
- * Returns the current version of the API implementation
- * NOTE: This method is deprecated.
- */
- Response getVersion()
-
/**
* Populates fields in a job configuration as though it were about to be run.
* This can be used to diff a configuration running tasks.
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/11da34c0/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 0898c62..f0d910d 100644
--- a/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
+++ b/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
@@ -177,7 +177,6 @@ import static org.apache.aurora.gen.ResponseCode.INVALID_REQUEST;
import static org.apache.aurora.gen.ResponseCode.LOCK_ERROR;
import static org.apache.aurora.gen.ResponseCode.OK;
import static org.apache.aurora.gen.ResponseCode.WARNING;
-import static org.apache.aurora.gen.apiConstants.CURRENT_API_VERSION;
import static org.apache.aurora.scheduler.base.Tasks.ACTIVE_STATES;
import static org.apache.aurora.scheduler.quota.QuotaCheckResult.Result.INSUFFICIENT_QUOTA;
import static org.apache.aurora.scheduler.thrift.Util.addMessage;
@@ -1141,11 +1140,6 @@ class SchedulerThriftInterface implements AuroraAdmin.Iface {
}
@Override
- public Response getVersion() {
- return okResponse(Result.getVersionResult(CURRENT_API_VERSION));
- }
-
- @Override
public Response addInstances(
final AddInstancesConfig config,
@Nullable final Lock mutableLock,
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/11da34c0/src/main/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptor.java b/src/main/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptor.java
index 3406722..e3ab283 100644
--- a/src/main/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptor.java
+++ b/src/main/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptor.java
@@ -20,8 +20,6 @@ import org.aopalliance.intercept.MethodInvocation;
import org.apache.aurora.gen.Response;
import org.apache.aurora.scheduler.storage.entities.IServerInfo;
-import static org.apache.aurora.gen.apiConstants.CURRENT_API_VERSION;
-
class ServerInfoInterceptor implements MethodInterceptor {
@Inject
@@ -30,7 +28,6 @@ class ServerInfoInterceptor implements MethodInterceptor {
@Override
public Object invoke(MethodInvocation invocation) throws Throwable {
Response resp = (Response) invocation.proceed();
- resp.setDEPRECATEDversion(CURRENT_API_VERSION);
resp.setServerInfo(serverInfo.newBuilder());
return resp;
}
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/11da34c0/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 d687f57..072ea2b 100644
--- a/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
@@ -47,7 +47,6 @@ import org.apache.aurora.auth.CapabilityValidator;
import org.apache.aurora.auth.CapabilityValidator.AuditCheck;
import org.apache.aurora.auth.CapabilityValidator.Capability;
import org.apache.aurora.auth.SessionValidator.AuthFailedException;
-import org.apache.aurora.gen.APIVersion;
import org.apache.aurora.gen.AddInstancesConfig;
import org.apache.aurora.gen.AssignedTask;
import org.apache.aurora.gen.AuroraAdmin;
@@ -217,7 +216,6 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
.setClusterName("test")
.setThriftAPIVersion(THRIFT_API_VERSION)
.setStatsUrlPrefix("fake_url");
- private static final APIVersion API_VERSION = new APIVersion().setMajor(THRIFT_API_VERSION);
private static final String CRON_SCHEDULE = "0 * * * *";
private StorageTestUtil storageUtil;
@@ -1789,7 +1787,6 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
private Response response(ResponseCode code, Optional<Result> result, String... messages) {
Response response = Util.emptyResponse()
.setResponseCode(code)
- .setDEPRECATEDversion(API_VERSION)
.setServerInfo(SERVER_INFO)
.setResult(result.orNull());
if (messages.length > 0) {
@@ -1819,7 +1816,6 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
private Response invalidResponse(String message) {
return Util.emptyResponse()
.setResponseCode(INVALID_REQUEST)
- .setDEPRECATEDversion(API_VERSION)
.setServerInfo(SERVER_INFO)
.setMessageDEPRECATED(message)
.setDetails(ImmutableList.of(new ResponseDetail(message)));
@@ -2184,13 +2180,6 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
assertResponse(ERROR, thrift.snapshot(SESSION));
}
- @Test
- public void testGetVersion() throws Exception {
- control.replay();
-
- assertOkResponse(thrift.getVersion());
- }
-
private static AddInstancesConfig createInstanceConfig(TaskConfig task) {
return new AddInstancesConfig()
.setTaskConfig(task)
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/11da34c0/src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java b/src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java
index 0497908..4bf6392 100644
--- a/src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java
+++ b/src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java
@@ -230,11 +230,6 @@ abstract class ForwardingThrift implements AuroraAdmin.Iface {
}
@Override
- public Response getVersion() throws TException {
- return delegate.getVersion();
- }
-
- @Override
public Response acquireLock(LockKey lockKey, SessionKey session) throws TException {
return delegate.acquireLock(lockKey, session);
}
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/11da34c0/src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java
index 840b3f8..7e20aaa 100644
--- a/src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java
@@ -34,7 +34,6 @@ import org.junit.Test;
import static org.apache.aurora.gen.ResponseCode.OK;
import static org.easymock.EasyMock.expect;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
public class ServerInfoInterceptorTest extends EasyMockTest {
@@ -70,18 +69,6 @@ public class ServerInfoInterceptorTest extends EasyMockTest {
}
@Test
- public void testVersionIsSet() throws Exception {
- Response response = okResponse(
- Result.getJobsResult(
- new GetJobsResult().setConfigs(ImmutableSet.<JobConfiguration>of())));
-
- expect(realThrift.getJobs(ROLE)).andReturn(response);
- control.replay();
-
- assertNotNull(decoratedThrift.getJobs(ROLE).getDEPRECATEDversion());
- }
-
- @Test
public void testServerInfoIsSet() throws Exception {
ServerInfo previousServerInfo =
new ServerInfo().setClusterName("FAKECLUSTER").setThriftAPIVersion(100000);