Repository: mesos-site Updated Branches: refs/heads/asf-site c29615d96 -> 12e1f594c
Updated the website built from mesos SHA: f26ffce. Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/12e1f594 Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/12e1f594 Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/12e1f594 Branch: refs/heads/asf-site Commit: 12e1f594cd96a93b89a0e3ba50659ae468858ab9 Parents: c29615d Author: jenkins <[email protected]> Authored: Thu Oct 26 19:24:35 2017 +0000 Committer: jenkins <[email protected]> Committed: Thu Oct 26 19:24:35 2017 +0000 ---------------------------------------------------------------------- .../api/latest/c++/drf_2sorter_8hpp_source.html | 221 ++++++++++--------- 1 file changed, 115 insertions(+), 106 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos-site/blob/12e1f594/content/api/latest/c++/drf_2sorter_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/drf_2sorter_8hpp_source.html b/content/api/latest/c++/drf_2sorter_8hpp_source.html index ca609b6..ebcf040 100644 --- a/content/api/latest/c++/drf_2sorter_8hpp_source.html +++ b/content/api/latest/c++/drf_2sorter_8hpp_source.html @@ -400,111 +400,120 @@ <div class="line"><a name="l00346"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a1807f36bd86bb28efa223c5d99861733"> 346</a></span>  <span class="keywordtype">void</span> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a1807f36bd86bb28efa223c5d99861733">subtract</a>(<span class="keyword">const</span> SlaveID& slaveId, <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a>& toRemove)</div> <div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  {</div> <div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  CHECK(<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>.contains(slaveId));</div> -<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  CHECK(<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>.at(slaveId).contains(toRemove));</div> -<div class="line"><a name="l00350"></a><span class="lineno"> 350</span> </div> -<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>[slaveId] -= toRemove;</div> +<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  CHECK(<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>.at(slaveId).contains(toRemove))</div> +<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  << <span class="stringliteral">"Resources "</span> << <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>.at(slaveId) << <span class="stringliteral">" at agent "</span> << slaveId</div> +<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  << <span class="stringliteral">" does not contain "</span> << toRemove;</div> <div class="line"><a name="l00352"></a><span class="lineno"> 352</span> </div> -<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="comment">// Remove shared resources from the allocated quantities when there</span></div> -<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <span class="comment">// are no instances of same resources left in the allocation.</span></div> -<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a> sharedToRemove = toRemove.<a class="code" href="classmesos_1_1Resources.html#a1bf71a3804f142e92e0dd28884ea8f99">shared</a>()</div> -<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  .<a class="code" href="classmesos_1_1Resources.html#a62ae547c0d24fdfb139549e9b8126fdf">filter</a>([<span class="keyword">this</span>, slaveId](<span class="keyword">const</span> Resource& resource) {</div> -<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="keywordflow">return</span> !resources[slaveId].contains(resource);</div> -<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  });</div> -<div class="line"><a name="l00359"></a><span class="lineno"> 359</span> </div> -<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a> quantitiesToRemove =</div> -<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  (toRemove.<a class="code" href="classmesos_1_1Resources.html#a7422a6ffb5e5988b507d587de1aa3e66">nonShared</a>() + sharedToRemove).createStrippedScalarQuantity();</div> -<div class="line"><a name="l00362"></a><span class="lineno"> 362</span> </div> -<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> Resource& resource, quantitiesToRemove) {</div> -<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c">totals</a>[resource.name()] -= resource.scalar();</div> -<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  }</div> -<div class="line"><a name="l00366"></a><span class="lineno"> 366</span> </div> -<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  CHECK(<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a>.<a class="code" href="classmesos_1_1Resources.html#a30fc4fe000da99818bfcee5bb780e5d4">contains</a>(quantitiesToRemove));</div> -<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a> -= quantitiesToRemove;</div> -<div class="line"><a name="l00369"></a><span class="lineno"> 369</span> </div> -<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="keywordflow">if</span> (resources[slaveId].empty()) {</div> -<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  resources.erase(slaveId);</div> -<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  }</div> -<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  }</div> -<div class="line"><a name="l00374"></a><span class="lineno"> 374</span> </div> -<div class="line"><a name="l00375"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a5ec4e37470913f00cb7e60928d1e4157"> 375</a></span>  <span class="keywordtype">void</span> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a5ec4e37470913f00cb7e60928d1e4157">update</a>(</div> -<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  <span class="keyword">const</span> SlaveID& slaveId,</div> -<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a>& oldAllocation,</div> -<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a>& newAllocation)</div> -<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  {</div> -<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a> oldAllocationQuantity =</div> -<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  oldAllocation.<a class="code" href="classmesos_1_1Resources.html#a350c2c74774111e8b961127b7311fecc">createStrippedScalarQuantity</a>();</div> -<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a> newAllocationQuantity =</div> -<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  newAllocation.<a class="code" href="classmesos_1_1Resources.html#a350c2c74774111e8b961127b7311fecc">createStrippedScalarQuantity</a>();</div> -<div class="line"><a name="l00384"></a><span class="lineno"> 384</span> </div> -<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  CHECK(<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>[slaveId].<a class="code" href="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter.html#a358fd6140f1778c7cf12ac723ff8259d">contains</a>(oldAllocation));</div> -<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  CHECK(<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a>.<a class="code" href="classmesos_1_1Resources.html#a30fc4fe000da99818bfcee5bb780e5d4">contains</a>(oldAllocationQuantity));</div> -<div class="line"><a name="l00387"></a><span class="lineno"> 387</span> </div> -<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>[slaveId] -= oldAllocation;</div> -<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  resources[slaveId] += newAllocation;</div> -<div class="line"><a name="l00390"></a><span class="lineno"> 390</span> </div> -<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a> -= oldAllocationQuantity;</div> -<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a> += newAllocationQuantity;</div> +<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>[slaveId] -= toRemove;</div> +<div class="line"><a name="l00354"></a><span class="lineno"> 354</span> </div> +<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <span class="comment">// Remove shared resources from the allocated quantities when there</span></div> +<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  <span class="comment">// are no instances of same resources left in the allocation.</span></div> +<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a> sharedToRemove = toRemove.<a class="code" href="classmesos_1_1Resources.html#a1bf71a3804f142e92e0dd28884ea8f99">shared</a>()</div> +<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  .<a class="code" href="classmesos_1_1Resources.html#a62ae547c0d24fdfb139549e9b8126fdf">filter</a>([<span class="keyword">this</span>, slaveId](<span class="keyword">const</span> Resource& resource) {</div> +<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="keywordflow">return</span> !<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>[slaveId].contains(resource);</div> +<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  });</div> +<div class="line"><a name="l00361"></a><span class="lineno"> 361</span> </div> +<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a> quantitiesToRemove =</div> +<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  (toRemove.nonShared() + sharedToRemove).createStrippedScalarQuantity();</div> +<div class="line"><a name="l00364"></a><span class="lineno"> 364</span> </div> +<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> Resource& resource, quantitiesToRemove) {</div> +<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c">totals</a>[resource.name()] -= resource.scalar();</div> +<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  }</div> +<div class="line"><a name="l00368"></a><span class="lineno"> 368</span> </div> +<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  CHECK(<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a>.<a class="code" href="classmesos_1_1Resources.html#a30fc4fe000da99818bfcee5bb780e5d4">contains</a>(quantitiesToRemove))</div> +<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  << <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a> << <span class="stringliteral">" does not contain "</span> << quantitiesToRemove;</div> +<div class="line"><a name="l00371"></a><span class="lineno"> 371</span> </div> +<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a> -= quantitiesToRemove;</div> +<div class="line"><a name="l00373"></a><span class="lineno"> 373</span> </div> +<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <span class="keywordflow">if</span> (<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>[slaveId].empty()) {</div> +<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>.erase(slaveId);</div> +<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  }</div> +<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  }</div> +<div class="line"><a name="l00378"></a><span class="lineno"> 378</span> </div> +<div class="line"><a name="l00379"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a5ec4e37470913f00cb7e60928d1e4157"> 379</a></span>  <span class="keywordtype">void</span> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a5ec4e37470913f00cb7e60928d1e4157">update</a>(</div> +<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  <span class="keyword">const</span> SlaveID& slaveId,</div> +<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a>& oldAllocation,</div> +<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a>& newAllocation)</div> +<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  {</div> +<div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a> oldAllocationQuantity =</div> +<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  oldAllocation.<a class="code" href="classmesos_1_1Resources.html#a350c2c74774111e8b961127b7311fecc">createStrippedScalarQuantity</a>();</div> +<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <span class="keyword">const</span> <a class="code" href="classmesos_1_1Resources.html">Resources</a> newAllocationQuantity =</div> +<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  newAllocation.<a class="code" href="classmesos_1_1Resources.html#a350c2c74774111e8b961127b7311fecc">createStrippedScalarQuantity</a>();</div> +<div class="line"><a name="l00388"></a><span class="lineno"> 388</span> </div> +<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  CHECK(<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>.contains(slaveId));</div> +<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  CHECK(<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>[slaveId].<a class="code" href="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter.html#a358fd6140f1778c7cf12ac723ff8259d">contains</a>(oldAllocation))</div> +<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  << <span class="stringliteral">"Resources "</span> << <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>[slaveId] << <span class="stringliteral">" at agent "</span> << slaveId</div> +<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  << <span class="stringliteral">" does not contain "</span> << oldAllocation;</div> <div class="line"><a name="l00393"></a><span class="lineno"> 393</span> </div> -<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> Resource& resource, oldAllocationQuantity) {</div> -<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c">totals</a>[resource.name()] -= resource.scalar();</div> -<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  }</div> -<div class="line"><a name="l00397"></a><span class="lineno"> 397</span> </div> -<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> Resource& resource, newAllocationQuantity) {</div> -<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c">totals</a>[resource.name()] += resource.scalar();</div> -<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  }</div> -<div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  }</div> +<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  CHECK(<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a>.<a class="code" href="classmesos_1_1Resources.html#a30fc4fe000da99818bfcee5bb780e5d4">contains</a>(oldAllocationQuantity))</div> +<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  << <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a> << <span class="stringliteral">" does not contain "</span> << oldAllocationQuantity;</div> +<div class="line"><a name="l00396"></a><span class="lineno"> 396</span> </div> +<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>[slaveId] -= oldAllocation;</div> +<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  resources[slaveId] += newAllocation;</div> +<div class="line"><a name="l00399"></a><span class="lineno"> 399</span> </div> +<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a> -= oldAllocationQuantity;</div> +<div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a> += newAllocationQuantity;</div> <div class="line"><a name="l00402"></a><span class="lineno"> 402</span> </div> -<div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  <span class="comment">// We store the number of times this client has been chosen for</span></div> -<div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="comment">// allocation so that we can fairly share the resources across</span></div> -<div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <span class="comment">// clients that have the same share. Note that this information is</span></div> -<div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  <span class="comment">// not persisted across master failovers, but since the point is</span></div> -<div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <span class="comment">// to equalize the `count` across clients of the same `share`</span></div> -<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="comment">// having allocations restart at 0 after a master failover should</span></div> -<div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="comment">// be sufficient (famous last words.)</span></div> -<div class="line"><a name="l00410"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6"> 410</a></span>  uint64_t <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">count</a>;</div> +<div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> Resource& resource, oldAllocationQuantity) {</div> +<div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c">totals</a>[resource.name()] -= resource.scalar();</div> +<div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  }</div> +<div class="line"><a name="l00406"></a><span class="lineno"> 406</span> </div> +<div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> Resource& resource, newAllocationQuantity) {</div> +<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c">totals</a>[resource.name()] += resource.scalar();</div> +<div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  }</div> +<div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  }</div> <div class="line"><a name="l00411"></a><span class="lineno"> 411</span> </div> -<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <span class="comment">// We maintain multiple copies of each shared resource allocated</span></div> -<div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <span class="comment">// to a client, where the number of copies represents the number</span></div> -<div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="comment">// of times this shared resource has been allocated to (and has</span></div> -<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <span class="comment">// not been recovered from) a specific client.</span></div> -<div class="line"><a name="l00416"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32"> 416</a></span>  <a class="code" href="classhashmap.html">hashmap<SlaveID, Resources></a> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>;</div> -<div class="line"><a name="l00417"></a><span class="lineno"> 417</span> </div> -<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="comment">// Similarly, we aggregate scalars across slaves and omit information</span></div> -<div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  <span class="comment">// about dynamic reservations, persistent volumes and sharedness of</span></div> -<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  <span class="comment">// the corresponding resource. See notes above.</span></div> -<div class="line"><a name="l00421"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89"> 421</a></span>  <a class="code" href="classmesos_1_1Resources.html">Resources</a> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a>;</div> -<div class="line"><a name="l00422"></a><span class="lineno"> 422</span> </div> -<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  <span class="comment">// We also store a map version of `scalarQuantities`, mapping</span></div> -<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <span class="comment">// the `Resource::name` to aggregated scalar. This improves the</span></div> -<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <span class="comment">// performance of calculating shares. See MESOS-4694.</span></div> -<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  <span class="comment">//</span></div> -<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="comment">// TODO(bmahler): Ideally we do not store `scalarQuantities`</span></div> -<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <span class="comment">// redundantly here, investigate performance improvements to</span></div> -<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="comment">// `Resources` to make this unnecessary.</span></div> -<div class="line"><a name="l00430"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c"> 430</a></span>  <a class="code" href="classhashmap.html">hashmap<std::string, Value::Scalar></a> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c">totals</a>;</div> -<div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  } <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">allocation</a>;</div> -<div class="line"><a name="l00432"></a><span class="lineno"> 432</span> </div> -<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="comment">// Compares two nodes according to DRF share.</span></div> -<div class="line"><a name="l00434"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3a372c2906a6f9c1bcebd44ab123b16e"> 434</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3a372c2906a6f9c1bcebd44ab123b16e">compareDRF</a>(<span class="keyword">const</span> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html">Node</a>* left, <span class="keyword">const</span> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html">Node</a>* right)</div> -<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  {</div> -<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="keywordflow">if</span> (left-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3df87de6f848909e64aae964fc812f65">share</a> != right-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3df87de6f848909e64aae964fc812f65">share</a>) {</div> -<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  <span class="keywordflow">return</span> left-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3df87de6f848909e64aae964fc812f65">share</a> < right-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3df87de6f848909e64aae964fc812f65">share</a>;</div> -<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  }</div> -<div class="line"><a name="l00439"></a><span class="lineno"> 439</span> </div> -<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <span class="keywordflow">if</span> (left-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">allocation</a>.<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">count</a> != right-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">allocation</a>.<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">count</a>) {</div> -<div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <span class="keywordflow">return</span> left-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">allocation</a>.<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">count</a> < right-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">allocation</a>.<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">count</a>;</div> -<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  }</div> -<div class="line"><a name="l00443"></a><span class="lineno"> 443</span> </div> -<div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  <span class="keywordflow">return</span> left-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#ad5885f8c996c795ef8dc8a00e27f02df">path</a> < right-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#ad5885f8c996c795ef8dc8a00e27f02df">path</a>;</div> -<div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  }</div> -<div class="line"><a name="l00446"></a><span class="lineno"> 446</span> };</div> -<div class="line"><a name="l00447"></a><span class="lineno"> 447</span> </div> -<div class="line"><a name="l00448"></a><span class="lineno"> 448</span> } <span class="comment">// namespace allocator {</span></div> -<div class="line"><a name="l00449"></a><span class="lineno"> 449</span> } <span class="comment">// namespace master {</span></div> -<div class="line"><a name="l00450"></a><span class="lineno"> 450</span> } <span class="comment">// namespace internal {</span></div> -<div class="line"><a name="l00451"></a><span class="lineno"> 451</span> } <span class="comment">// namespace mesos {</span></div> +<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <span class="comment">// We store the number of times this client has been chosen for</span></div> +<div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <span class="comment">// allocation so that we can fairly share the resources across</span></div> +<div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="comment">// clients that have the same share. Note that this information is</span></div> +<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <span class="comment">// not persisted across master failovers, but since the point is</span></div> +<div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <span class="comment">// to equalize the `count` across clients of the same `share`</span></div> +<div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <span class="comment">// having allocations restart at 0 after a master failover should</span></div> +<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="comment">// be sufficient (famous last words.)</span></div> +<div class="line"><a name="l00419"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6"> 419</a></span>  uint64_t <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">count</a>;</div> +<div class="line"><a name="l00420"></a><span class="lineno"> 420</span> </div> +<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  <span class="comment">// We maintain multiple copies of each shared resource allocated</span></div> +<div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  <span class="comment">// to a client, where the number of copies represents the number</span></div> +<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  <span class="comment">// of times this shared resource has been allocated to (and has</span></div> +<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <span class="comment">// not been recovered from) a specific client.</span></div> +<div class="line"><a name="l00425"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32"> 425</a></span>  <a class="code" href="classhashmap.html">hashmap<SlaveID, Resources></a> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">resources</a>;</div> +<div class="line"><a name="l00426"></a><span class="lineno"> 426</span> </div> +<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="comment">// Similarly, we aggregate scalars across slaves and omit information</span></div> +<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <span class="comment">// about dynamic reservations, persistent volumes and sharedness of</span></div> +<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="comment">// the corresponding resource. See notes above.</span></div> +<div class="line"><a name="l00430"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89"> 430</a></span>  <a class="code" href="classmesos_1_1Resources.html">Resources</a> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">scalarQuantities</a>;</div> +<div class="line"><a name="l00431"></a><span class="lineno"> 431</span> </div> +<div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <span class="comment">// We also store a map version of `scalarQuantities`, mapping</span></div> +<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="comment">// the `Resource::name` to aggregated scalar. This improves the</span></div> +<div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  <span class="comment">// performance of calculating shares. See MESOS-4694.</span></div> +<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="comment">//</span></div> +<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="comment">// TODO(bmahler): Ideally we do not store `scalarQuantities`</span></div> +<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  <span class="comment">// redundantly here, investigate performance improvements to</span></div> +<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <span class="comment">// `Resources` to make this unnecessary.</span></div> +<div class="line"><a name="l00439"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c"> 439</a></span>  <a class="code" href="classhashmap.html">hashmap<std::string, Value::Scalar></a> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c">totals</a>;</div> +<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  } <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">allocation</a>;</div> +<div class="line"><a name="l00441"></a><span class="lineno"> 441</span> </div> +<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="comment">// Compares two nodes according to DRF share.</span></div> +<div class="line"><a name="l00443"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3a372c2906a6f9c1bcebd44ab123b16e"> 443</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3a372c2906a6f9c1bcebd44ab123b16e">compareDRF</a>(<span class="keyword">const</span> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html">Node</a>* left, <span class="keyword">const</span> <a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html">Node</a>* right)</div> +<div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  {</div> +<div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <span class="keywordflow">if</span> (left-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3df87de6f848909e64aae964fc812f65">share</a> != right-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3df87de6f848909e64aae964fc812f65">share</a>) {</div> +<div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="keywordflow">return</span> left-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3df87de6f848909e64aae964fc812f65">share</a> < right-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3df87de6f848909e64aae964fc812f65">share</a>;</div> +<div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  }</div> +<div class="line"><a name="l00448"></a><span class="lineno"> 448</span> </div> +<div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  <span class="keywordflow">if</span> (left-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">allocation</a>.<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">count</a> != right-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">allocation</a>.<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">count</a>) {</div> +<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  <span class="keywordflow">return</span> left-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">allocation</a>.<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">count</a> < right-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">allocation</a>.<a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">count</a>;</div> +<div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  }</div> <div class="line"><a name="l00452"></a><span class="lineno"> 452</span> </div> -<div class="line"><a name="l00453"></a><span class="lineno"> 453</span> <span class="preprocessor">#endif // __MASTER_ALLOCATOR_SORTER_DRF_SORTER_HPP__</span></div> +<div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  <span class="keywordflow">return</span> left-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#ad5885f8c996c795ef8dc8a00e27f02df">path</a> < right-><a class="code" href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#ad5885f8c996c795ef8dc8a00e27f02df">path</a>;</div> +<div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  }</div> +<div class="line"><a name="l00455"></a><span class="lineno"> 455</span> };</div> +<div class="line"><a name="l00456"></a><span class="lineno"> 456</span> </div> +<div class="line"><a name="l00457"></a><span class="lineno"> 457</span> } <span class="comment">// namespace allocator {</span></div> +<div class="line"><a name="l00458"></a><span class="lineno"> 458</span> } <span class="comment">// namespace master {</span></div> +<div class="line"><a name="l00459"></a><span class="lineno"> 459</span> } <span class="comment">// namespace internal {</span></div> +<div class="line"><a name="l00460"></a><span class="lineno"> 460</span> } <span class="comment">// namespace mesos {</span></div> +<div class="line"><a name="l00461"></a><span class="lineno"> 461</span> </div> +<div class="line"><a name="l00462"></a><span class="lineno"> 462</span> <span class="preprocessor">#endif // __MASTER_ALLOCATOR_SORTER_DRF_SORTER_HPP__</span></div> <div class="ttc" id="resources_8hpp_html"><div class="ttname"><a href="resources_8hpp.html">resources.hpp</a></div></div> <div class="ttc" id="src_2master_2allocator_2sorter_2drf_2metrics_8hpp_html"><div class="ttname"><a href="src_2master_2allocator_2sorter_2drf_2metrics_8hpp.html">metrics.hpp</a></div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_html_aac585924db2f0dca54d153239ca6224e"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#aac585924db2f0dca54d153239ca6224e">mesos::internal::master::allocator::DRFSorter::Node::Node</a></div><div class="ttdeci">Node(const std::string &_name, Kind _kind, Node *_parent)</div><div class="ttdef"><b>Definition:</b> sorter.hpp:209</div></div> @@ -517,13 +526,13 @@ <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_html_a4a4cee57ee80c001f04eee39b11d75ea"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a4a4cee57ee80c001f04eee39b11d75ea">mesos::internal::master::allocator::DRFSorter::Node::children</a></div><div class="ttdeci">std::vector< Node * > children</div><div class="ttdef"><b>Definition:</b> sorter.hpp:262</div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a84434bc1109d2bafa13d36233d004800"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a84434bc1109d2bafa13d36233d004800">mesos::internal::master::allocator::DRFSorter::Node::Allocation::add</a></div><div class="ttdeci">void add(const SlaveID &slaveId, const Resources &toAdd)</div><div class="ttdef"><b>Definition:</b> sorter.hpp:324</div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_html_ad5885f8c996c795ef8dc8a00e27f02df"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#ad5885f8c996c795ef8dc8a00e27f02df">mesos::internal::master::allocator::DRFSorter::Node::path</a></div><div class="ttdeci">std::string path</div><div class="ttdef"><b>Definition:</b> sorter.hpp:242</div></div> -<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a96f9b4ee3d9edea82c896e4468c6ee89"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">mesos::internal::master::allocator::DRFSorter::Node::Allocation::scalarQuantities</a></div><div class="ttdeci">Resources scalarQuantities</div><div class="ttdef"><b>Definition:</b> sorter.hpp:421</div></div> +<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a96f9b4ee3d9edea82c896e4468c6ee89"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a96f9b4ee3d9edea82c896e4468c6ee89">mesos::internal::master::allocator::DRFSorter::Node::Allocation::scalarQuantities</a></div><div class="ttdeci">Resources scalarQuantities</div><div class="ttdef"><b>Definition:</b> sorter.hpp:430</div></div> <div class="ttc" id="include_2mesos_2mesos_8hpp_html"><div class="ttname"><a href="include_2mesos_2mesos_8hpp.html">mesos.hpp</a></div></div> <div class="ttc" id="classmesos_1_1Resources_html_a62ae547c0d24fdfb139549e9b8126fdf"><div class="ttname"><a href="classmesos_1_1Resources.html#a62ae547c0d24fdfb139549e9b8126fdf">mesos::Resources::filter</a></div><div class="ttdeci">Resources filter(const lambda::function< bool(const Resource &)> &predicate) const </div></div> <div class="ttc" id="include_2mesos_2values_8hpp_html"><div class="ttname"><a href="include_2mesos_2values_8hpp.html">values.hpp</a></div></div> <div class="ttc" id="classmesos_1_1Resources_html"><div class="ttname"><a href="classmesos_1_1Resources.html">mesos::Resources</a></div><div class="ttdef"><b>Definition:</b> resources.hpp:63</div></div> <div class="ttc" id="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_html_a3e6b57c2f202d8cdb5e852688999b6f4"><div class="ttname"><a href="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter.html#a3e6b57c2f202d8cdb5e852688999b6f4">mesos::internal::master::allocator::DRFSorter::sort</a></div><div class="ttdeci">virtual std::vector< std::string > sort()</div></div> -<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a64092d778a36c26897fc028bdf31ceb6"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">mesos::internal::master::allocator::DRFSorter::Node::Allocation::count</a></div><div class="ttdeci">uint64_t count</div><div class="ttdef"><b>Definition:</b> sorter.hpp:410</div></div> +<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a64092d778a36c26897fc028bdf31ceb6"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a64092d778a36c26897fc028bdf31ceb6">mesos::internal::master::allocator::DRFSorter::Node::Allocation::count</a></div><div class="ttdeci">uint64_t count</div><div class="ttdef"><b>Definition:</b> sorter.hpp:419</div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a1c4287b8a7fb24b7ee700b25f192a090"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a1c4287b8a7fb24b7ee700b25f192a090">mesos::internal::master::allocator::DRFSorter::Node::Allocation::Allocation</a></div><div class="ttdeci">Allocation()</div><div class="ttdef"><b>Definition:</b> sorter.hpp:322</div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html">mesos::internal::master::allocator::DRFSorter::Node::Allocation</a></div><div class="ttdef"><b>Definition:</b> sorter.hpp:320</div></div> <div class="ttc" id="stout_2include_2stout_2check_8hpp_html"><div class="ttname"><a href="stout_2include_2stout_2check_8hpp.html">check.hpp</a></div></div> @@ -533,7 +542,7 @@ <div class="ttc" id="classhashmap_html"><div class="ttname"><a href="classhashmap.html">hashmap</a></div><div class="ttdef"><b>Definition:</b> hashmap.hpp:36</div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_html_a4d517b4f43a57bed46b16564ed0332b5"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a4d517b4f43a57bed46b16564ed0332b5">mesos::internal::master::allocator::DRFSorter::Node::Kind</a></div><div class="ttdeci">Kind</div><div class="ttdef"><b>Definition:</b> sorter.hpp:202</div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1Metrics_html"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1Metrics.html">mesos::internal::master::allocator::Metrics</a></div><div class="ttdef"><b>Definition:</b> metrics.hpp:35</div></div> -<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a48afd5a0d1fca422d42f61f548a17e32"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">mesos::internal::master::allocator::DRFSorter::Node::Allocation::resources</a></div><div class="ttdeci">hashmap< SlaveID, Resources > resources</div><div class="ttdef"><b>Definition:</b> sorter.hpp:416</div></div> +<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a48afd5a0d1fca422d42f61f548a17e32"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a48afd5a0d1fca422d42f61f548a17e32">mesos::internal::master::allocator::DRFSorter::Node::Allocation::resources</a></div><div class="ttdeci">hashmap< SlaveID, Resources > resources</div><div class="ttdef"><b>Definition:</b> sorter.hpp:425</div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_html_a8b351281377485f8169eab52ee856ad5"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a8b351281377485f8169eab52ee856ad5">mesos::internal::master::allocator::DRFSorter::Node::allocation</a></div><div class="ttdeci">struct mesos::internal::master::allocator::DRFSorter::Node::Allocation allocation</div></div> <div class="ttc" id="structprocess_1_1UPID_html"><div class="ttname"><a href="structprocess_1_1UPID.html">process::UPID</a></div><div class="ttdoc">An &quot;untyped&quot; PID, used to encapsulate the process ID for lower-layer abstractions (eg...</div><div class="ttdef"><b>Definition:</b> pid.hpp:39</div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a1807f36bd86bb28efa223c5d99861733"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a1807f36bd86bb28efa223c5d99861733">mesos::internal::master::allocator::DRFSorter::Node::Allocation::subtract</a></div><div class="ttdeci">void subtract(const SlaveID &slaveId, const Resources &toRemove)</div><div class="ttdef"><b>Definition:</b> sorter.hpp:346</div></div> @@ -546,9 +555,9 @@ <div class="ttc" id="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_html_abe93127e2543b3e1a72821bf4b6e44dc"><div class="ttname"><a href="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter.html#abe93127e2543b3e1a72821bf4b6e44dc">mesos::internal::master::allocator::DRFSorter::allocationScalarQuantities</a></div><div class="ttdeci">virtual const Resources & allocationScalarQuantities(const std::string &clientPath) const </div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_html"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html">mesos::internal::master::allocator::DRFSorter::Node</a></div><div class="ttdef"><b>Definition:</b> sorter.hpp:196</div></div> <div class="ttc" id="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_html_a2fbf08447add09176b0a5a8ab8084531"><div class="ttname"><a href="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter.html#a2fbf08447add09176b0a5a8ab8084531">mesos::internal::master::allocator::DRFSorter::unallocated</a></div><div class="ttdeci">virtual void unallocated(const std::string &clientPath, const SlaveID &slaveId, const Resources &resources)</div></div> -<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a7f54af2d74a80f47817793656af2d07c"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c">mesos::internal::master::allocator::DRFSorter::Node::Allocation::totals</a></div><div class="ttdeci">hashmap< std::string, Value::Scalar > totals</div><div class="ttdef"><b>Definition:</b> sorter.hpp:430</div></div> +<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a7f54af2d74a80f47817793656af2d07c"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a7f54af2d74a80f47817793656af2d07c">mesos::internal::master::allocator::DRFSorter::Node::Allocation::totals</a></div><div class="ttdeci">hashmap< std::string, Value::Scalar > totals</div><div class="ttdef"><b>Definition:</b> sorter.hpp:439</div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_html_a4d517b4f43a57bed46b16564ed0332b5accbf5555a2090f92cf7bb1c5201c65e0"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a4d517b4f43a57bed46b16564ed0332b5accbf5555a2090f92cf7bb1c5201c65e0">mesos::internal::master::allocator::DRFSorter::Node::INTERNAL</a></div><div class="ttdef"><b>Definition:</b> sorter.hpp:206</div></div> -<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_html_a3a372c2906a6f9c1bcebd44ab123b16e"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3a372c2906a6f9c1bcebd44ab123b16e">mesos::internal::master::allocator::DRFSorter::Node::compareDRF</a></div><div class="ttdeci">static bool compareDRF(const Node *left, const Node *right)</div><div class="ttdef"><b>Definition:</b> sorter.hpp:434</div></div> +<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_html_a3a372c2906a6f9c1bcebd44ab123b16e"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#a3a372c2906a6f9c1bcebd44ab123b16e">mesos::internal::master::allocator::DRFSorter::Node::compareDRF</a></div><div class="ttdeci">static bool compareDRF(const Node *left, const Node *right)</div><div class="ttdef"><b>Definition:</b> sorter.hpp:443</div></div> <div class="ttc" id="option_8hpp_html"><div class="ttname"><a href="option_8hpp.html">option.hpp</a></div></div> <div class="ttc" id="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_html"><div class="ttname"><a href="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter.html">mesos::internal::master::allocator::DRFSorter</a></div><div class="ttdef"><b>Definition:</b> sorter.hpp:43</div></div> <div class="ttc" id="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_html_a8bbb152a9263bc917f4b5ece184fb6aa"><div class="ttname"><a href="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter.html#a8bbb152a9263bc917f4b5ece184fb6aa">mesos::internal::master::allocator::DRFSorter::allocated</a></div><div class="ttdeci">virtual void allocated(const std::string &clientPath, const SlaveID &slaveId, const Resources &resources)</div></div> @@ -565,7 +574,7 @@ <div class="ttc" id="classmesos_1_1Resources_html_a30fc4fe000da99818bfcee5bb780e5d4"><div class="ttname"><a href="classmesos_1_1Resources.html#a30fc4fe000da99818bfcee5bb780e5d4">mesos::Resources::contains</a></div><div class="ttdeci">bool contains(const Resources &that) const </div></div> <div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_html_aef067568f67f6fd946a939141fdeb768"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node.html#aef067568f67f6fd946a939141fdeb768">mesos::internal::master::allocator::DRFSorter::Node::addChild</a></div><div class="ttdeci">void addChild(Node *child)</div><div class="ttdef"><b>Definition:</b> sorter.hpp:302</div></div> <div class="ttc" id="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_html_aca7df788e0b273a2cc7761eb441637ec"><div class="ttname"><a href="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter.html#aca7df788e0b273a2cc7761eb441637ec">mesos::internal::master::allocator::DRFSorter::~DRFSorter</a></div><div class="ttdeci">virtual ~DRFSorter()</div></div> -<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a5ec4e37470913f00cb7e60928d1e4157"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a5ec4e37470913f00cb7e60928d1e4157">mesos::internal::master::allocator::DRFSorter::Node::Allocation::update</a></div><div class="ttdeci">void update(const SlaveID &slaveId, const Resources &oldAllocation, const Resources &newAllocation)</div><div class="ttdef"><b>Definition:</b> sorter.hpp:375</div></div> +<div class="ttc" id="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation_html_a5ec4e37470913f00cb7e60928d1e4157"><div class="ttname"><a href="structmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_1_1Node_1_1Allocation.html#a5ec4e37470913f00cb7e60928d1e4157">mesos::internal::master::allocator::DRFSorter::Node::Allocation::update</a></div><div class="ttdeci">void update(const SlaveID &slaveId, const Resources &oldAllocation, const Resources &newAllocation)</div><div class="ttdef"><b>Definition:</b> sorter.hpp:379</div></div> <div class="ttc" id="hashmap_8hpp_html"><div class="ttname"><a href="hashmap_8hpp.html">hashmap.hpp</a></div></div> <div class="ttc" id="namespaceos_html_a965c9c19022c17c26fc5720f718e6c1a"><div class="ttname"><a href="namespaceos.html#a965c9c19022c17c26fc5720f718e6c1a">os::find</a></div><div class="ttdeci">Try< std::list< std::string > > find(const std::string &directory, const std::string &pattern)</div><div class="ttdef"><b>Definition:</b> find.hpp:37</div></div> <div class="ttc" id="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter_html_a129a3fd4c027a04b2b9073723277c6cd"><div class="ttname"><a href="classmesos_1_1internal_1_1master_1_1allocator_1_1DRFSorter.html#a129a3fd4c027a04b2b9073723277c6cd">mesos::internal::master::allocator::DRFSorter::activate</a></div><div class="ttdeci">virtual void activate(const std::string &clientPath)</div></div>
