Updated allocator to only check initialization in exposed methods. Review: https://reviews.apache.org/r/28669
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8a75dd22 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8a75dd22 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8a75dd22 Branch: refs/heads/master Commit: 8a75dd2264f847fcea1a5bd1025d1eacc0d78b63 Parents: f68d6cd Author: Benjamin Mahler <[email protected]> Authored: Wed Dec 3 11:33:26 2014 -0800 Committer: Benjamin Mahler <[email protected]> Committed: Wed Dec 3 15:02:05 2014 -0800 ---------------------------------------------------------------------- src/master/hierarchical_allocator_process.hpp | 8 -------- 1 file changed, 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/8a75dd22/src/master/hierarchical_allocator_process.hpp ---------------------------------------------------------------------- diff --git a/src/master/hierarchical_allocator_process.hpp b/src/master/hierarchical_allocator_process.hpp index ddd42e7..f18346f 100644 --- a/src/master/hierarchical_allocator_process.hpp +++ b/src/master/hierarchical_allocator_process.hpp @@ -628,7 +628,6 @@ template <class RoleSorter, class FrameworkSorter> void HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::batch() { - CHECK(initialized); allocate(); delay(flags.allocation_interval, self(), &Self::batch); } @@ -638,8 +637,6 @@ template <class RoleSorter, class FrameworkSorter> void HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::allocate() { - CHECK(initialized); - Stopwatch stopwatch; stopwatch.start(); @@ -655,8 +652,6 @@ void HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::allocate( const SlaveID& slaveId) { - CHECK(initialized); - hashset<SlaveID> slaveIds; slaveIds.insert(slaveId); @@ -675,8 +670,6 @@ void HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::allocate( const hashset<SlaveID>& slaveIds_) { - CHECK(initialized); - if (roleSorter->count() == 0) { VLOG(1) << "No roles to allocate resources!"; return; @@ -771,7 +764,6 @@ bool HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::isWhitelisted( const SlaveID& slaveId) { - CHECK(initialized); CHECK(slaves.contains(slaveId)); return whitelist.isNone() ||
