aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kevi...@apache.org
Subject git commit: Remove unused thrift flags from scheduler
Date Mon, 23 Jun 2014 22:01:48 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master 7f70d4093 -> 45bf9d630


Remove unused thrift flags from scheduler

Testing Done:
./gradlew -Pq build

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


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

Branch: refs/heads/master
Commit: 45bf9d63030092ddf2fc651a8f1c66554c851ee1
Parents: 7f70d40
Author: Kevin Sweeney <kevints@apache.org>
Authored: Mon Jun 23 15:01:30 2014 -0700
Committer: Kevin Sweeney <kevints@apache.org>
Committed: Mon Jun 23 15:01:30 2014 -0700

----------------------------------------------------------------------
 build.gradle                                    |  1 -
 docs/deploying-aurora-scheduler.md              |  6 +--
 examples/scheduler/scheduler-local.sh           |  1 -
 examples/vagrant/upstart/aurora-scheduler.conf  |  1 -
 .../aurora/scheduler/app/SchedulerMain.java     | 29 ---------------
 .../scheduler/thrift/ThriftConfiguration.java   | 39 --------------------
 .../aurora/scheduler/app/SchedulerIT.java       | 18 ---------
 .../aurora/scheduler/thrift/ThriftIT.java       |  1 -
 8 files changed, 2 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/45bf9d63/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 4549400..bcecb43 100644
