aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kevi...@apache.org
Subject [6/9] git commit: Upgrade Thrift to 0.9.1
Date Thu, 05 Dec 2013 19:58:18 GMT
Upgrade Thrift to 0.9.1

This upgrades the Java side of Aurora to libthrift 0.9.1 and the thrift compiler 0.9.1.
This change covers the following:
1. Upgrades the compiler and runtime.
2. Fixes the Aurora source code to use the new way of accessing Thrift
   Constants.
3. com.twitter.common.ThriftServer was copied into the source tree and modified
   to deal with the breakage caused by
   https://issues.apache.org/jira/browse/THRIFT-745


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

Branch: refs/heads/master
Commit: e7b3da9c47390ed40aac8a5b17aef6b5a6404274
Parents: aa9f826
Author: Zameer Manji <zmanji@twitter.com>
Authored: Thu Dec 5 10:13:23 2013 -0800
Committer: Zameer Manji <zmanji@twitter.com>
Committed: Thu Dec 5 10:13:23 2013 -0800

----------------------------------------------------------------------
 build-support/thrift/Makefile                   |   8 +-
 build.gradle                                    |  10 +-
 .../twitter/aurora/scheduler/base/Tasks.java    |   6 +-
 .../configuration/ConfigurationManager.java     |   4 +-
 .../scheduler/cron/testing/AbstractCronIT.java  |   2 +-
 .../aurora/scheduler/http/SchedulerzJob.java    |   4 +-
 .../aurora/scheduler/http/SchedulerzRole.java   |   6 +-
 .../aurora/scheduler/storage/log/Entries.java   |   2 +-
 .../scheduler/storage/log/LogManager.java       |   4 +-
 .../storage/log/SnapshotStoreImpl.java          |   2 +-
 .../storage/log/testing/LogOpMatcher.java       |   4 +-
 .../scheduler/thrift/SchedulerAPIServlet.java   |   2 +-
 .../thrift/SchedulerThriftInterface.java        |   2 +-
 .../scheduler/thrift/SchedulerThriftServer.java |  28 -----
 .../aurora/scheduler/thrift/ThriftModule.java   |   3 +-
 .../aurora/scheduler/thrift/ThriftServer.java   | 107 +++++++++++++++++++
 .../scheduler/thrift/ThriftServerLauncher.java  |  14 +--
 .../thrift/aop/APIVersionInterceptor.java       |   2 +-
 .../aurora/scheduler/app/SchedulerIT.java       |   4 +-
 .../configuration/ConfigurationManagerTest.java |   6 +-
 .../scheduler/state/CronJobManagerTest.java     |   2 +-
 .../scheduler/state/LockManagerImplTest.java    |   2 +-
 .../scheduler/state/StateManagerImplTest.java   |   2 +-
 .../scheduler/storage/backup/RecoveryTest.java  |   2 +-
 .../scheduler/storage/log/LogManagerTest.java   |   4 +-
 .../scheduler/storage/log/LogStorageTest.java   |   4 +-
 .../storage/log/SnapshotStoreImplTest.java      |   2 +-
 .../thrift/SchedulerThriftInterfaceTest.java    |   2 +-
 28 files changed, 160 insertions(+), 80 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/build-support/thrift/Makefile
----------------------------------------------------------------------
diff --git a/build-support/thrift/Makefile b/build-support/thrift/Makefile
index 10f201f..56e28fd 100644
--- a/build-support/thrift/Makefile
+++ b/build-support/thrift/Makefile
@@ -11,9 +11,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-THRIFT_VERSION = 0.5.0
+THRIFT_VERSION = 0.9.1
 THRIFT_DISTNAME = thrift-$(THRIFT_VERSION)
-THRIFT_URL = http://archive.apache.org/dist/incubator/thrift/$(THRIFT_VERSION)-incubating/$(THRIFT_DISTNAME).tar.gz
+THRIFT_URL = http://www.us.apache.org/dist/thrift/$(THRIFT_VERSION)/$(THRIFT_DISTNAME).tar.gz
+#TODO(zmanji): Verify the MD5 of the downloaded file.
 
 THRIFT = ./thrift-$(THRIFT_VERSION)/compiler/cpp/thrift
 
@@ -21,7 +22,8 @@ all: $(THRIFT)
 
 $(THRIFT):
 	curl $(THRIFT_URL) | tar zxv
-	(cd $(THRIFT_DISTNAME) && ./configure --without-php --without-php_extension --without-ruby
--without-haskell)
+	(cd $(THRIFT_DISTNAME) && ./configure --without-php --without-php_extension --without-ruby
--without-haskell \
+		--without-d --without-go --without-perl --without-python --without-erlang --without-java
--without-c_glib)
 	(cd $(THRIFT_DISTNAME) && make -j4)
 
 clean:

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 98f7701..12ff86f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -78,6 +78,11 @@ sourceSets {
     runtimeClasspath += sourceSets.generated.output
   }
 }
