You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/07/10 20:49:20 UTC

svn commit: r1359833 - in /incubator/mesos/trunk/src: ./ local/ master/ tests/

Author: benh
Date: Tue Jul 10 18:49:19 2012
New Revision: 1359833

URL: http://svn.apache.org/viewvc?rev=1359833&view=rev
Log:
Renamed SimpleAllocator to DominantShareAllocator (contributed by Thomas Marshall, https://reviews.apache.org/r/5448).

Added:
    incubator/mesos/trunk/src/master/dominant_share_allocator.cpp
      - copied, changed from r1359831, incubator/mesos/trunk/src/master/simple_allocator.cpp
    incubator/mesos/trunk/src/master/dominant_share_allocator.hpp
      - copied, changed from r1359831, incubator/mesos/trunk/src/master/simple_allocator.hpp
Removed:
    incubator/mesos/trunk/src/master/allocator_factory.cpp
    incubator/mesos/trunk/src/master/allocator_factory.hpp
    incubator/mesos/trunk/src/master/simple_allocator.cpp
    incubator/mesos/trunk/src/master/simple_allocator.hpp
Modified:
    incubator/mesos/trunk/src/Makefile.am
    incubator/mesos/trunk/src/local/local.cpp
    incubator/mesos/trunk/src/master/main.cpp
    incubator/mesos/trunk/src/master/master.cpp
    incubator/mesos/trunk/src/master/master.hpp
    incubator/mesos/trunk/src/tests/exception_tests.cpp
    incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp
    incubator/mesos/trunk/src/tests/master_detector_tests.cpp
    incubator/mesos/trunk/src/tests/master_tests.cpp
    incubator/mesos/trunk/src/tests/resource_offers_tests.cpp
    incubator/mesos/trunk/src/tests/slave_tests.cpp

Modified: incubator/mesos/trunk/src/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/Makefile.am?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/Makefile.am (original)
+++ incubator/mesos/trunk/src/Makefile.am Tue Jul 10 18:49:19 2012
@@ -152,9 +152,9 @@ nodist_libmesos_no_third_party_la_SOURCE
 
 libmesos_no_third_party_la_SOURCES = sched/sched.cpp local/local.cpp	\
 	master/master.cpp master/http.cpp master/slaves_manager.cpp	\
-	master/frameworks_manager.cpp master/allocator_factory.cpp	\
-	master/simple_allocator.cpp slave/slave.cpp slave/http.cpp	\
-	slave/isolation_module.cpp					\
+	master/frameworks_manager.cpp					\
+	master/dominant_share_allocator.cpp slave/slave.cpp		\
+	slave/http.cpp slave/isolation_module.cpp			\
 	slave/process_based_isolation_module.cpp slave/reaper.cpp	\
 	launcher/launcher.cpp exec/exec.cpp common/fatal.cpp		\
 	common/lock.cpp detector/detector.cpp				\
@@ -199,12 +199,12 @@ libmesos_no_third_party_la_SOURCES += co
 	configurator/option.hpp detector/detector.hpp			\
 	launcher/launcher.hpp linux/cgroups.hpp linux/fs.hpp		\
 	linux/proc.hpp local/local.hpp master/allocator.hpp		\
-	master/allocator_factory.hpp master/constants.hpp		\
-	master/frameworks_manager.hpp master/http.hpp			\
-	master/master.hpp master/simple_allocator.hpp			\
-	master/slaves_manager.hpp master/webui.hpp			\
-	messages/messages.hpp slave/constants.hpp slave/http.hpp	\
-	slave/isolation_module.hpp slave/isolation_module_factory.hpp	\
+	master/constants.hpp master/frameworks_manager.hpp		\
+	master/http.hpp master/master.hpp				\
+	master/dominant_share_allocator.hpp master/slaves_manager.hpp	\
+	master/webui.hpp messages/messages.hpp slave/constants.hpp	\
+	slave/http.hpp slave/isolation_module.hpp			\
+	slave/isolation_module_factory.hpp				\
 	slave/lxc_isolation_module.hpp					\
 	slave/process_based_isolation_module.hpp slave/reaper.hpp	\
 	slave/slave.hpp slave/solaris_project_isolation_module.hpp	\

Modified: incubator/mesos/trunk/src/local/local.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/local/local.cpp?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/local/local.cpp (original)
+++ incubator/mesos/trunk/src/local/local.cpp Tue Jul 10 18:49:19 2012
@@ -29,8 +29,8 @@
 
 #include "detector/detector.hpp"
 
+#include "master/dominant_share_allocator.hpp"
 #include "master/master.hpp"
-#include "master/simple_allocator.hpp"
 
 #include "slave/process_based_isolation_module.hpp"
 #include "slave/slave.hpp"
@@ -38,8 +38,8 @@
 using namespace mesos::internal;
 
 using mesos::internal::master::Allocator;
+using mesos::internal::master::DominantShareAllocator;
 using mesos::internal::master::Master;
-using mesos::internal::master::SimpleAllocator;
 
 using mesos::internal::slave::Slave;
 using mesos::internal::slave::IsolationModule;
@@ -104,7 +104,7 @@ PID<Master> launch(const Configuration& 
 
   if (_allocator == NULL) {
     // Create default allocator, save it for deleting later.
-    _allocator = allocator = new SimpleAllocator();
+    _allocator = allocator = new DominantShareAllocator();
   } else {
     // TODO(benh): Figure out the behavior of allocator pointer and remove the
     // else block.

Copied: incubator/mesos/trunk/src/master/dominant_share_allocator.cpp (from r1359831, incubator/mesos/trunk/src/master/simple_allocator.cpp)
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/dominant_share_allocator.cpp?p2=incubator/mesos/trunk/src/master/dominant_share_allocator.cpp&p1=incubator/mesos/trunk/src/master/simple_allocator.cpp&r1=1359831&r2=1359833&rev=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/simple_allocator.cpp (original)
+++ incubator/mesos/trunk/src/master/dominant_share_allocator.cpp Tue Jul 10 18:49:19 2012
@@ -22,7 +22,7 @@
 
 #include "common/utils.hpp"
 
-#include "master/simple_allocator.hpp"
+#include "master/dominant_share_allocator.hpp"
 
 using std::max;
 using std::sort;
@@ -33,14 +33,14 @@ namespace mesos {
 namespace internal {
 namespace master {
 
-void SimpleAllocator::initialize(Master* _master)
+void DominantShareAllocator::initialize(Master* _master)
 {
   master = _master;
   initialized = true;
 }
 
 
-void SimpleAllocator::frameworkAdded(Framework* framework)
+void DominantShareAllocator::frameworkAdded(Framework* framework)
 {
   CHECK(initialized);
   LOG(INFO) << "Added framework " << framework->id;
@@ -48,7 +48,7 @@ void SimpleAllocator::frameworkAdded(Fra
 }
 
 
-void SimpleAllocator::frameworkRemoved(Framework* framework)
+void DominantShareAllocator::frameworkRemoved(Framework* framework)
 {
   CHECK(initialized);
 
@@ -62,7 +62,7 @@ void SimpleAllocator::frameworkRemoved(F
 }
 
 
-void SimpleAllocator::slaveAdded(Slave* slave)
+void DominantShareAllocator::slaveAdded(Slave* slave)
 {
   CHECK(initialized);
 
@@ -74,7 +74,7 @@ void SimpleAllocator::slaveAdded(Slave* 
 }
 
 
-void SimpleAllocator::slaveRemoved(Slave* slave)
+void DominantShareAllocator::slaveRemoved(Slave* slave)
 {
   CHECK(initialized);
 
@@ -85,7 +85,7 @@ void SimpleAllocator::slaveRemoved(Slave
 }
 
 
-void SimpleAllocator::resourcesRequested(
+void DominantShareAllocator::resourcesRequested(
     const FrameworkID& frameworkId,
     const vector<Request>& requests)
 {
@@ -95,7 +95,7 @@ void SimpleAllocator::resourcesRequested
 }
 
 
-void SimpleAllocator::resourcesUnused(
+void DominantShareAllocator::resourcesUnused(
     const FrameworkID& frameworkId,
     const SlaveID& slaveId,
     const Resources& resources)
@@ -113,7 +113,7 @@ void SimpleAllocator::resourcesUnused(
 }
 
 
-void SimpleAllocator::resourcesRecovered(
+void DominantShareAllocator::resourcesRecovered(
     const FrameworkID& frameworkId,
     const SlaveID& slaveId,
     const Resources& resources)
@@ -131,7 +131,7 @@ void SimpleAllocator::resourcesRecovered
 }
 
 
-void SimpleAllocator::offersRevived(Framework* framework)
+void DominantShareAllocator::offersRevived(Framework* framework)
 {
   CHECK(initialized);
 
@@ -146,7 +146,7 @@ void SimpleAllocator::offersRevived(Fram
 }
 
 
-void SimpleAllocator::timerTick()
+void DominantShareAllocator::timerTick()
 {
   CHECK(initialized);
   makeNewOffers();
@@ -199,7 +199,7 @@ struct DominantShareComparator
 } // namespace {
 
 
-vector<Framework*> SimpleAllocator::getAllocationOrdering()
+vector<Framework*> DominantShareAllocator::getAllocationOrdering()
 {
   CHECK(initialized) << "Cannot get allocation ordering before initialization!";
   vector<Framework*> frameworks = master->getActiveFrameworks();
@@ -209,7 +209,7 @@ vector<Framework*> SimpleAllocator::getA
 }
 
 
-void SimpleAllocator::makeNewOffers()
+void DominantShareAllocator::makeNewOffers()
 {
   // TODO: Create a method in master so that we don't return the whole list of slaves
   CHECK(initialized) << "Cannot make new offers before initialization!";
@@ -218,7 +218,7 @@ void SimpleAllocator::makeNewOffers()
 }
 
 
-void SimpleAllocator::makeNewOffers(Slave* slave)
+void DominantShareAllocator::makeNewOffers(Slave* slave)
 {
   CHECK(initialized) << "Cannot make new offers before initialization!";
   vector<Slave*> slaves;
@@ -227,7 +227,7 @@ void SimpleAllocator::makeNewOffers(Slav
 }
 
 
-void SimpleAllocator::makeNewOffers(const vector<Slave*>& slaves)
+void DominantShareAllocator::makeNewOffers(const vector<Slave*>& slaves)
 {
   CHECK(initialized) << "Cannot make new offers before initialization!";
   // Get an ordering of frameworks to send offers to

Copied: incubator/mesos/trunk/src/master/dominant_share_allocator.hpp (from r1359831, incubator/mesos/trunk/src/master/simple_allocator.hpp)
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/dominant_share_allocator.hpp?p2=incubator/mesos/trunk/src/master/dominant_share_allocator.hpp&p1=incubator/mesos/trunk/src/master/simple_allocator.hpp&r1=1359831&r2=1359833&rev=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/simple_allocator.hpp (original)
+++ incubator/mesos/trunk/src/master/dominant_share_allocator.hpp Tue Jul 10 18:49:19 2012
@@ -16,8 +16,8 @@
  * limitations under the License.
  */
 
-#ifndef __SIMPLE_ALLOCATOR_HPP__
-#define __SIMPLE_ALLOCATOR_HPP__
+#ifndef __DOMINANT_SHARE_ALLOCATOR_HPP__
+#define __DOMINANT_SHARE_ALLOCATOR_HPP__
 
 #include <vector>
 
@@ -31,12 +31,12 @@ namespace mesos {
 namespace internal {
 namespace master {
 
-class SimpleAllocator : public Allocator
+class DominantShareAllocator : public Allocator
 {
 public:
-  SimpleAllocator(): initialized(false) {}
+  DominantShareAllocator(): initialized(false) {}
 
-  virtual ~SimpleAllocator() {}
+  virtual ~DominantShareAllocator() {}
 
   virtual void initialize(Master* _master);
 
@@ -95,4 +95,4 @@ private:
 } // namespace internal {
 } // namespace mesos {
 
-#endif // __SIMPLE_ALLOCATOR_HPP__
+#endif // __DOMINANT_SHARE_ALLOCATOR_HPP__

Modified: incubator/mesos/trunk/src/master/main.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/main.cpp?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/main.cpp (original)
+++ incubator/mesos/trunk/src/master/main.cpp Tue Jul 10 18:49:19 2012
@@ -26,7 +26,7 @@
 #include "detector/detector.hpp"
 
 #include "master/allocator.hpp"
-#include "master/simple_allocator.hpp"
+#include "master/dominant_share_allocator.hpp"
 #include "master/master.hpp"
 #include "master/webui.hpp"
 
@@ -104,7 +104,7 @@ int main(int argc, char **argv)
   LOG(INFO) << "Build: " << build::DATE << " by " << build::USER;
   LOG(INFO) << "Starting Mesos master";
 
-  Allocator* allocator = new SimpleAllocator();
+  Allocator* allocator = new DominantShareAllocator();
 
   Master* master = new Master(allocator, conf);
   process::spawn(master);

Modified: incubator/mesos/trunk/src/master/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.cpp?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.cpp (original)
+++ incubator/mesos/trunk/src/master/master.cpp Tue Jul 10 18:49:19 2012
@@ -31,7 +31,6 @@
 #include "common/uuid.hpp"
 
 #include "master/allocator.hpp"
-#include "master/allocator_factory.hpp"
 #include "master/master.hpp"
 #include "master/slaves_manager.hpp"
 

Modified: incubator/mesos/trunk/src/master/master.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.hpp?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.hpp (original)
+++ incubator/mesos/trunk/src/master/master.hpp Tue Jul 10 18:49:19 2012
@@ -174,9 +174,7 @@ protected:
   SlaveID newSlaveId();
 
 private:
-
-  // TODO(benh): Remove once SimpleAllocator doesn't use Master::get*.
-  friend class SimpleAllocator;
+  friend class DominantShareAllocator;
   friend struct SlaveRegistrar;
   friend struct SlaveReregistrar;
 

Modified: incubator/mesos/trunk/src/tests/exception_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/exception_tests.cpp?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/exception_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/exception_tests.cpp Tue Jul 10 18:49:19 2012
@@ -26,7 +26,6 @@
 #include "local/local.hpp"
 
 #include "master/master.hpp"
-#include "master/simple_allocator.hpp"
 
 #include "slave/process_based_isolation_module.hpp"
 #include "slave/slave.hpp"
@@ -38,7 +37,6 @@ using namespace mesos::internal;
 using namespace mesos::internal::test;
 
 using mesos::internal::master::Master;
-using mesos::internal::master::SimpleAllocator;
 
 using mesos::internal::slave::Slave;
 

Modified: incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp Tue Jul 10 18:49:19 2012
@@ -29,8 +29,8 @@
 
 #include "local/local.hpp"
 
+#include "master/dominant_share_allocator.hpp"
 #include "master/master.hpp"
-#include "master/simple_allocator.hpp"
 
 #include "slave/process_based_isolation_module.hpp"
 #include "slave/slave.hpp"
@@ -42,7 +42,7 @@ using namespace mesos::internal;
 using namespace mesos::internal::test;
 
 using mesos::internal::master::Master;
-using mesos::internal::master::SimpleAllocator;
+using mesos::internal::master::DominantShareAllocator;
 
 using mesos::internal::slave::ProcessBasedIsolationModule;
 using mesos::internal::slave::Slave;
@@ -70,7 +70,7 @@ TEST(FaultToleranceTest, SlaveLost)
 {
   ASSERT_TRUE(GTEST_IS_THREADSAFE);
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -392,7 +392,7 @@ TEST(FaultToleranceTest, DISABLED_TaskLo
   EXPECT_MESSAGE(filter, _, _, _)
     .WillRepeatedly(Return(false));
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -496,7 +496,7 @@ TEST(FaultToleranceTest, SchedulerFailov
   EXPECT_MESSAGE(filter, _, _, _)
     .WillRepeatedly(Return(false));
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -628,7 +628,7 @@ TEST(FaultToleranceTest, SchedulerFailov
 {
   ASSERT_TRUE(GTEST_IS_THREADSAFE);
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -750,7 +750,7 @@ TEST(FaultToleranceTest, SchedulerExit)
   EXPECT_MESSAGE(filter, _, _, _)
     .WillRepeatedly(Return(false));
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -875,7 +875,7 @@ TEST(FaultToleranceTest, SlaveReliableRe
     .WillOnce(DoAll(Trigger(&slaveRegisteredMsg), Return(true)))
     .WillRepeatedly(Return(false));
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -933,7 +933,7 @@ TEST(FaultToleranceTest, SlaveReregister
   EXPECT_MESSAGE(filter, _, _, _)
     .WillRepeatedly(Return(false));
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 

Modified: incubator/mesos/trunk/src/tests/master_detector_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/master_detector_tests.cpp?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/master_detector_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/master_detector_tests.cpp Tue Jul 10 18:49:19 2012
@@ -30,8 +30,8 @@
 
 #include "detector/detector.hpp"
 
+#include "master/dominant_share_allocator.hpp"
 #include "master/master.hpp"
-#include "master/simple_allocator.hpp"
 
 #include "slave/slave.hpp"
 
@@ -42,7 +42,7 @@ using namespace mesos::internal;
 using namespace mesos::internal::test;
 
 using mesos::internal::master::Master;
-using mesos::internal::master::SimpleAllocator;
+using mesos::internal::master::DominantShareAllocator;
 
 using mesos::internal::slave::Slave;
 
@@ -58,7 +58,7 @@ TEST(MasterDetector, File)
 {
   ASSERT_TRUE(GTEST_IS_THREADSAFE);
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 

Modified: incubator/mesos/trunk/src/tests/master_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/master_tests.cpp?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/master_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/master_tests.cpp Tue Jul 10 18:49:19 2012
@@ -25,9 +25,9 @@
 
 #include "local/local.hpp"
 
+#include "master/dominant_share_allocator.hpp"
 #include "master/frameworks_manager.hpp"
 #include "master/master.hpp"
-#include "master/simple_allocator.hpp"
 
 #include <process/dispatch.hpp>
 #include <process/future.hpp>
@@ -44,7 +44,7 @@ using mesos::internal::master::Framework
 using mesos::internal::master::FrameworksStorage;
 
 using mesos::internal::master::Master;
-using mesos::internal::master::SimpleAllocator;
+using mesos::internal::master::DominantShareAllocator;
 
 using mesos::internal::slave::Slave;
 
@@ -68,7 +68,7 @@ TEST(MasterTest, TaskRunning)
 {
   ASSERT_TRUE(GTEST_IS_THREADSAFE);
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -161,7 +161,7 @@ TEST(MasterTest, KillTask)
 {
   ASSERT_TRUE(GTEST_IS_THREADSAFE);
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -258,7 +258,7 @@ TEST(MasterTest, FrameworkMessage)
 {
   ASSERT_TRUE(GTEST_IS_THREADSAFE);
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -378,7 +378,7 @@ TEST(MasterTest, MultipleExecutors)
 {
   ASSERT_TRUE(GTEST_IS_THREADSAFE);
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -523,7 +523,7 @@ TEST(MasterTest, MasterInfo)
   EXPECT_MESSAGE(filter, _, _, _)
     .WillRepeatedly(Return(false));
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -585,7 +585,7 @@ TEST(MasterTest, MasterInfoOnReElection)
   EXPECT_MESSAGE(filter, _, _, _)
     .WillRepeatedly(Return(false));
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 
@@ -678,7 +678,7 @@ TEST(MasterTest, MasterLost)
   EXPECT_MESSAGE(filter, _, _, _)
     .WillRepeatedly(Return(false));
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 

Modified: incubator/mesos/trunk/src/tests/resource_offers_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/resource_offers_tests.cpp?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/resource_offers_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/resource_offers_tests.cpp Tue Jul 10 18:49:19 2012
@@ -29,8 +29,8 @@
 
 #include "local/local.hpp"
 
+#include "master/dominant_share_allocator.hpp"
 #include "master/master.hpp"
-#include "master/simple_allocator.hpp"
 
 #include "slave/slave.hpp"
 
@@ -41,7 +41,7 @@ using namespace mesos::internal;
 using namespace mesos::internal::test;
 
 using mesos::internal::master::Master;
-using mesos::internal::master::SimpleAllocator;
+using mesos::internal::master::DominantShareAllocator;
 
 using mesos::internal::slave::Slave;
 
@@ -519,7 +519,7 @@ TEST(ResourceOffersTest, TasksExecutorIn
 {
   ASSERT_TRUE(GTEST_IS_THREADSAFE);
 
-  SimpleAllocator a;
+  DominantShareAllocator a;
   Master m(&a);
   PID<Master> master = process::spawn(&m);
 

Modified: incubator/mesos/trunk/src/tests/slave_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/slave_tests.cpp?rev=1359833&r1=1359832&r2=1359833&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/slave_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/slave_tests.cpp Tue Jul 10 18:49:19 2012
@@ -31,7 +31,7 @@
 #include "local/local.hpp"
 
 #include "master/master.hpp"
-#include "master/simple_allocator.hpp"
+#include "master/dominant_share_allocator.hpp"
 
 #include "slave/constants.hpp"
 #include "slave/slave.hpp"
@@ -43,7 +43,7 @@ using namespace mesos::internal;
 using namespace mesos::internal::test;
 
 using mesos::internal::master::Master;
-using mesos::internal::master::SimpleAllocator;
+using mesos::internal::master::DominantShareAllocator;
 
 using mesos::internal::slave::Slave;
 
@@ -80,7 +80,7 @@ protected:
     EXPECT_MESSAGE(filter, _, _, _)
       .WillRepeatedly(Return(false));
 
-    a = new SimpleAllocator();
+    a = new DominantShareAllocator();
     m = new Master(a);
     master = process::spawn(m);
 
@@ -163,7 +163,7 @@ protected:
     launchTask(DEFAULT_EXECUTOR_INFO);
   }
 
-  SimpleAllocator* a;
+  DominantShareAllocator* a;
   Master* m;
   TestingIsolationModule* isolationModule;
   Slave* s;