You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/02/09 20:00:56 UTC
[1/6] mesos git commit: Updated a comment in the allocator.
Repository: mesos
Updated Branches:
refs/heads/master c53869e24 -> 6b0a304b5
Updated a comment in the allocator.
Revocable resources may come from different sources: usage slack (aka
oversubscribed resources), allocation slack (aka optimistic offers).
We should not use "oversubscribed" and "revocable" interchangeably.
Review: https://reviews.apache.org/r/42633/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d1831a2a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d1831a2a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d1831a2a
Branch: refs/heads/master
Commit: d1831a2ad957d5e64d521774e07182c45de3a2c9
Parents: c53869e
Author: Alexander Rukletsov <ru...@gmail.com>
Authored: Tue Feb 9 18:30:57 2016 +0100
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Tue Feb 9 20:00:41 2016 +0100
----------------------------------------------------------------------
src/master/allocator/mesos/hierarchical.hpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/d1831a2a/src/master/allocator/mesos/hierarchical.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.hpp b/src/master/allocator/mesos/hierarchical.hpp
index 1f0c440..20d7ceb 100644
--- a/src/master/allocator/mesos/hierarchical.hpp
+++ b/src/master/allocator/mesos/hierarchical.hpp
@@ -410,11 +410,11 @@ protected:
// algorithm. Each level has its own sorter and hence may have different
// fairness calculations.
//
- // NOTE: The hierarchical allocator considers oversubscribed
- // resources as regular resources when doing fairness calculations.
+ // NOTE: The hierarchical allocator considers revocable resources as
+ // regular resources when doing fairness calculations.
//
// TODO(vinod): Consider using a different fairness algorithm for
- // oversubscribed resources.
+ // revocable resources.
// A sorter for active roles. This sorter determines the order in which
// roles are allocated resources during Level 1 of the second stage.
[2/6] mesos git commit: Removed extra blank line.
Posted by bm...@apache.org.
Removed extra blank line.
Review: https://reviews.apache.org/r/42911/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/6b0a304b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/6b0a304b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/6b0a304b
Branch: refs/heads/master
Commit: 6b0a304b538ed3f8daac1038f27945720ae9548a
Parents: 45c46f1
Author: Alexander Rukletsov <ru...@gmail.com>
Authored: Tue Feb 9 19:03:12 2016 +0100
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Tue Feb 9 20:00:42 2016 +0100
----------------------------------------------------------------------
src/master/quota.cpp | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/6b0a304b/src/master/quota.cpp
----------------------------------------------------------------------
diff --git a/src/master/quota.cpp b/src/master/quota.cpp
index e7ce0f1..bec6bd9 100644
--- a/src/master/quota.cpp
+++ b/src/master/quota.cpp
@@ -94,7 +94,6 @@ Try<QuotaInfo> createQuotaInfo(const QuotaRequest& request)
Try<QuotaInfo> createQuotaInfo(
const string& role,
const RepeatedPtrField<Resource>& resources)
-
{
QuotaInfo quota;
[3/6] mesos git commit: Restructured comments in allocator tests for
clarity.
Posted by bm...@apache.org.
Restructured comments in allocator tests for clarity.
We now describe the cluster state **after** we induce such a
state, rather than before.
Review: https://reviews.apache.org/r/42658/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c2c41e46
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c2c41e46
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c2c41e46
Branch: refs/heads/master
Commit: c2c41e46358163243e3b4a66bfbccfdbc0302e0c
Parents: d85412e
Author: Alexander Rukletsov <ru...@gmail.com>
Authored: Tue Feb 9 18:37:41 2016 +0100
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Tue Feb 9 20:00:42 2016 +0100
----------------------------------------------------------------------
src/tests/hierarchical_allocator_tests.cpp | 102 +++++++++++-------------
1 file changed, 48 insertions(+), 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/c2c41e46/src/tests/hierarchical_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hierarchical_allocator_tests.cpp b/src/tests/hierarchical_allocator_tests.cpp
index 8183135..f09517d 100644
--- a/src/tests/hierarchical_allocator_tests.cpp
+++ b/src/tests/hierarchical_allocator_tests.cpp
@@ -544,12 +544,6 @@ TEST_F(HierarchicalAllocatorTest, SmallOfferFilterTimeout)
initialize(flags_);
- // We start with the following cluster setup.
- // Total cluster resources (1 agent): cpus=1, mem=512.
- // ROLE1 share = 1 (cpus=1, mem=512)
- // framework1 share = 1 (cpus=1, mem=512)
- // framework2 share = 0
-
FrameworkInfo framework1 = createFrameworkInfo(ROLE);
FrameworkInfo framework2 = createFrameworkInfo(ROLE);
@@ -577,6 +571,11 @@ TEST_F(HierarchicalAllocatorTest, SmallOfferFilterTimeout)
// NOTE: No allocations happen because there are no resources to allocate.
Clock::settle();
+ // Total cluster resources (1 agent): cpus=1, mem=512.
+ // ROLE1 share = 1 (cpus=1, mem=512)
+ // framework1 share = 1 (cpus=1, mem=512)
+ // framework2 share = 0
+
// Add one more agent with some free resources.
SlaveInfo agent2 = createSlaveInfo("cpus:1;mem:512;disk:0");
allocator->addSlave(
@@ -1549,13 +1548,6 @@ TEST_F(HierarchicalAllocatorTest, RemoveQuota)
initialize();
- // We start with the following cluster setup.
- // Total cluster resources (2 identical agents): cpus=2, mem=1024.
- // QUOTA_ROLE share = 1 (cpus=2, mem=1024) [quota: cpus=2, mem=1024]
- // framework1 share = 1
- // NO_QUOTA_ROLE share = 0
- // framework2 share = 0
-
// Create framework and agent descriptions.
FrameworkInfo framework1 = createFrameworkInfo(QUOTA_ROLE);
FrameworkInfo framework2 = createFrameworkInfo(NO_QUOTA_ROLE);
@@ -1592,6 +1584,12 @@ TEST_F(HierarchicalAllocatorTest, RemoveQuota)
agent2.resources(),
{std::make_pair(framework1.id(), agent2.resources())});
+ // Total cluster resources (2 identical agents): cpus=2, mem=1024.
+ // QUOTA_ROLE share = 1 (cpus=2, mem=1024) [quota: cpus=2, mem=1024]
+ // framework1 share = 1
+ // NO_QUOTA_ROLE share = 0
+ // framework2 share = 0
+
// All cluster resources are now being used by `framework1` as part of
// its role quota, no further allocations are expected. However, once the
// quota is removed, quota guarantee does not apply any more and released
@@ -1820,13 +1818,6 @@ TEST_F(HierarchicalAllocatorTest, DRFWithQuota)
initialize();
- // We start with the following cluster setup.
- // Total cluster resources (1 agent): cpus=1, mem=512.
- // QUOTA_ROLE share = 0.25 (cpus=0.25, mem=128) [quota: cpus=0.25, mem=128]
- // framework1 share = 1
- // NO_QUOTA_ROLE share = 0
- // framework2 share = 0
-
// Create framework and agent descriptions.
FrameworkInfo framework1 = createFrameworkInfo(QUOTA_ROLE);
FrameworkInfo framework2 = createFrameworkInfo(NO_QUOTA_ROLE);
@@ -1860,6 +1851,12 @@ TEST_F(HierarchicalAllocatorTest, DRFWithQuota)
agent1.resources(),
{std::make_pair(framework1.id(), Resources(quota1.info.guarantee()))});
+ // Total cluster resources (1 agent): cpus=1, mem=512.
+ // QUOTA_ROLE share = 0.25 (cpus=0.25, mem=128) [quota: cpus=0.25, mem=128]
+ // framework1 share = 1
+ // NO_QUOTA_ROLE share = 0
+ // framework2 share = 0
+
// Some resources on `agent1` are now being used by `framework1` as part
// of its role quota. All quotas are satisfied, all available resources
// should be allocated according to fair shares of roles and frameworks.
@@ -1918,13 +1915,6 @@ TEST_F(HierarchicalAllocatorTest, QuotaAgainstStarvation)
initialize();
- // We start with the following cluster setup.
- // Total cluster resources (2 identical agents): cpus=2, mem=1024.
- // QUOTA_ROLE share = 0.5 (cpus=1, mem=512)
- // framework1 share = 1
- // NO_QUOTA_ROLE share = 0
- // framework2 share = 0
-
// Create framework and agent descriptions.
FrameworkInfo framework1 = createFrameworkInfo(QUOTA_ROLE);
FrameworkInfo framework2 = createFrameworkInfo(NO_QUOTA_ROLE);
@@ -1955,6 +1945,12 @@ TEST_F(HierarchicalAllocatorTest, QuotaAgainstStarvation)
// NOTE: No allocations happen because all resources are already allocated.
Clock::settle();
+ // Total cluster resources (1 agent): cpus=1, mem=512.
+ // QUOTA_ROLE share = 1 (cpus=1, mem=512)
+ // framework1 share = 1
+ // NO_QUOTA_ROLE share = 0
+ // framework2 share = 0
+
allocator->addSlave(
agent2.id(),
agent2,
@@ -2047,13 +2043,6 @@ TEST_F(HierarchicalAllocatorTest, QuotaAbsentFramework)
initialize();
- // We start with the following cluster setup.
- // Total cluster resources (2 agents): cpus=3, mem=1536.
- // QUOTA_ROLE share = 0 [quota: cpus=2, mem=1024]
- // no frameworks
- // NO_QUOTA_ROLE share = 0
- // framework share = 1
-
// Set quota for the quota'ed role. This role isn't registered with
// the allocator yet.
const Quota quota1 = createQuota(QUOTA_ROLE, "cpus:2;mem:1024");
@@ -2072,6 +2061,12 @@ TEST_F(HierarchicalAllocatorTest, QuotaAbsentFramework)
SlaveInfo agent1 = createSlaveInfo("cpus:2;mem:1024;disk:0");
SlaveInfo agent2 = createSlaveInfo("cpus:1;mem:512;disk:0");
+ // Total cluster resources (0 agents): 0.
+ // QUOTA_ROLE share = 0 [quota: cpus=2, mem=1024]
+ // no frameworks
+ // NO_QUOTA_ROLE share = 0
+ // framework share = 0
+
// Each `addSlave()` triggers an event-based allocation.
//
// NOTE: The second event-based allocation for `agent2` takes into account
@@ -2080,13 +2075,6 @@ TEST_F(HierarchicalAllocatorTest, QuotaAbsentFramework)
allocator->addSlave(agent1.id(), agent1, None(), agent1.resources(), EMPTY);
allocator->addSlave(agent2.id(), agent2, None(), agent2.resources(), EMPTY);
- // Total cluster resources (2 agents): cpus=3, mem=1536.
- // QUOTA_ROLE share = 0 [quota: cpus=2, mem=1024], but
- // some resources (cpus=2, mem=1024) are laid away
- // no frameworks
- // NO_QUOTA_ROLE share = 0.33
- // framework share = 1 (cpus=1, mem=512)
-
// `framework` can only be allocated resources on `agent2`. This
// is due to the coarse-grained nature of the allocations. All the
// free resources on `agent1` would be considered to construct an
@@ -2101,6 +2089,13 @@ TEST_F(HierarchicalAllocatorTest, QuotaAbsentFramework)
AWAIT_READY(allocation);
EXPECT_EQ(framework.id(), allocation.get().frameworkId);
EXPECT_EQ(agent2.resources(), Resources::sum(allocation.get().resources));
+
+ // Total cluster resources (2 agents): cpus=3, mem=1536.
+ // QUOTA_ROLE share = 0 [quota: cpus=2, mem=1024], but
+ // (cpus=2, mem=1024) are laid away
+ // no frameworks
+ // NO_QUOTA_ROLE share = 0.33
+ // framework share = 1 (cpus=1, mem=512)
}
@@ -2171,13 +2166,6 @@ TEST_F(HierarchicalAllocatorTest, MultiQuotaWithFrameworks)
initialize();
- // We start with the following cluster setup.
- // Total cluster resources (2 identical agents): cpus=2, mem=2048.
- // QUOTA_ROLE1 share = 0.5 (cpus=1, mem=1024) [quota: cpus=1, mem=200]
- // framework1 share = 1
- // QUOTA_ROLE2 share = 0.5 (cpus=1, mem=1024) [quota: cpus=2, mem=2000]
- // framework2 share = 1
-
SlaveInfo agent1 = createSlaveInfo("cpus:1;mem:1024;disk:0");
SlaveInfo agent2 = createSlaveInfo("cpus:1;mem:1024;disk:0");
@@ -2217,6 +2205,12 @@ TEST_F(HierarchicalAllocatorTest, MultiQuotaWithFrameworks)
agent2.resources(),
{std::make_pair(framework2.id(), agent2.resources())});
+ // Total cluster resources (2 identical agents): cpus=2, mem=2048.
+ // QUOTA_ROLE1 share = 0.5 (cpus=1, mem=1024) [quota: cpus=1, mem=200]
+ // framework1 share = 1
+ // QUOTA_ROLE2 share = 0.5 (cpus=1, mem=1024) [quota: cpus=2, mem=2000]
+ // framework2 share = 1
+
// Quota for the `QUOTA_ROLE1` role is satisfied, while `QUOTA_ROLE2` is
// under quota. Hence resources of the newly added agent should be offered
// to the framework in `QUOTA_ROLE2`.
@@ -2230,18 +2224,18 @@ TEST_F(HierarchicalAllocatorTest, MultiQuotaWithFrameworks)
agent3.resources(),
EMPTY);
- // Total cluster resources (3 agents): cpus=4, mem=4096.
- // QUOTA_ROLE1 share = 0.25 (cpus=1, mem=1024) [quota: cpus=1, mem=200]
- // framework1 share = 1
- // QUOTA_ROLE2 share = 0.75 (cpus=3, mem=3072) [quota: cpus=2, mem=2000]
- // framework2 share = 1
-
// `framework2` will get all agent3's resources because its role is under
// quota, while other roles' quotas are satisfied.
Future<Allocation> allocation = allocations.get();
AWAIT_READY(allocation);
EXPECT_EQ(framework2.id(), allocation.get().frameworkId);
EXPECT_EQ(agent3.resources(), Resources::sum(allocation.get().resources));
+
+ // Total cluster resources (3 agents): cpus=4, mem=4096.
+ // QUOTA_ROLE1 share = 0.25 (cpus=1, mem=1024) [quota: cpus=1, mem=200]
+ // framework1 share = 1
+ // QUOTA_ROLE2 share = 0.75 (cpus=3, mem=3072) [quota: cpus=2, mem=2000]
+ // framework2 share = 1
}
[6/6] mesos git commit: Corrected a typo in allocator tests.
Posted by bm...@apache.org.
Corrected a typo in allocator tests.
Review: https://reviews.apache.org/r/42657/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d85412ea
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d85412ea
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d85412ea
Branch: refs/heads/master
Commit: d85412ea8b9d70e428ff6645e31198b0855edeab
Parents: 18b5a85
Author: Alexander Rukletsov <ru...@gmail.com>
Authored: Tue Feb 9 18:33:59 2016 +0100
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Tue Feb 9 20:00:42 2016 +0100
----------------------------------------------------------------------
src/tests/hierarchical_allocator_tests.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/d85412ea/src/tests/hierarchical_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hierarchical_allocator_tests.cpp b/src/tests/hierarchical_allocator_tests.cpp
index 60ab7ee..8183135 100644
--- a/src/tests/hierarchical_allocator_tests.cpp
+++ b/src/tests/hierarchical_allocator_tests.cpp
@@ -1413,7 +1413,7 @@ TEST_F(HierarchicalAllocatorTest, Whitelist)
// the quota'ed role declines offers, some resources are laid away for
// the role, so that a greedy framework from a non-quota'ed role cannot
// eat up all free resources.
-TEST_F(HierarchicalAllocatorTest, QuotaProvidesQuarantee)
+TEST_F(HierarchicalAllocatorTest, QuotaProvidesGuarantee)
{
// Pausing the clock is not necessary, but ensures that the test
// doesn't rely on the batch allocation in the allocator, which
[5/6] mesos git commit: Cleaned up a check in the allocator tests.
Posted by bm...@apache.org.
Cleaned up a check in the allocator tests.
Ensure the future for allocation is pending when there should be no
allocations. Reduce the number of allocations triggered in the test.
Review: https://reviews.apache.org/r/42672/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/45c46f19
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/45c46f19
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/45c46f19
Branch: refs/heads/master
Commit: 45c46f19cd5dc77df1141e6b0afdfe17c99facdb
Parents: c2c41e4
Author: Alexander Rukletsov <ru...@gmail.com>
Authored: Tue Feb 9 18:44:14 2016 +0100
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Tue Feb 9 20:00:42 2016 +0100
----------------------------------------------------------------------
src/tests/hierarchical_allocator_tests.cpp | 46 ++++++++++---------------
1 file changed, 19 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/45c46f19/src/tests/hierarchical_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hierarchical_allocator_tests.cpp b/src/tests/hierarchical_allocator_tests.cpp
index f09517d..990f372 100644
--- a/src/tests/hierarchical_allocator_tests.cpp
+++ b/src/tests/hierarchical_allocator_tests.cpp
@@ -1477,17 +1477,19 @@ TEST_F(HierarchicalAllocatorTest, QuotaProvidesGuarantee)
// NO_QUOTA_ROLE share = 0
// framework2 share = 0
- // Now `framework1` declines the second offer and sets a filter for 5
- // seconds. The declined resources should not be offered to `framework2`
- // because by doing so they may not be available to `framework1` when
- // the filter expires.
- Filters filter5s;
- filter5s.set_refuse_seconds(5.);
+ // Now `framework1` declines the second offer and sets a filter for twice
+ // the allocation interval. The declined resources should not be offered
+ // to `framework2` because by doing so they may not be available to
+ // `framework1` when the filter expires.
+ Duration filterTimeout = flags.allocation_interval * 2;
+ Filters offerFilter;
+ offerFilter.set_refuse_seconds(filterTimeout.secs());
+
allocator->recoverResources(
framework1.id(),
agent2.id(),
allocation.get().resources.get(agent2.id()).get(),
- filter5s);
+ offerFilter);
// Total cluster resources: cpus=1, mem=512.
// QUOTA_ROLE share = 0.5 (cpus=1, mem=512) [quota: cpus=2, mem=1024]
@@ -1495,33 +1497,23 @@ TEST_F(HierarchicalAllocatorTest, QuotaProvidesGuarantee)
// NO_QUOTA_ROLE share = 0
// framework2 share = 0
- // Assuming the default batch allocation interval is less than 5 seconds,
- // all batch allocations that happen while the refuse filter is active
- // should yield no new allocations.
- ASSERT_LT(flags.allocation_interval.secs(), filter5s.refuse_seconds());
- Clock::advance(flags.allocation_interval);
+ // Ensure the offer filter timeout is set before advancing the clock.
Clock::settle();
- // TODO(alexr): There is currently no way to check the absence of
- // allocations. The `process::Queue` class does not support any size
- // checking methods. Consider adding `process::Queue::empty()` or
- // refactor the test harness so that we can reason about whether the
- // Hierarchical allocator has assigned expected allocations or not.
- //
- // NOTE: It is hard to capture the absense of an allocation in a
- // general case, because an allocator may be complex enough to postpone
- // decisions beyond its allocation cycle.
-
- // Now advance the clock to make sure the filter is expired and removed.
- Clock::advance(Duration::create(filter5s.refuse_seconds()).get());
+ // Trigger a batch allocation.
+ Clock::advance(flags.allocation_interval);
Clock::settle();
- // Trigger the next batch allocation. It should offer the previously
- // declined resources to the quota'ed role.
+ // There should be no allocation due to the offer filter.
+ allocation = allocations.get();
+ ASSERT_TRUE(allocation.isPending());
+
+ // Ensure the offer filter times out (2x the allocation interval)
+ // and the next batch allocation occurs.
Clock::advance(flags.allocation_interval);
Clock::settle();
- allocation = allocations.get();
+ // Previously declined resources should be offered to the quota'ed role.
AWAIT_READY(allocation);
EXPECT_EQ(framework1.id(), allocation.get().frameworkId);
EXPECT_EQ(agent2.resources(), Resources::sum(allocation.get().resources));
[4/6] mesos git commit: Replaced term "periodic allocation" for
consistency.
Posted by bm...@apache.org.
Replaced term "periodic allocation" for consistency.
Though "periodic allocation" may be a better name, we use
"batch allocation" in the hierarchical allocator and some other
tests. For consistency, rename all occurrences in the code.
Review: https://reviews.apache.org/r/42636/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/18b5a852
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/18b5a852
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/18b5a852
Branch: refs/heads/master
Commit: 18b5a852e0362deb3d091a28c9bfaf5515f28021
Parents: d1831a2
Author: Alexander Rukletsov <ru...@gmail.com>
Authored: Tue Feb 9 18:32:27 2016 +0100
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Tue Feb 9 20:00:42 2016 +0100
----------------------------------------------------------------------
src/tests/hierarchical_allocator_tests.cpp | 50 ++++++++++++-------------
1 file changed, 25 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/18b5a852/src/tests/hierarchical_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hierarchical_allocator_tests.cpp b/src/tests/hierarchical_allocator_tests.cpp
index 0acfc09..60ab7ee 100644
--- a/src/tests/hierarchical_allocator_tests.cpp
+++ b/src/tests/hierarchical_allocator_tests.cpp
@@ -253,7 +253,7 @@ class HierarchicalAllocatorTest : public HierarchicalAllocatorTestBase {};
TEST_F(HierarchicalAllocatorTest, UnreservedDRF)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -377,7 +377,7 @@ TEST_F(HierarchicalAllocatorTest, UnreservedDRF)
TEST_F(HierarchicalAllocatorTest, ReservedDRF)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -680,9 +680,9 @@ TEST_F(HierarchicalAllocatorTest, SmallOfferFilterTimeout)
// properly sent inverse offers after they have accepted or reserved resources.
TEST_F(HierarchicalAllocatorTest, MaintenanceInverseOffers)
{
- // Pausing the clock is not necessary, but ensures that the test doesn't rely
- // on the periodic allocation in the allocator, which would slow down the
- // test.
+ // Pausing the clock is not necessary, but ensures that the test
+ // doesn't rely on the batch allocation in the allocator, which
+ // would slow down the test.
Clock::pause();
initialize();
@@ -977,7 +977,7 @@ TEST_F(HierarchicalAllocatorTest, RecoverResources)
TEST_F(HierarchicalAllocatorTest, Allocatable)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -1201,7 +1201,7 @@ TEST_F(HierarchicalAllocatorTest, UpdateAvailableFail)
// subsequent allocations properly account for that.
TEST_F(HierarchicalAllocatorTest, UpdateSlave)
{
- // Pause clock to disable periodic allocation.
+ // Pause clock to disable batch allocation.
Clock::pause();
initialize();
@@ -1259,7 +1259,7 @@ TEST_F(HierarchicalAllocatorTest, UpdateSlave)
// revocable resources do not get allocated oversubscribed resources.
TEST_F(HierarchicalAllocatorTest, OversubscribedNotAllocated)
{
- // Pause clock to disable periodic allocation.
+ // Pause clock to disable batch allocation.
Clock::pause();
initialize();
@@ -1295,7 +1295,7 @@ TEST_F(HierarchicalAllocatorTest, OversubscribedNotAllocated)
// recovered subsequent allocation properly accounts for that.
TEST_F(HierarchicalAllocatorTest, RecoverOversubscribedResources)
{
- // Pause clock to disable periodic allocation.
+ // Pause clock to disable batch allocation.
Clock::pause();
initialize();
@@ -1416,7 +1416,7 @@ TEST_F(HierarchicalAllocatorTest, Whitelist)
TEST_F(HierarchicalAllocatorTest, QuotaProvidesQuarantee)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -1497,7 +1497,7 @@ TEST_F(HierarchicalAllocatorTest, QuotaProvidesQuarantee)
// framework2 share = 0
// Assuming the default batch allocation interval is less than 5 seconds,
- // all periodic allocations that happen while the refuse filter is active
+ // all batch allocations that happen while the refuse filter is active
// should yield no new allocations.
ASSERT_LT(flags.allocation_interval.secs(), filter5s.refuse_seconds());
Clock::advance(flags.allocation_interval);
@@ -1517,7 +1517,7 @@ TEST_F(HierarchicalAllocatorTest, QuotaProvidesQuarantee)
Clock::advance(Duration::create(filter5s.refuse_seconds()).get());
Clock::settle();
- // Trigger the next periodic allocation. It should offer the previously
+ // Trigger the next batch allocation. It should offer the previously
// declined resources to the quota'ed role.
Clock::advance(flags.allocation_interval);
Clock::settle();
@@ -1540,7 +1540,7 @@ TEST_F(HierarchicalAllocatorTest, QuotaProvidesQuarantee)
TEST_F(HierarchicalAllocatorTest, RemoveQuota)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -1610,7 +1610,7 @@ TEST_F(HierarchicalAllocatorTest, RemoveQuota)
agent1.resources(),
None());
- // Trigger the next periodic allocation.
+ // Trigger the next batch allocation.
Clock::advance(flags.allocation_interval);
Clock::settle();
@@ -1634,7 +1634,7 @@ TEST_F(HierarchicalAllocatorTest, RemoveQuota)
TEST_F(HierarchicalAllocatorTest, MultipleFrameworksInRoleWithQuota)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -1730,7 +1730,7 @@ TEST_F(HierarchicalAllocatorTest, MultipleFrameworksInRoleWithQuota)
agent3.resources(),
filter5s);
- // Trigger the next periodic allocation.
+ // Trigger the next batch allocation.
Clock::advance(flags.allocation_interval);
Clock::settle();
@@ -1755,7 +1755,7 @@ TEST_F(HierarchicalAllocatorTest, MultipleFrameworksInRoleWithQuota)
TEST_F(HierarchicalAllocatorTest, QuotaAllocationGranularity)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -1811,7 +1811,7 @@ TEST_F(HierarchicalAllocatorTest, QuotaAllocationGranularity)
TEST_F(HierarchicalAllocatorTest, DRFWithQuota)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -1909,7 +1909,7 @@ TEST_F(HierarchicalAllocatorTest, DRFWithQuota)
TEST_F(HierarchicalAllocatorTest, QuotaAgainstStarvation)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -1993,7 +1993,7 @@ TEST_F(HierarchicalAllocatorTest, QuotaAgainstStarvation)
// NO_QUOTA_ROLE share = 0
// framework2 share = 0
- // Trigger the next periodic allocation.
+ // Trigger the next batch allocation.
Clock::advance(flags.allocation_interval);
Clock::settle();
@@ -2036,7 +2036,7 @@ TEST_F(HierarchicalAllocatorTest, QuotaAgainstStarvation)
TEST_F(HierarchicalAllocatorTest, QuotaAbsentFramework)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -2115,7 +2115,7 @@ TEST_F(HierarchicalAllocatorTest, QuotaAbsentFramework)
TEST_F(HierarchicalAllocatorTest, MultiQuotaAbsentFrameworks)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -2160,7 +2160,7 @@ TEST_F(HierarchicalAllocatorTest, MultiQuotaAbsentFrameworks)
TEST_F(HierarchicalAllocatorTest, MultiQuotaWithFrameworks)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -2249,7 +2249,7 @@ TEST_F(HierarchicalAllocatorTest, MultiQuotaWithFrameworks)
TEST_F(HierarchicalAllocatorTest, ReservationWithinQuota)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();
@@ -2325,7 +2325,7 @@ TEST_F(HierarchicalAllocatorTest, ReservationWithinQuota)
TEST_F(HierarchicalAllocatorTest, DeactivateAndReactivateFramework)
{
// Pausing the clock is not necessary, but ensures that the test
- // doesn't rely on the periodic allocation in the allocator, which
+ // doesn't rely on the batch allocation in the allocator, which
// would slow down the test.
Clock::pause();