aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject git commit: Part 2 of converting from Packages to Metadata (scheduler)
Date Mon, 07 Apr 2014 17:25:26 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master 1596f6901 -> f6f65bf75


Part 2 of converting from Packages to Metadata (scheduler)

Bugs closed: AURORA-158

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


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

Branch: refs/heads/master
Commit: f6f65bf75e812e800772105d95e2fc00a9580879
Parents: 1596f69
Author: Maxim Khutornenko <maxim@apache.org>
Authored: Mon Apr 7 10:18:31 2014 -0700
Committer: Maxim Khutornenko <maxim@apache.org>
Committed: Mon Apr 7 10:18:31 2014 -0700

----------------------------------------------------------------------
 .../aurora/scheduler/http/TransformationUtils.java   | 15 +--------------
 src/main/thrift/org/apache/aurora/gen/api.thrift     |  1 -
 .../resources/org/apache/aurora/gen/api.thrift.md5   |  2 +-
 3 files changed, 2 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/f6f65bf7/src/main/java/org/apache/aurora/scheduler/http/TransformationUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/http/TransformationUtils.java b/src/main/java/org/apache/aurora/scheduler/http/TransformationUtils.java
index bfd28a0..e99d41c 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/TransformationUtils.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/TransformationUtils.java
@@ -27,21 +27,12 @@ import com.google.common.collect.Range;
 
 import org.apache.aurora.scheduler.base.Numbers;
 import org.apache.aurora.scheduler.storage.entities.IMetadata;
-import org.apache.aurora.scheduler.storage.entities.IPackage;
 import org.apache.aurora.scheduler.storage.entities.ITaskConfig;
 
 /**
  * Utility class to hold common object to string transformation helper functions.
  */
 final class TransformationUtils {
-  public static final Function<IPackage, String> PACKAGE_TOSTRING =
-      new Function<IPackage, String>() {
-        @Override
-        public String apply(IPackage pkg) {
-          return pkg.getRole() + "/" + pkg.getName() + " v" + pkg.getVersion();
-        }
-      };
-
   public static final Function<IMetadata, String> METADATA_TOSTRING =
       new com.twitter.common.base.Function<IMetadata, String>() {
         @Override
@@ -80,11 +71,7 @@ final class TransformationUtils {
    * @return Present if task metadata exists, absent otherwise.
    */
   public static Optional<String> getMetadata(ITaskConfig task) {
-    if (task.isSetPackagesDEPRECATED()) {
-      Iterable<String> packages = ImmutableSet.copyOf(
-          Iterables.transform(task.getPackagesDEPRECATED(), TransformationUtils.PACKAGE_TOSTRING));
-      return Optional.of(Joiner.on(", ").join(Ordering.natural().sortedCopy(packages)));
-    } else if (task.isSetMetadata()) {
+    if (task.isSetMetadata()) {
       Iterable<String> metadata = ImmutableSet.copyOf(
           Iterables.transform(task.getMetadata(), TransformationUtils.METADATA_TOSTRING));
       return Optional.of(Joiner.on(", ").join(Ordering.natural().sortedCopy(metadata)));

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/f6f65bf7/src/main/thrift/org/apache/aurora/gen/api.thrift
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/aurora/gen/api.thrift b/src/main/thrift/org/apache/aurora/gen/api.thrift
index c0618e4..9fb3612 100644
--- a/src/main/thrift/org/apache/aurora/gen/api.thrift
+++ b/src/main/thrift/org/apache/aurora/gen/api.thrift
@@ -175,7 +175,6 @@ struct TaskConfig {
                                              // Wildcards are supported for dynamic link
                                              // crafting based on host, ports, instance,
etc.
  23: optional string contactEmail
- 24: optional set<Package> packagesDEPRECATED // TODO(maxim): Drop when fully migrated
to metadata.
  25: optional ExecutorConfig executorConfig  // Executor configuration
  27: optional set<Metadata> metadata         // Used to display additional details
in the UI.
 }

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/f6f65bf7/src/test/resources/org/apache/aurora/gen/api.thrift.md5
----------------------------------------------------------------------
diff --git a/src/test/resources/org/apache/aurora/gen/api.thrift.md5 b/src/test/resources/org/apache/aurora/gen/api.thrift.md5
index 05c6e8a..2d364ec 100644
--- a/src/test/resources/org/apache/aurora/gen/api.thrift.md5
+++ b/src/test/resources/org/apache/aurora/gen/api.thrift.md5
@@ -1 +1 @@
-f91209ac428266e87dac5430bf46ed10
+6ed227478a903836cc35e2152742f157


Mime
View raw message