aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject git commit: Add big job to local test fixture
Date Wed, 28 May 2014 01:14:58 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master 1b6a55e46 -> 3d09a75bd


Add big job to local test fixture

Bugs closed: AURORA-481

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


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

Branch: refs/heads/master
Commit: 3d09a75bd3c8ef0c8a5a8eb10a091c6d7de0fc99
Parents: 1b6a55e
Author: David McLaughlin <david@dmclaughlin.com>
Authored: Tue May 27 18:14:35 2014 -0700
Committer: Maxim Khutornenko <maxim@apache.org>
Committed: Tue May 27 18:14:35 2014 -0700

----------------------------------------------------------------------
 .../local/IsolatedSchedulerModule.java          | 23 ++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/3d09a75b/src/main/java/org/apache/aurora/scheduler/local/IsolatedSchedulerModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/local/IsolatedSchedulerModule.java
b/src/main/java/org/apache/aurora/scheduler/local/IsolatedSchedulerModule.java
index e9d9bc4..2c06e24 100644
--- a/src/main/java/org/apache/aurora/scheduler/local/IsolatedSchedulerModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/local/IsolatedSchedulerModule.java
@@ -61,6 +61,7 @@ import org.apache.aurora.scheduler.events.PubsubEvent.TaskStateChange;
 import org.apache.aurora.scheduler.events.PubsubEventModule;
 import org.apache.aurora.scheduler.local.FakeDriverFactory.FakeSchedulerDriver;
 import org.apache.aurora.scheduler.log.testing.FileLogStreamModule;
+import org.apache.commons.lang.RandomStringUtils;
 import org.apache.mesos.Protos;
 import org.apache.mesos.Protos.Attribute;
 import org.apache.mesos.Protos.FrameworkID;
@@ -197,6 +198,15 @@ public class IsolatedSchedulerModule extends AbstractModule {
             cron.setCronSchedule("* * * * *");
             submitJob(cron);
           }
+
+          JobConfiguration bigService = createJob("bigJob",
+              mesosUser,
+              2000,
+              RandomStringUtils.random(300));
+
+          bigService.getTaskConfig().setProduction(true);
+          bigService.getTaskConfig().setIsService(true);
+          submitJob(bigService);
         }
       });
 
@@ -267,10 +277,19 @@ public class IsolatedSchedulerModule extends AbstractModule {
     }
 
     private JobConfiguration createJob(String jobName, Identity owner) {
+      return createJob(jobName, owner, 5, "opaque");
+    }
+
+    private JobConfiguration createJob(
+        String jobName,
+        Identity owner,
+        int instanceCount,
+        String executorConfig) {
+
       return new JobConfiguration()
           .setKey(JobKeys.from(owner.getRole(), "test", jobName).newBuilder())
           .setOwner(owner)
-          .setInstanceCount(5)
+          .setInstanceCount(instanceCount)
           .setTaskConfig(new TaskConfig()
               .setOwner(owner)
               .setJobName(jobName)
@@ -281,7 +300,7 @@ public class IsolatedSchedulerModule extends AbstractModule {
               .setMetadata(ImmutableSet.of(
                   new Metadata("role", owner.getRole()),
                   new Metadata("package", "15")))
-              .setExecutorConfig(new ExecutorConfig("aurora", "opaque")));
+              .setExecutorConfig(new ExecutorConfig("aurora", executorConfig)));
     }
 
     private void submitJob(JobConfiguration job) {


Mime
View raw message