--- a/build.gradle
+++ b/build.gradle
@@ -470,7 +470,6 @@ run {
     '-thermos_executor_path=/dev/null',
     '-gc_executor_path=/dev/null',
     '-http_port=8081',
-    '-thrift_port=8082',
     '-zk_in_proc=true',
     '-zk_endpoints=localhost:0',
     '-serverset_path=/twitter/service/mesos/local/scheduler',

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/45bf9d63/docs/deploying-aurora-scheduler.md
----------------------------------------------------------------------
diff --git a/docs/deploying-aurora-scheduler.md b/docs/deploying-aurora-scheduler.md
index a6eb4e0..25767fe 100644
--- a/docs/deploying-aurora-scheduler.md
+++ b/docs/deploying-aurora-scheduler.md
@@ -47,7 +47,6 @@ Like Mesos, Aurora uses command-line flags for runtime configuration. As
such th
     # Flags controlling the scheduler.
     AURORA_FLAGS=(
       -http_port=8081
-      -thrift_port=8082
       # Log configuration, etc.
     )
 
@@ -92,8 +91,8 @@ should be set to `2`, and in a cluster of 5 it should be set to `3`.
 
 Network considerations
 ----------------------
-The Aurora scheduler listens on 3 ports - a Thrift port for client RPCs, an admin web UI,
and a
-libprocess (HTTP+Protobuf) port used to communicate with the Mesos master and for the log
+The Aurora scheduler listens on 2 ports - an HTTP port used for client RPCs and a web UI,
+and a libprocess (HTTP+Protobuf) port used to communicate with the Mesos master and for the
log
 replication protocol. These can be left unconfigured (the scheduler publishes all selected
ports
 to ZooKeeper) or explicitly set in the startup script as follows:
 
@@ -101,7 +100,6 @@ to ZooKeeper) or explicitly set in the startup script as follows:
     AURORA_FLAGS=(
       # ...
       -http_port=8081
-      -thrift_port=8082
       # ...
     )
     # ...

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/45bf9d63/examples/scheduler/scheduler-local.sh
----------------------------------------------------------------------
diff --git a/examples/scheduler/scheduler-local.sh b/examples/scheduler/scheduler-local.sh
index eff27ef..7df66f6 100755
--- a/examples/scheduler/scheduler-local.sh
+++ b/examples/scheduler/scheduler-local.sh
@@ -36,7 +36,6 @@ AURORA_FLAGS=(
 
   # Ports to listen on.
   -http_port=8081
-  -thrift_port=8082
 
   -native_log_quorum_size=1
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/45bf9d63/examples/vagrant/upstart/aurora-scheduler.conf
----------------------------------------------------------------------
diff --git a/examples/vagrant/upstart/aurora-scheduler.conf b/examples/vagrant/upstart/aurora-scheduler.conf
index e23678f..05b2f26 100644
--- a/examples/vagrant/upstart/aurora-scheduler.conf
+++ b/examples/vagrant/upstart/aurora-scheduler.conf
@@ -28,7 +28,6 @@ env JAVA_OPTS='-Djava.library.path=/usr/local/lib -Dlog4j.configuration="file://
 exec $DIST_DIR/install/aurora-scheduler/bin/aurora-scheduler \
   -cluster_name=example \
   -http_port=8081 \
-  -thrift_port=8082 \
   -native_log_quorum_size=1 \
   -zk_endpoints=localhost:2181 \
   -mesos_master_address=zk://localhost:2181/mesos/master \

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/45bf9d63/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java b/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
index 321ac3a..6d18695 100644
--- a/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
+++ b/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
@@ -13,15 +13,10 @@
  */
 package org.apache.aurora.scheduler.app;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
 import java.net.InetSocketAddress;
 import java.util.List;
 import java.util.logging.Logger;
 
-import javax.annotation.Nonnegative;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 
@@ -68,7 +63,6 @@ import org.apache.aurora.scheduler.storage.log.LogStorageModule;
 import org.apache.aurora.scheduler.storage.log.SnapshotStoreImpl;
 import org.apache.aurora.scheduler.storage.mem.MemStorage.Delegated;
 import org.apache.aurora.scheduler.storage.mem.MemStorageModule;
-import org.apache.aurora.scheduler.thrift.ThriftConfiguration;
 import org.apache.aurora.scheduler.thrift.ThriftModule;
 import org.apache.aurora.scheduler.thrift.auth.ThriftAuthModule;
 
@@ -92,14 +86,6 @@ public class SchedulerMain extends AbstractApplication {
   @CmdLine(name = "serverset_path", help = "ZooKeeper ServerSet path to register at.")
   private static final Arg<String> SERVERSET_PATH = Arg.create();
 
-  @CmdLine(name = "mesos_ssl_keyfile",
-      help = "JKS keyfile for operating the Mesos Thrift-over-SSL interface.")
-  private static final Arg<File> MESOS_SSL_KEY_FILE = Arg.create();
-
-  @Nonnegative
-  @CmdLine(name = "thrift_port", help = "Thrift server port.")
-  private static final Arg<Integer> THRIFT_PORT = Arg.create(0);
-
   @NotNull
   @CmdLine(name = "thermos_executor_path", help = "Path to the thermos executor launch script.")
   private static final Arg<String> THERMOS_EXECUTOR_PATH = Arg.create();
@@ -193,21 +179,6 @@ public class SchedulerMain extends AbstractApplication {
     Module configModule = new AbstractModule() {
       @Override
       protected void configure() {
-        bind(ThriftConfiguration.class).toInstance(new ThriftConfiguration() {
-          @Override
-          public Optional<InputStream> getSslKeyStream() throws FileNotFoundException
{
-            if (MESOS_SSL_KEY_FILE.hasAppliedValue()) {
-              return Optional.<InputStream>of(new FileInputStream(MESOS_SSL_KEY_FILE.get()));
-            } else {
-              return Optional.absent();
-            }
-          }
-
-          @Override
-          public int getServingPort() {
-            return THRIFT_PORT.get();
-          }
-        });
         bind(ExecutorConfig.class).toInstance(new ExecutorConfig(THERMOS_EXECUTOR_PATH.get()));
       }
     };

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/45bf9d63/src/main/java/org/apache/aurora/scheduler/thrift/ThriftConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/thrift/ThriftConfiguration.java b/src/main/java/org/apache/aurora/scheduler/thrift/ThriftConfiguration.java
deleted file mode 100644
index 6b28fa6..0000000
--- a/src/main/java/org/apache/aurora/scheduler/thrift/ThriftConfiguration.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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 org.apache.aurora.scheduler.thrift;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import com.google.common.base.Optional;
-
-/**
- * Container for thrift server configuration options.
- */
-public interface ThriftConfiguration {
-  /**
-   * Gets a stream for the thrift socket SSL key if this server is configured to use SSL.
-   *
-   * @return A stream that contains the SSL key data if SSL is enabled, absent otherwise.
-   * @throws IOException If the stream could not be opened.
-   */
-  Optional<? extends InputStream> getSslKeyStream() throws IOException;
-
-  /**
-   * Gets the port that the thrift server should listen on.
-   *
-   * @return Thrift server port.
-   */
-  int getServingPort();
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/45bf9d63/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java b/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
index 5e55551..7178a92 100644
--- a/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
+++ b/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
@@ -14,8 +14,6 @@
 package org.apache.aurora.scheduler.app;
 
 import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
 import java.net.InetSocketAddress;
 import java.util.Arrays;
 import java.util.concurrent.Callable;
@@ -88,7 +86,6 @@ import org.apache.aurora.scheduler.storage.log.LogStorageModule;
 import org.apache.aurora.scheduler.storage.log.SnapshotStoreImpl;
 import org.apache.aurora.scheduler.storage.log.testing.LogOpMatcher;
 import org.apache.aurora.scheduler.storage.log.testing.LogOpMatcher.StreamMatcher;
-import org.apache.aurora.scheduler.thrift.ThriftConfiguration;
 import org.apache.mesos.Protos.FrameworkID;
 import org.apache.mesos.Protos.MasterInfo;
 import org.apache.mesos.Protos.Status;
@@ -172,21 +169,6 @@ public class SchedulerIT extends BaseZooKeeperTest {
       protected void configure() {
         bind(DriverFactory.class).toInstance(driverFactory);
         bind(Log.class).toInstance(log);
-        bind(ThriftConfiguration.class).toInstance(
-            new ThriftConfiguration() {
-              @Override
-              public Optional<? extends InputStream> getSslKeyStream() throws IOException
{
-                return Optional.of(
-                    com.google.common.io.Resources.getResource(getClass(), "AuroraTestKeyStore")
-                        .openStream());
-              }
-
-              @Override
-              public int getServingPort() {
-                return 0;
-              }
-            }
-        );
         bind(ExecutorConfig.class).toInstance(new ExecutorConfig("/executor/thermos"));
         install(new BackupModule(backupDir, SnapshotStoreImpl.class));
       }

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/45bf9d63/src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java b/src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java
index aad18b4..2562ff9 100644
--- a/src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java
+++ b/src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java
@@ -158,7 +158,6 @@ public class ThriftIT extends EasyMockTest {
             bind(Storage.class).toInstance(storageTestUtil.storage);
             bind(NonVolatileStorage.class).toInstance(storageTestUtil.storage);
             bindMock(StorageBackup.class);
-            bindMock(ThriftConfiguration.class);
             bind(QuotaManager.class).toInstance(quotaManager);
             bind(SessionValidator.class).toInstance(validator);
             bind(CapabilityValidator.class).toInstance(new CapabilityValidatorFake(validator));


Mime
View raw message