+/*  A note on libthrift: All of com.twitter.common depends on libthrift 0.5.x. We depend
on
+    libthrift 0.9.x. There are binary incompatibilities between the two versions and resolving
+    them involved forking com.twitter.common classes into Aurora to use the new libthrift
API. Be
+    very cautious when either upgrading libthrift or com.twitter.common dependencies!!!
+ */
 
 jar {
   from sourceSets.generated.output
@@ -102,7 +107,7 @@ dependencies {
   compile 'log4j:log4j:1.2.17'
   compile 'org.antlr:stringtemplate:3.2.1'
   compile 'org.apache.mesos:mesos:0.15.0-rc3'
-  def thriftLib = 'org.apache.thrift:libthrift:0.5.0-1'
+  def thriftLib = 'org.apache.thrift:libthrift:0.9.1'
   compile thriftLib
   compile 'org.apache.zookeeper:zookeeper:3.3.4'
   def slf4jRev = '1.6.1'
@@ -158,10 +163,9 @@ checkstyle {
   sourceSets = [ sourceSets.main ]
 }
 
-def thriftBinary = 'build-support/thrift/thrift-0.5.0/compiler/cpp/thrift'
+def thriftBinary = 'build-support/thrift/thrift-0.9.1/compiler/cpp/thrift'
 
 task bootstrapThrift {
-  // build-support/thrift/thrift-0.5.0/compiler/cpp/thrift
   inputs.file file(thriftBinary)
   outputs.dir file(thriftBinary)
   exec {

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/base/Tasks.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/base/Tasks.java b/src/main/java/com/twitter/aurora/scheduler/base/Tasks.java
index 557ac3a..d98da3f 100644
--- a/src/main/java/com/twitter/aurora/scheduler/base/Tasks.java
+++ b/src/main/java/com/twitter/aurora/scheduler/base/Tasks.java
@@ -30,9 +30,9 @@ import com.google.common.collect.Multimap;
 import com.google.common.collect.Multimaps;
 import com.google.common.collect.Ordering;
 
-import com.twitter.aurora.gen.Constants;
 import com.twitter.aurora.gen.ScheduleStatus;
 import com.twitter.aurora.gen.ScheduledTask;
+import com.twitter.aurora.gen.apiConstants;
 import com.twitter.aurora.scheduler.storage.entities.IAssignedTask;
 import com.twitter.aurora.scheduler.storage.entities.IJobKey;
 import com.twitter.aurora.scheduler.storage.entities.IScheduledTask;
@@ -97,13 +97,13 @@ public final class Tasks {
    * Different states that an active task may be in.
    */
   public static final EnumSet<ScheduleStatus> ACTIVE_STATES =
-      EnumSet.copyOf(Constants.ACTIVE_STATES);
+      EnumSet.copyOf(apiConstants.ACTIVE_STATES);
 
   /**
    * Terminal states, which a task should not move from.
    */
   public static final Set<ScheduleStatus> TERMINAL_STATES =
-      EnumSet.copyOf(Constants.TERMINAL_STATES);
+      EnumSet.copyOf(apiConstants.TERMINAL_STATES);
 
   public static final Predicate<ITaskConfig> IS_PRODUCTION =
       new Predicate<ITaskConfig>() {

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/configuration/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/configuration/ConfigurationManager.java
b/src/main/java/com/twitter/aurora/scheduler/configuration/ConfigurationManager.java
index 6d40d11..4839d0f 100644
--- a/src/main/java/com/twitter/aurora/scheduler/configuration/ConfigurationManager.java
+++ b/src/main/java/com/twitter/aurora/scheduler/configuration/ConfigurationManager.java
@@ -47,8 +47,8 @@ import com.twitter.aurora.scheduler.storage.entities.IValueConstraint;
 import com.twitter.common.base.Closure;
 import com.twitter.common.base.MorePreconditions;
 
-import static com.twitter.aurora.gen.Constants.DEFAULT_ENVIRONMENT;
-import static com.twitter.aurora.gen.Constants.GOOD_IDENTIFIER_PATTERN_JVM;
+import static com.twitter.aurora.gen.apiConstants.DEFAULT_ENVIRONMENT;
+import static com.twitter.aurora.gen.apiConstants.GOOD_IDENTIFIER_PATTERN_JVM;
 
 /**
  * Manages translation from a string-mapped configuration to a concrete configuration type,
and

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/cron/testing/AbstractCronIT.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/cron/testing/AbstractCronIT.java b/src/main/java/com/twitter/aurora/scheduler/cron/testing/AbstractCronIT.java
index 4aa279d..6bfc909 100644
--- a/src/main/java/com/twitter/aurora/scheduler/cron/testing/AbstractCronIT.java
+++ b/src/main/java/com/twitter/aurora/scheduler/cron/testing/AbstractCronIT.java
@@ -25,7 +25,7 @@ import com.twitter.common.testing.easymock.EasyMockTest;
 
 import static org.junit.Assert.assertTrue;
 
-import static com.twitter.aurora.gen.test.Constants.VALID_CRON_SCHEDULES;
+import static com.twitter.aurora.gen.test.testConstants.VALID_CRON_SCHEDULES;
 
 /**
  * Abstract test to verify conformance with the {@link CronScheduler} interface.

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/http/SchedulerzJob.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/http/SchedulerzJob.java b/src/main/java/com/twitter/aurora/scheduler/http/SchedulerzJob.java
index 9420533..12b0bec 100644
--- a/src/main/java/com/twitter/aurora/scheduler/http/SchedulerzJob.java
+++ b/src/main/java/com/twitter/aurora/scheduler/http/SchedulerzJob.java
@@ -50,8 +50,8 @@ import com.google.common.collect.Ordering;
 
 import org.antlr.stringtemplate.StringTemplate;
 
-import com.twitter.aurora.gen.Constants;
 import com.twitter.aurora.gen.ScheduleStatus;
+import com.twitter.aurora.gen.apiConstants;
 import com.twitter.aurora.scheduler.base.JobKeys;
 import com.twitter.aurora.scheduler.base.Query;
 import com.twitter.aurora.scheduler.base.Tasks;
@@ -187,7 +187,7 @@ public class SchedulerzJob extends JerseyTemplateServlet {
           };
 
           Map<String, String> links = ImmutableMap.of();
-          if (Constants.LIVE_STATES.contains(scheduledTask.getStatus())) {
+          if (apiConstants.LIVE_STATES.contains(scheduledTask.getStatus())) {
             links =
                 ImmutableMap.copyOf(Maps.transformValues(task.getTask().getTaskLinks(), expander));
           }

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/http/SchedulerzRole.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/http/SchedulerzRole.java b/src/main/java/com/twitter/aurora/scheduler/http/SchedulerzRole.java
index 1dd20d7..756c672 100644
--- a/src/main/java/com/twitter/aurora/scheduler/http/SchedulerzRole.java
+++ b/src/main/java/com/twitter/aurora/scheduler/http/SchedulerzRole.java
@@ -49,9 +49,9 @@ import com.google.common.collect.Sets;
 
 import org.antlr.stringtemplate.StringTemplate;
 
-import com.twitter.aurora.gen.Constants;
 import com.twitter.aurora.gen.CronCollisionPolicy;
 import com.twitter.aurora.gen.ScheduleStatus;
+import com.twitter.aurora.gen.apiConstants;
 import com.twitter.aurora.scheduler.base.JobKeys;
 import com.twitter.aurora.scheduler.base.Query;
 import com.twitter.aurora.scheduler.base.Tasks;
@@ -82,8 +82,8 @@ import static com.twitter.common.base.MorePreconditions.checkNotBlank;
 public class SchedulerzRole extends JerseyTemplateServlet {
 
   private static final List<ScheduleStatus> STATUSES = ImmutableList.<ScheduleStatus>builder()
-      .addAll(Constants.TERMINAL_STATES)
-      .addAll(Constants.ACTIVE_STATES)
+      .addAll(apiConstants.TERMINAL_STATES)
+      .addAll(apiConstants.ACTIVE_STATES)
       .build();
 
   // The freshest task is the latest active task

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/storage/log/Entries.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/log/Entries.java b/src/main/java/com/twitter/aurora/scheduler/storage/log/Entries.java
index 108f728..74e8c07 100644
--- a/src/main/java/com/twitter/aurora/scheduler/storage/log/Entries.java
+++ b/src/main/java/com/twitter/aurora/scheduler/storage/log/Entries.java
@@ -99,7 +99,7 @@ final class Entries {
     Preconditions.checkArgument(entry.isSet(_Fields.DEFLATED_ENTRY));
 
     ByteArrayOutputStream inflated = new ByteArrayOutputStream();
-    ByteBuffer data = entry.getDeflatedEntry();
+    ByteBuffer data = entry.bufferForDeflatedEntry();
     LOG.info("Inflating deflated log entry of size " + data.remaining());
     InflaterInputStream inflater = new InflaterInputStream(
         new ByteArrayInputStream(data.array(), data.position(), data.remaining()));

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/storage/log/LogManager.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/log/LogManager.java b/src/main/java/com/twitter/aurora/scheduler/storage/log/LogManager.java
index 22a2e42..da29401 100644
--- a/src/main/java/com/twitter/aurora/scheduler/storage/log/LogManager.java
+++ b/src/main/java/com/twitter/aurora/scheduler/storage/log/LogManager.java
@@ -44,7 +44,6 @@ import com.google.inject.BindingAnnotation;
 
 import com.twitter.aurora.codec.ThriftBinaryCodec.CodingException;
 import com.twitter.aurora.gen.ScheduledTask;
-import com.twitter.aurora.gen.storage.Constants;
 import com.twitter.aurora.gen.storage.Frame;
 import com.twitter.aurora.gen.storage.FrameChunk;
 import com.twitter.aurora.gen.storage.FrameHeader;
@@ -56,6 +55,7 @@ import com.twitter.aurora.gen.storage.SaveHostAttributes;
 import com.twitter.aurora.gen.storage.SaveTasks;
 import com.twitter.aurora.gen.storage.Snapshot;
 import com.twitter.aurora.gen.storage.Transaction;
+import com.twitter.aurora.gen.storage.storageConstants;
 import com.twitter.aurora.scheduler.log.Log;
 import com.twitter.aurora.scheduler.log.Log.Entry;
 import com.twitter.aurora.scheduler.log.Log.Position;
@@ -384,7 +384,7 @@ public final class LogManager {
      */
     final class StreamTransaction {
       private final Transaction transaction =
-          new Transaction().setSchemaVersion(Constants.CURRENT_SCHEMA_VERSION);
+          new Transaction().setSchemaVersion(storageConstants.CURRENT_SCHEMA_VERSION);
       private final AtomicBoolean committed = new AtomicBoolean(false);
 
       private StreamTransaction() {

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/storage/log/SnapshotStoreImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/log/SnapshotStoreImpl.java
b/src/main/java/com/twitter/aurora/scheduler/storage/log/SnapshotStoreImpl.java
index 1b449b6..df6b899 100644
--- a/src/main/java/com/twitter/aurora/scheduler/storage/log/SnapshotStoreImpl.java
+++ b/src/main/java/com/twitter/aurora/scheduler/storage/log/SnapshotStoreImpl.java
@@ -48,7 +48,7 @@ import com.twitter.common.util.Clock;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
-import static com.twitter.aurora.gen.Constants.CURRENT_API_VERSION;
+import static com.twitter.aurora.gen.apiConstants.CURRENT_API_VERSION;
 
 /**
  * Snapshot store implementation that delegates to underlying snapshot stores by

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/storage/log/testing/LogOpMatcher.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/log/testing/LogOpMatcher.java
b/src/main/java/com/twitter/aurora/scheduler/storage/log/testing/LogOpMatcher.java
index 66e9373..a4c0126 100644
--- a/src/main/java/com/twitter/aurora/scheduler/storage/log/testing/LogOpMatcher.java
+++ b/src/main/java/com/twitter/aurora/scheduler/storage/log/testing/LogOpMatcher.java
@@ -24,11 +24,11 @@ import org.easymock.IExpectationSetters;
 
 import com.twitter.aurora.codec.ThriftBinaryCodec;
 import com.twitter.aurora.codec.ThriftBinaryCodec.CodingException;
-import com.twitter.aurora.gen.storage.Constants;
 import com.twitter.aurora.gen.storage.LogEntry;
 import com.twitter.aurora.gen.storage.Op;
 import com.twitter.aurora.gen.storage.Snapshot;
 import com.twitter.aurora.gen.storage.Transaction;
+import com.twitter.aurora.gen.storage.storageConstants;
 import com.twitter.aurora.scheduler.log.Log.Position;
 import com.twitter.aurora.scheduler.log.Log.Stream;
 
@@ -84,7 +84,7 @@ public class LogOpMatcher implements IArgumentMatcher {
      */
     public IExpectationSetters<Position> expectTransaction(Op...ops) {
       LogEntry entry = LogEntry.transaction(
-          new Transaction(ImmutableList.copyOf(ops), Constants.CURRENT_SCHEMA_VERSION));
+          new Transaction(ImmutableList.copyOf(ops), storageConstants.CURRENT_SCHEMA_VERSION));
       return expect(stream.append(sameEntry(entry)));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerAPIServlet.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerAPIServlet.java b/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerAPIServlet.java
index 83dbf26..2acf5c8 100644
--- a/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerAPIServlet.java
+++ b/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerAPIServlet.java
@@ -14,6 +14,6 @@ class SchedulerAPIServlet extends TServlet {
 
   @Inject
   SchedulerAPIServlet(AuroraAdmin.Iface schedulerThriftInterface) {
-    super(new AuroraAdmin.Processor(schedulerThriftInterface), new TJSONProtocol.Factory());
+    super(new AuroraAdmin.Processor<>(schedulerThriftInterface), new TJSONProtocol.Factory());
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterface.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterface.java
b/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterface.java
index 5237a6e..b8ba3f2 100644
--- a/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterface.java
+++ b/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterface.java
@@ -123,11 +123,11 @@ import com.twitter.common.util.BackoffHelper;
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import static com.twitter.aurora.auth.SessionValidator.SessionContext;
-import static com.twitter.aurora.gen.Constants.CURRENT_API_VERSION;
 import static com.twitter.aurora.gen.ResponseCode.AUTH_FAILED;
 import static com.twitter.aurora.gen.ResponseCode.ERROR;
 import static com.twitter.aurora.gen.ResponseCode.INVALID_REQUEST;
 import static com.twitter.aurora.gen.ResponseCode.OK;
+import static com.twitter.aurora.gen.apiConstants.CURRENT_API_VERSION;
 import static com.twitter.common.base.MorePreconditions.checkNotBlank;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftServer.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftServer.java
b/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftServer.java
deleted file mode 100644
index 2538254..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftServer.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.twitter.aurora.scheduler.thrift;
-
-import com.twitter.common.thrift.ThriftServer;
-
-/**
- * Thin implementation of ThriftServer.
- */
-class SchedulerThriftServer extends ThriftServer {
-
-  SchedulerThriftServer() {
-    super("TwitterMesosScheduler", "1");
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftModule.java b/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftModule.java
index a1ec633..cca9053 100644
--- a/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftModule.java
+++ b/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftModule.java
@@ -23,7 +23,6 @@ import com.twitter.aurora.gen.AuroraAdmin;
 import com.twitter.aurora.scheduler.thrift.aop.AopModule;
 import com.twitter.common.application.http.Registration;
 import com.twitter.common.application.modules.LifecycleModule;
-import com.twitter.common.thrift.ThriftServer;
 
 /**
  * Binding module to configure a thrift server.
@@ -33,7 +32,7 @@ public class ThriftModule extends AbstractModule {
   @Override
   protected void configure() {
     bind(AuroraAdmin.Iface.class).to(SchedulerThriftInterface.class);
-    bind(ThriftServer.class).to(SchedulerThriftServer.class).in(Singleton.class);
+    bind(ThriftServer.class).in(Singleton.class);
     LifecycleModule.bindServiceRunner(binder(), ThriftServerLauncher.class);
 
     Registration.registerServlet(binder(), "/api", SchedulerAPIServlet.class, true);

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftServer.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftServer.java b/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftServer.java
new file mode 100644
index 0000000..7b9abd1
--- /dev/null
+++ b/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftServer.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2013 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.twitter.aurora.scheduler.thrift;
+
+import java.net.ServerSocket;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.google.common.base.Preconditions;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+
+import org.apache.thrift.TProcessor;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.server.TServer;
+import org.apache.thrift.server.TThreadPoolServer;
+import org.apache.thrift.transport.TServerSocket;
+
+import com.twitter.thrift.Status;
+
+class ThriftServer {
+  private static final Logger LOG = Logger.getLogger(ThriftServer.class.getName());
+
+  private TServer server = null;
+
+  // Current health status of the server.
+  private Status status = Status.STARTING;
+
+  /**
+   * Starts the server.
+   * This may be called at any point except when the server is already alive.  That is, it's
+   * allowable to start, stop, and re-start the server.
+   *
+   * @param socket The socket to use.
+   * @param processor The processor to handle requests.
+   */
+  public synchronized void start(ServerSocket socket, TProcessor processor) {
+    Preconditions.checkNotNull(socket);
+    Preconditions.checkNotNull(processor);
+    Preconditions.checkState(status != Status.ALIVE, "Server must only be started once.");
+    setStatus(Status.ALIVE);
+    TThreadPoolServer.Args args = new TThreadPoolServer.Args(new TServerSocket(socket))
+        .processor(processor)
+        .protocolFactory(new TBinaryProtocol.Factory(false, true));
+
+    final TServer starting = new TThreadPoolServer(args);
+    server = starting;
+    LOG.info("Starting thrift server on port " + socket.getLocalPort());
+
+    Thread listeningThread = new ThreadFactoryBuilder().setDaemon(false).build()
+        .newThread(new Runnable() {
+          @Override public void run() {
+            try {
+              starting.serve();
+            } catch (Throwable t) {
+              LOG.log(Level.WARNING,
+                  "Uncaught exception while attempting to handle service requests: " + t,
t);
+              setStatus(Status.DEAD);
+            }
+          }
+    });
+
+    listeningThread.start();
+  }
+
+  private synchronized void setStatus(Status status) {
+    LOG.info("Moving from status " + this.status + " to " + status);
+    this.status = status;
+  }
+
+  /**
+   * Attempts to shut down the server.
+   * The server may be shut down at any time, though the request will be ignored if the server
is
+   * already stopped.
+   */
+  public synchronized void shutdown() {
+    if (status == Status.STOPPED) {
+      LOG.info("Server already stopped, shutdown request ignored.");
+      return;
+    }
+
+    LOG.info("Received shutdown request, stopping server.");
+    setStatus(Status.STOPPING);
+
+    // TODO(William Farner): Figure out what happens to queued / in-process requests when
the server
+    // is stopped.  Might want to allow a sleep period for the active requests to be completed.
+
+    if (server != null) {
+      server.stop();
+    }
+
+    server = null;
+    setStatus(Status.STOPPED);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftServerLauncher.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftServerLauncher.java b/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftServerLauncher.java
index 500508a..6743060 100644
--- a/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftServerLauncher.java
+++ b/src/main/java/com/twitter/aurora/scheduler/thrift/ThriftServerLauncher.java
@@ -35,8 +35,6 @@ import com.twitter.aurora.gen.AuroraAdmin.Iface;
 import com.twitter.common.application.modules.LifecycleModule.ServiceRunner;
 import com.twitter.common.application.modules.LocalServiceRegistry.LocalService;
 import com.twitter.common.base.Command;
-import com.twitter.common.thrift.ThriftServer;
-import com.twitter.common.thrift.ThriftServer.ServerSetup;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
@@ -69,12 +67,10 @@ class ThriftServerLauncher implements ServiceRunner {
 
   @Override
   public LocalService launch() {
-    ServerSetup setup = new ServerSetup(
-        0,  // TODO(John Sirois): unused, fix ServerSetup constructors
-        new AuroraAdmin.Processor(schedulerThriftInterface),
-        ThriftServer.BINARY_PROTOCOL.get());
-    setup.setSocket(getServerSocket());
-    schedulerThriftServer.start(setup);
+    ServerSocket socket = getServerSocket();
+    schedulerThriftServer.start(
+        socket,
+        new AuroraAdmin.Processor<>(schedulerThriftInterface));
 
     Command shutdown = new Command() {
       @Override public void execute() {
@@ -83,7 +79,7 @@ class ThriftServerLauncher implements ServiceRunner {
       }
     };
 
-    return LocalService.primaryService(schedulerThriftServer.getListeningPort(), shutdown);
+    return LocalService.primaryService(socket.getLocalPort(), shutdown);
   }
 
   private ServerSocket getServerSocket() {

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/main/java/com/twitter/aurora/scheduler/thrift/aop/APIVersionInterceptor.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/thrift/aop/APIVersionInterceptor.java
b/src/main/java/com/twitter/aurora/scheduler/thrift/aop/APIVersionInterceptor.java
index f0fdf47..d66a2b2 100644
--- a/src/main/java/com/twitter/aurora/scheduler/thrift/aop/APIVersionInterceptor.java
+++ b/src/main/java/com/twitter/aurora/scheduler/thrift/aop/APIVersionInterceptor.java
@@ -5,7 +5,7 @@ import org.aopalliance.intercept.MethodInvocation;
 
 import com.twitter.aurora.gen.Response;
 
-import static com.twitter.aurora.gen.Constants.CURRENT_API_VERSION;
+import static com.twitter.aurora.gen.apiConstants.CURRENT_API_VERSION;
 
 class APIVersionInterceptor implements MethodInterceptor {
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/test/java/com/twitter/aurora/scheduler/app/SchedulerIT.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/app/SchedulerIT.java b/src/test/java/com/twitter/aurora/scheduler/app/SchedulerIT.java
index 98085d5..4c381b9 100644
--- a/src/test/java/com/twitter/aurora/scheduler/app/SchedulerIT.java
+++ b/src/test/java/com/twitter/aurora/scheduler/app/SchedulerIT.java
@@ -63,13 +63,13 @@ import com.twitter.aurora.gen.ScheduleStatus;
 import com.twitter.aurora.gen.ScheduledTask;
 import com.twitter.aurora.gen.TaskConfig;
 import com.twitter.aurora.gen.TaskEvent;
-import com.twitter.aurora.gen.storage.Constants;
 import com.twitter.aurora.gen.storage.LogEntry;
 import com.twitter.aurora.gen.storage.Op;
 import com.twitter.aurora.gen.storage.SaveFrameworkId;
 import com.twitter.aurora.gen.storage.SaveTasks;
 import com.twitter.aurora.gen.storage.Snapshot;
 import com.twitter.aurora.gen.storage.Transaction;
+import com.twitter.aurora.gen.storage.storageConstants;
 import com.twitter.aurora.scheduler.DriverFactory;
 import com.twitter.aurora.scheduler.MesosTaskFactory.ExecutorConfig;
 import com.twitter.aurora.scheduler.SchedulerLifecycle.ShutdownOnDriverExit;
@@ -316,7 +316,7 @@ public class SchedulerIT extends BaseZooKeeperTest {
         LogEntry.snapshot(new Snapshot().setTasks(ImmutableSet.of(snapshotTask))),
         LogEntry.transaction(new Transaction(
             ImmutableList.of(Op.saveTasks(new SaveTasks(ImmutableSet.of(transactionTask)))),
-            Constants.CURRENT_SCHEMA_VERSION)));
+            storageConstants.CURRENT_SCHEMA_VERSION)));
 
     expect(log.open()).andReturn(logStream);
     expect(logStream.readAll()).andReturn(recoveredEntries.iterator()).anyTimes();

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/test/java/com/twitter/aurora/scheduler/configuration/ConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/configuration/ConfigurationManagerTest.java
b/src/test/java/com/twitter/aurora/scheduler/configuration/ConfigurationManagerTest.java
index 688d106..ec9c21c 100644
--- a/src/test/java/com/twitter/aurora/scheduler/configuration/ConfigurationManagerTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/configuration/ConfigurationManagerTest.java
@@ -37,9 +37,9 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import static com.twitter.aurora.gen.Constants.DEFAULT_ENVIRONMENT;
-import static com.twitter.aurora.gen.test.Constants.INVALID_IDENTIFIERS;
-import static com.twitter.aurora.gen.test.Constants.VALID_IDENTIFIERS;
+import static com.twitter.aurora.gen.apiConstants.DEFAULT_ENVIRONMENT;
+import static com.twitter.aurora.gen.test.testConstants.INVALID_IDENTIFIERS;
+import static com.twitter.aurora.gen.test.testConstants.VALID_IDENTIFIERS;
 import static com.twitter.aurora.scheduler.configuration.ConfigurationManager.isGoodIdentifier;
 
 // TODO(Sathya): Improve test coverage for this class.

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/test/java/com/twitter/aurora/scheduler/state/CronJobManagerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/state/CronJobManagerTest.java b/src/test/java/com/twitter/aurora/scheduler/state/CronJobManagerTest.java
index 4405cd9..b88ccff 100644
--- a/src/test/java/com/twitter/aurora/scheduler/state/CronJobManagerTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/state/CronJobManagerTest.java
@@ -62,8 +62,8 @@ import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
 import static org.junit.Assert.fail;
 
-import static com.twitter.aurora.gen.Constants.DEFAULT_ENVIRONMENT;
 import static com.twitter.aurora.gen.CronCollisionPolicy.RUN_OVERLAP;
+import static com.twitter.aurora.gen.apiConstants.DEFAULT_ENVIRONMENT;
 
 public class CronJobManagerTest extends EasyMockTest {
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/test/java/com/twitter/aurora/scheduler/state/LockManagerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/state/LockManagerImplTest.java b/src/test/java/com/twitter/aurora/scheduler/state/LockManagerImplTest.java
index 64d9b19..cc6f3b7 100644
--- a/src/test/java/com/twitter/aurora/scheduler/state/LockManagerImplTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/state/LockManagerImplTest.java
@@ -39,7 +39,7 @@ import com.twitter.common.util.testing.FakeClock;
 
 import static org.junit.Assert.assertEquals;
 
-import static com.twitter.aurora.gen.Constants.DEFAULT_ENVIRONMENT;
+import static com.twitter.aurora.gen.apiConstants.DEFAULT_ENVIRONMENT;
 
 public class LockManagerImplTest extends EasyMockTest {
   private static final String USER = "jim-user";

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/test/java/com/twitter/aurora/scheduler/state/StateManagerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/state/StateManagerImplTest.java b/src/test/java/com/twitter/aurora/scheduler/state/StateManagerImplTest.java
index 664ec64..7de377c 100644
--- a/src/test/java/com/twitter/aurora/scheduler/state/StateManagerImplTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/state/StateManagerImplTest.java
@@ -60,13 +60,13 @@ import static org.easymock.EasyMock.expectLastCall;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-import static com.twitter.aurora.gen.Constants.DEFAULT_ENVIRONMENT;
 import static com.twitter.aurora.gen.ScheduleStatus.ASSIGNED;
 import static com.twitter.aurora.gen.ScheduleStatus.INIT;
 import static com.twitter.aurora.gen.ScheduleStatus.KILLING;
 import static com.twitter.aurora.gen.ScheduleStatus.PENDING;
 import static com.twitter.aurora.gen.ScheduleStatus.RUNNING;
 import static com.twitter.aurora.gen.ScheduleStatus.UNKNOWN;
+import static com.twitter.aurora.gen.apiConstants.DEFAULT_ENVIRONMENT;
 
 public class StateManagerImplTest extends EasyMockTest {
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/test/java/com/twitter/aurora/scheduler/storage/backup/RecoveryTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/storage/backup/RecoveryTest.java b/src/test/java/com/twitter/aurora/scheduler/storage/backup/RecoveryTest.java
index e1c913d..ded3a3f 100644
--- a/src/test/java/com/twitter/aurora/scheduler/storage/backup/RecoveryTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/storage/backup/RecoveryTest.java
@@ -58,7 +58,7 @@ import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.expect;
 import static org.junit.Assert.assertEquals;
 
-import static com.twitter.aurora.gen.Constants.CURRENT_API_VERSION;
+import static com.twitter.aurora.gen.apiConstants.CURRENT_API_VERSION;
 
 public class RecoveryTest extends EasyMockTest {
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/test/java/com/twitter/aurora/scheduler/storage/log/LogManagerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/storage/log/LogManagerTest.java b/src/test/java/com/twitter/aurora/scheduler/storage/log/LogManagerTest.java
index c1ce79b..d14fb4b 100644
--- a/src/test/java/com/twitter/aurora/scheduler/storage/log/LogManagerTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/storage/log/LogManagerTest.java
@@ -44,7 +44,6 @@ import com.twitter.aurora.gen.HostAttributes;
 import com.twitter.aurora.gen.ScheduleStatus;
 import com.twitter.aurora.gen.ScheduledTask;
 import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.gen.storage.Constants;
 import com.twitter.aurora.gen.storage.Frame;
 import com.twitter.aurora.gen.storage.FrameChunk;
 import com.twitter.aurora.gen.storage.FrameHeader;
@@ -56,6 +55,7 @@ import com.twitter.aurora.gen.storage.SaveFrameworkId;
 import com.twitter.aurora.gen.storage.SaveTasks;
 import com.twitter.aurora.gen.storage.Snapshot;
 import com.twitter.aurora.gen.storage.Transaction;
+import com.twitter.aurora.gen.storage.storageConstants;
 import com.twitter.aurora.scheduler.base.JobKeys;
 import com.twitter.aurora.scheduler.log.Log;
 import com.twitter.aurora.scheduler.log.Log.Entry;
@@ -537,7 +537,7 @@ public class LogManagerTest extends EasyMockTest {
 
   private LogEntry createLogEntry(Op... ops) {
     return LogEntry.transaction(
-        new Transaction(ImmutableList.copyOf(ops), Constants.CURRENT_SCHEMA_VERSION));
+        new Transaction(ImmutableList.copyOf(ops), storageConstants.CURRENT_SCHEMA_VERSION));
   }
 
   private void expectAppend(Position position, LogEntry logEntry) throws CodingException
{

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/test/java/com/twitter/aurora/scheduler/storage/log/LogStorageTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/storage/log/LogStorageTest.java b/src/test/java/com/twitter/aurora/scheduler/storage/log/LogStorageTest.java
index caedab4..e2d1836 100644
--- a/src/test/java/com/twitter/aurora/scheduler/storage/log/LogStorageTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/storage/log/LogStorageTest.java
@@ -46,7 +46,6 @@ import com.twitter.aurora.gen.Quota;
 import com.twitter.aurora.gen.ScheduleStatus;
 import com.twitter.aurora.gen.ScheduledTask;
 import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.gen.storage.Constants;
 import com.twitter.aurora.gen.storage.LogEntry;
 import com.twitter.aurora.gen.storage.Op;
 import com.twitter.aurora.gen.storage.RemoveJob;
@@ -62,6 +61,7 @@ import com.twitter.aurora.gen.storage.SaveQuota;
 import com.twitter.aurora.gen.storage.SaveTasks;
 import com.twitter.aurora.gen.storage.Snapshot;
 import com.twitter.aurora.gen.storage.Transaction;
+import com.twitter.aurora.gen.storage.storageConstants;
 import com.twitter.aurora.scheduler.base.JobKeys;
 import com.twitter.aurora.scheduler.base.Query;
 import com.twitter.aurora.scheduler.base.Tasks;
@@ -676,7 +676,7 @@ public class LogStorageTest extends EasyMockTest {
 
   private LogEntry createTransaction(Op... ops) {
     return LogEntry.transaction(
-        new Transaction(ImmutableList.copyOf(ops), Constants.CURRENT_SCHEMA_VERSION));
+        new Transaction(ImmutableList.copyOf(ops), storageConstants.CURRENT_SCHEMA_VERSION));
   }
 
   private static IScheduledTask task(String id, ScheduleStatus status) {

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/test/java/com/twitter/aurora/scheduler/storage/log/SnapshotStoreImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/storage/log/SnapshotStoreImplTest.java
b/src/test/java/com/twitter/aurora/scheduler/storage/log/SnapshotStoreImplTest.java
index 85358f1..5062795 100644
--- a/src/test/java/com/twitter/aurora/scheduler/storage/log/SnapshotStoreImplTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/storage/log/SnapshotStoreImplTest.java
@@ -49,7 +49,7 @@ import com.twitter.common.util.testing.FakeClock;
 import static org.easymock.EasyMock.expect;
 import static org.junit.Assert.assertEquals;
 
-import static com.twitter.aurora.gen.Constants.CURRENT_API_VERSION;
+import static com.twitter.aurora.gen.apiConstants.CURRENT_API_VERSION;
 
 public class SnapshotStoreImplTest extends EasyMockTest {
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e7b3da9c/src/test/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
b/src/test/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
index 1f3cd6e..30d3947 100644
--- a/src/test/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
@@ -99,7 +99,6 @@ import static org.junit.Assert.assertTrue;
 
 import static com.twitter.aurora.auth.CapabilityValidator.Capability.ROOT;
 import static com.twitter.aurora.auth.SessionValidator.SessionContext;
-import static com.twitter.aurora.gen.Constants.DEFAULT_ENVIRONMENT;
 import static com.twitter.aurora.gen.LockValidation.CHECKED;
 import static com.twitter.aurora.gen.MaintenanceMode.DRAINING;
 import static com.twitter.aurora.gen.MaintenanceMode.NONE;
@@ -109,6 +108,7 @@ import static com.twitter.aurora.gen.ResponseCode.ERROR;
 import static com.twitter.aurora.gen.ResponseCode.INVALID_REQUEST;
 import static com.twitter.aurora.gen.ResponseCode.OK;
 import static com.twitter.aurora.gen.ResponseCode.WARNING;
+import static com.twitter.aurora.gen.apiConstants.DEFAULT_ENVIRONMENT;
 import static com.twitter.aurora.scheduler.configuration.ConfigurationManager.DEDICATED_ATTRIBUTE;
 import static com.twitter.aurora.scheduler.thrift.SchedulerThriftInterface.transitionMessage;
 


Mime
View raw message