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 duplicate ExecutorConfig class.
Date Thu, 17 Dec 2015 18:58:06 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 82bb64315 -> 340d60464


Remove duplicate ExecutorConfig class.

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


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

Branch: refs/heads/master
Commit: 340d60464e1c6c9aa13cbe791e9c8b944ac49f0c
Parents: 82bb643
Author: Bill Farner <wfarner@apache.org>
Authored: Thu Dec 17 10:58:03 2015 -0800
Committer: Bill Farner <wfarner@apache.org>
Committed: Thu Dec 17 10:58:03 2015 -0800

----------------------------------------------------------------------
 .../executor/ExecutorSettingsLoader.java        | 46 --------------------
 .../executor/ExecutorSettingsLoaderTest.java    |  1 -
 2 files changed, 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/340d6046/src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettingsLoader.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettingsLoader.java
b/src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettingsLoader.java
index fafd90d..b74edf4 100644
--- a/src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettingsLoader.java
+++ b/src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettingsLoader.java
@@ -16,10 +16,8 @@ package org.apache.aurora.scheduler.configuration.executor;
 
 import java.io.IOException;
 import java.util.List;
-import java.util.Objects;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.base.MoreObjects;
 import com.google.common.base.Optional;
 import com.google.common.collect.ImmutableList;
 import com.google.common.io.CharStreams;
@@ -30,8 +28,6 @@ import org.apache.mesos.Protos.ExecutorID;
 import org.apache.mesos.Protos.ExecutorInfo;
 import org.apache.mesos.Protos.Volume;
 
-import static java.util.Objects.requireNonNull;
-
 import static com.fasterxml.jackson.databind.PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES;
 
 /**
@@ -119,46 +115,4 @@ public final class ExecutorSettingsLoader {
       this.volumeMounts = volumeMounts;
     }
   }
-
-  public static class ExecutorConfig {
-    private final ExecutorInfo executor;
-    private final List<Volume> volumeMounts;
-
-    public ExecutorConfig(ExecutorInfo executor, List<Volume> volumeMounts) {
-      this.executor = requireNonNull(executor);
-      this.volumeMounts = requireNonNull(volumeMounts);
-    }
-
-    public ExecutorInfo getExecutor() {
-      return executor;
-    }
-
-    public List<Volume> getVolumeMounts() {
-      return volumeMounts;
-    }
-
-    @Override
-    public String toString() {
-      return MoreObjects.toStringHelper(this)
-          .add("executor", executor)
-          .add("volumeMounts", volumeMounts)
-          .toString();
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-      if (!(obj instanceof ExecutorConfig)) {
-        return false;
-      }
-
-      ExecutorConfig other = (ExecutorConfig) obj;
-      return Objects.equals(executor, other.executor)
-          && Objects.equals(volumeMounts, other.volumeMounts);
-    }
-
-    @Override
-    public int hashCode() {
-      return Objects.hash(executor, volumeMounts);
-    }
-  }
 }

http://git-wip-us.apache.org/repos/asf/aurora/blob/340d6046/src/test/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettingsLoaderTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettingsLoaderTest.java
b/src/test/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettingsLoaderTest.java
index 90986a5..7de7c46 100644
--- a/src/test/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettingsLoaderTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettingsLoaderTest.java
@@ -19,7 +19,6 @@ import java.io.StringReader;
 import com.google.common.base.Charsets;
 import com.google.common.collect.ImmutableList;
 
-import org.apache.aurora.scheduler.configuration.executor.ExecutorSettingsLoader.ExecutorConfig;
 import org.apache.aurora.scheduler.configuration.executor.ExecutorSettingsLoader.ExecutorConfigException;
 import org.apache.aurora.scheduler.mesos.TestExecutorSettings;
 import org.apache.mesos.Protos.Volume;


Mime
View raw message