| <!DOCTYPE HTML> |
| <html lang="de"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>BaseResourceAwareStrategy (Storm 2.6.2 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.storm.scheduler.resource.strategies.scheduling, class: BaseResourceAwareStrategy"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../../../script-dir/jquery-3.6.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/BaseResourceAwareStrategy.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li><a href="#nested-class-summary">Nested</a> | </li> |
| <li><a href="#field-summary">Field</a> | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li><a href="#field-detail">Field</a> | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.storm.scheduler.resource.strategies.scheduling</a></div> |
| <h1 title="Class BaseResourceAwareStrategy" class="title">Class BaseResourceAwareStrategy</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a> |
| <div class="inheritance">org.apache.storm.scheduler.resource.strategies.scheduling.BaseResourceAwareStrategy</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="IStrategy.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling">IStrategy</a></code></dd> |
| </dl> |
| <dl class="notes"> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="ConstraintSolverStrategy.html" title="class in org.apache.storm.scheduler.resource.strategies.scheduling">ConstraintSolverStrategy</a></code>, <code><a href="DefaultResourceAwareStrategy.html" title="class in org.apache.storm.scheduler.resource.strategies.scheduling">DefaultResourceAwareStrategy</a></code>, <code><a href="DefaultResourceAwareStrategyOld.html" title="class in org.apache.storm.scheduler.resource.strategies.scheduling">DefaultResourceAwareStrategyOld</a></code>, <code><a href="GenericResourceAwareStrategy.html" title="class in org.apache.storm.scheduler.resource.strategies.scheduling">GenericResourceAwareStrategy</a></code>, <code><a href="GenericResourceAwareStrategyOld.html" title="class in org.apache.storm.scheduler.resource.strategies.scheduling">GenericResourceAwareStrategyOld</a></code>, <code><a href="RoundRobinResourceAwareStrategy.html" title="class in org.apache.storm.scheduler.resource.strategies.scheduling">RoundRobinResourceAwareStrategy</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">BaseResourceAwareStrategy</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| implements <a href="IStrategy.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling">IStrategy</a></span></div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <li> |
| <section class="nested-class-summary" id="nested-class-summary"> |
| <h2>Nested Class Summary</h2> |
| <div class="caption"><span>Nested Classes</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Class</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>static enum </code></div> |
| <div class="col-second even-row-color"><code><a href="BaseResourceAwareStrategy.NodeSortType.html" class="type-name-link" title="enum in org.apache.storm.scheduler.resource.strategies.scheduling">BaseResourceAwareStrategy.NodeSortType</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Different node sorting types available.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <li> |
| <section class="field-summary" id="field-summary"> |
| <h2>Field Summary</h2> |
| <div class="caption"><span>Fields</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Field</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>protected <a href="../../../Cluster.html" title="class in org.apache.storm.scheduler">Cluster</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#cluster" class="member-name-link">cluster</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a><<a href="../../../ExecutorDetails.html" title="class in org.apache.storm.scheduler">ExecutorDetails</a>>></code></div> |
| <div class="col-second odd-row-color"><code><a href="#compToExecs" class="member-name-link">compToExecs</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>></code></div> |
| <div class="col-second even-row-color"><code><a href="#config" class="member-name-link">config</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>protected <a href="sorter/IExecSorter.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling.sorter">IExecSorter</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#execSorter" class="member-name-link">execSorter</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="../../../ExecutorDetails.html" title="class in org.apache.storm.scheduler">ExecutorDetails</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>></code></div> |
| <div class="col-second even-row-color"><code><a href="#execToComp" class="member-name-link">execToComp</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>protected <a href="../../RasNodes.html" title="class in org.apache.storm.scheduler.resource">RasNodes</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#nodes" class="member-name-link">nodes</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>protected <a href="sorter/INodeSorter.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling.sorter">INodeSorter</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#nodeSorter" class="member-name-link">nodeSorter</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>protected final <a href="BaseResourceAwareStrategy.NodeSortType.html" title="enum in org.apache.storm.scheduler.resource.strategies.scheduling">BaseResourceAwareStrategy.NodeSortType</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#nodeSortType" class="member-name-link">nodeSortType</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>protected boolean</code></div> |
| <div class="col-second even-row-color"><code><a href="#orderExecutorsByProximity" class="member-name-link">orderExecutorsByProximity</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>protected <a href="SchedulingSearcherState.html" title="class in org.apache.storm.scheduler.resource.strategies.scheduling">SchedulingSearcherState</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#searcherState" class="member-name-link">searcherState</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>protected final boolean</code></div> |
| <div class="col-second even-row-color"><code><a href="#sortNodesForEachExecutor" class="member-name-link">sortNodesForEachExecutor</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>protected <a href="../../../TopologyDetails.html" title="class in org.apache.storm.scheduler">TopologyDetails</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#topologyDetails" class="member-name-link">topologyDetails</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#topoName" class="member-name-link">topoName</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| </div> |
| </section> |
| </li> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">BaseResourceAwareStrategy</a>()</code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(boolean,org.apache.storm.scheduler.resource.strategies.scheduling.BaseResourceAwareStrategy.NodeSortType)" class="member-name-link">BaseResourceAwareStrategy</a><wbr>(boolean sortNodesForEachExecutor, |
| <a href="BaseResourceAwareStrategy.NodeSortType.html" title="enum in org.apache.storm.scheduler.resource.strategies.scheduling">BaseResourceAwareStrategy.NodeSortType</a> nodeSortType)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Initialize for the default implementation of schedule().</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#assignBoundAckersForNewWorkerSlot(org.apache.storm.scheduler.ExecutorDetails,org.apache.storm.scheduler.resource.RasNode,org.apache.storm.scheduler.WorkerSlot)" class="member-name-link">assignBoundAckersForNewWorkerSlot</a><wbr>(<a href="../../../ExecutorDetails.html" title="class in org.apache.storm.scheduler">ExecutorDetails</a> exec, |
| <a href="../../RasNode.html" title="class in org.apache.storm.scheduler.resource">RasNode</a> node, |
| <a href="../../../WorkerSlot.html" title="class in org.apache.storm.scheduler">WorkerSlot</a> workerSlot)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block"> |
| Determine how many bound ackers to put into the given workerSlot.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="../../SchedulingResult.html" title="class in org.apache.storm.scheduler.resource">SchedulingResult</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#checkSchedulingFeasibility()" class="member-name-link">checkSchedulingFeasibility</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Check scheduling feasibility for a quick failure as the second step in <a href="#schedule(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)"><code>schedule(Cluster, TopologyDetails)</code></a>.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getMaxStateSearchFromTopoConf(java.util.Map)" class="member-name-link">getMaxStateSearchFromTopoConf</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>> topoConf)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="../../RasNode.html" title="class in org.apache.storm.scheduler.resource">RasNode</a>></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hostnameToNodes(java.lang.String)" class="member-name-link">hostnameToNodes</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> hostname)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">hostname to Ids.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../../RasNode.html" title="class in org.apache.storm.scheduler.resource">RasNode</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#idToNode(java.lang.String)" class="member-name-link">idToNode</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> id)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Find RASNode for specified node id.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isExecAssignmentToWorkerValid(org.apache.storm.scheduler.ExecutorDetails,org.apache.storm.scheduler.WorkerSlot)" class="member-name-link">isExecAssignmentToWorkerValid</a><wbr>(<a href="../../../ExecutorDetails.html" title="class in org.apache.storm.scheduler">ExecutorDetails</a> exec, |
| <a href="../../../WorkerSlot.html" title="class in org.apache.storm.scheduler">WorkerSlot</a> worker)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Check if the assignment of the executor to the worker is valid.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isOrderByProximity(java.util.Map)" class="member-name-link">isOrderByProximity</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>> topoConf)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#prepare(java.util.Map)" class="member-name-link">prepare</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>> config)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Prepare the Strategy for scheduling.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#prepareForScheduling(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)" class="member-name-link">prepareForScheduling</a><wbr>(<a href="../../../Cluster.html" title="class in org.apache.storm.scheduler">Cluster</a> cluster, |
| <a href="../../../TopologyDetails.html" title="class in org.apache.storm.scheduler">TopologyDetails</a> topologyDetails)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Initialize instance variables as the first step in <a href="#schedule(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)"><code>schedule(Cluster, TopologyDetails)</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../../SchedulingResult.html" title="class in org.apache.storm.scheduler.resource">SchedulingResult</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#schedule(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)" class="member-name-link">schedule</a><wbr>(<a href="../../../Cluster.html" title="class in org.apache.storm.scheduler">Cluster</a> cluster, |
| <a href="../../../TopologyDetails.html" title="class in org.apache.storm.scheduler">TopologyDetails</a> td)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Note that this method is not thread-safe.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="../../SchedulingResult.html" title="class in org.apache.storm.scheduler.resource">SchedulingResult</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#scheduleExecutorsOnNodes(java.util.List,java.lang.Iterable)" class="member-name-link">scheduleExecutorsOnNodes</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="../../../ExecutorDetails.html" title="class in org.apache.storm.scheduler">ExecutorDetails</a>> orderedExecutors, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> sortedNodesIter)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Try to schedule till successful or till limits (backtrack count or time) have been exceeded.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setExecSorter(org.apache.storm.scheduler.resource.strategies.scheduling.sorter.IExecSorter)" class="member-name-link">setExecSorter</a><wbr>(<a href="sorter/IExecSorter.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling.sorter">IExecSorter</a> execSorter)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Set the pluggable sorter for ExecutorDetails.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setNodeSorter(org.apache.storm.scheduler.resource.strategies.scheduling.sorter.INodeSorter)" class="member-name-link">setNodeSorter</a><wbr>(<a href="sorter/INodeSorter.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling.sorter">INodeSorter</a> nodeSorter)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Set the pluggable sorter for Nodes.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <li> |
| <section class="field-details" id="field-detail"> |
| <h2>Field Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="sortNodesForEachExecutor"> |
| <h3>sortNodesForEachExecutor</h3> |
| <div class="member-signature"><span class="modifiers">protected final</span> <span class="return-type">boolean</span> <span class="element-name">sortNodesForEachExecutor</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="nodeSortType"> |
| <h3>nodeSortType</h3> |
| <div class="member-signature"><span class="modifiers">protected final</span> <span class="return-type"><a href="BaseResourceAwareStrategy.NodeSortType.html" title="enum in org.apache.storm.scheduler.resource.strategies.scheduling">BaseResourceAwareStrategy.NodeSortType</a></span> <span class="element-name">nodeSortType</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="config"> |
| <h3>config</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>></span> <span class="element-name">config</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="cluster"> |
| <h3>cluster</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="../../../Cluster.html" title="class in org.apache.storm.scheduler">Cluster</a></span> <span class="element-name">cluster</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="topologyDetails"> |
| <h3>topologyDetails</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="../../../TopologyDetails.html" title="class in org.apache.storm.scheduler">TopologyDetails</a></span> <span class="element-name">topologyDetails</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="nodes"> |
| <h3>nodes</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="../../RasNodes.html" title="class in org.apache.storm.scheduler.resource">RasNodes</a></span> <span class="element-name">nodes</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="topoName"> |
| <h3>topoName</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">topoName</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="compToExecs"> |
| <h3>compToExecs</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a><<a href="../../../ExecutorDetails.html" title="class in org.apache.storm.scheduler">ExecutorDetails</a>>></span> <span class="element-name">compToExecs</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="execToComp"> |
| <h3>execToComp</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="../../../ExecutorDetails.html" title="class in org.apache.storm.scheduler">ExecutorDetails</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>></span> <span class="element-name">execToComp</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="orderExecutorsByProximity"> |
| <h3>orderExecutorsByProximity</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">boolean</span> <span class="element-name">orderExecutorsByProximity</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="searcherState"> |
| <h3>searcherState</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="SchedulingSearcherState.html" title="class in org.apache.storm.scheduler.resource.strategies.scheduling">SchedulingSearcherState</a></span> <span class="element-name">searcherState</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="execSorter"> |
| <h3>execSorter</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="sorter/IExecSorter.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling.sorter">IExecSorter</a></span> <span class="element-name">execSorter</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="nodeSorter"> |
| <h3>nodeSorter</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="sorter/INodeSorter.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling.sorter">INodeSorter</a></span> <span class="element-name">nodeSorter</span></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>BaseResourceAwareStrategy</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">BaseResourceAwareStrategy</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(boolean,org.apache.storm.scheduler.resource.strategies.scheduling.BaseResourceAwareStrategy.NodeSortType)"> |
| <h3>BaseResourceAwareStrategy</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">BaseResourceAwareStrategy</span><wbr><span class="parameters">(boolean sortNodesForEachExecutor, |
| <a href="BaseResourceAwareStrategy.NodeSortType.html" title="enum in org.apache.storm.scheduler.resource.strategies.scheduling">BaseResourceAwareStrategy.NodeSortType</a> nodeSortType)</span></div> |
| <div class="block">Initialize for the default implementation of schedule().</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>sortNodesForEachExecutor</code> - Sort nodes before scheduling each executor.</dd> |
| <dd><code>nodeSortType</code> - type of sorting to be applied to object resource collection <a href="BaseResourceAwareStrategy.NodeSortType.html" title="enum in org.apache.storm.scheduler.resource.strategies.scheduling"><code>BaseResourceAwareStrategy.NodeSortType</code></a>.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="prepare(java.util.Map)"> |
| <h3>prepare</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">prepare</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>> config)</span></div> |
| <div class="block"><span class="descfrm-type-label">Description copied from interface: <code><a href="IStrategy.html#prepare(java.util.Map)">IStrategy</a></code></span></div> |
| <div class="block">Prepare the Strategy for scheduling.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="IStrategy.html#prepare(java.util.Map)">prepare</a></code> in interface <code><a href="IStrategy.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling">IStrategy</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>config</code> - the cluster configuration</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="schedule(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)"> |
| <h3>schedule</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../../SchedulingResult.html" title="class in org.apache.storm.scheduler.resource">SchedulingResult</a></span> <span class="element-name">schedule</span><wbr><span class="parameters">(<a href="../../../Cluster.html" title="class in org.apache.storm.scheduler">Cluster</a> cluster, |
| <a href="../../../TopologyDetails.html" title="class in org.apache.storm.scheduler">TopologyDetails</a> td)</span></div> |
| <div class="block">Note that this method is not thread-safe. |
| Several instance variables are generated from supplied |
| parameters. In addition, the following instance variables are set to complete scheduling: |
| <li><a href="#searcherState"><code>searcherState</code></a></li> |
| <li><a href="#execSorter"><code>execSorter</code></a> to sort executors</li> |
| <li><a href="#nodeSorter"><code>nodeSorter</code></a> to sort nodes</li> |
| <p> |
| Scheduling consists of three main steps: |
| <li><a href="#prepareForScheduling(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)"><code>prepareForScheduling(Cluster, TopologyDetails)</code></a></li> |
| <li><a href="#checkSchedulingFeasibility()"><code>checkSchedulingFeasibility()</code></a>, and</li> |
| <li><a href="#scheduleExecutorsOnNodes(java.util.List,java.lang.Iterable)"><code>scheduleExecutorsOnNodes(List, Iterable)</code></a></li> |
| </p><p> |
| The executors and nodes are sorted in the order most conducive to scheduling for the strategy. |
| Those interfaces may be overridden by subclasses using mutators: |
| <li><a href="#setExecSorter(org.apache.storm.scheduler.resource.strategies.scheduling.sorter.IExecSorter)"><code>setExecSorter(IExecSorter)</code></a> and</li> |
| <li><a href="#setNodeSorter(org.apache.storm.scheduler.resource.strategies.scheduling.sorter.INodeSorter)"><code>setNodeSorter(INodeSorter)</code></a></li> |
| </p></div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="IStrategy.html#schedule(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)">schedule</a></code> in interface <code><a href="IStrategy.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling">IStrategy</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>cluster</code> - on which executors will be scheduled.</dd> |
| <dd><code>td</code> - the topology to schedule for.</dd> |
| <dt>Returns:</dt> |
| <dd>result of scheduling (success, failure, or null when interrupted).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="prepareForScheduling(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)"> |
| <h3>prepareForScheduling</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">void</span> <span class="element-name">prepareForScheduling</span><wbr><span class="parameters">(<a href="../../../Cluster.html" title="class in org.apache.storm.scheduler">Cluster</a> cluster, |
| <a href="../../../TopologyDetails.html" title="class in org.apache.storm.scheduler">TopologyDetails</a> topologyDetails)</span></div> |
| <div class="block">Initialize instance variables as the first step in <a href="#schedule(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)"><code>schedule(Cluster, TopologyDetails)</code></a>. |
| This method may be extended by subclasses to initialize additional variables as in |
| <a href="ConstraintSolverStrategy.html#prepareForScheduling(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)"><code>ConstraintSolverStrategy.prepareForScheduling(Cluster, TopologyDetails)</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>cluster</code> - on which executors will be scheduled.</dd> |
| <dd><code>topologyDetails</code> - to be scheduled.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setExecSorter(org.apache.storm.scheduler.resource.strategies.scheduling.sorter.IExecSorter)"> |
| <h3>setExecSorter</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">void</span> <span class="element-name">setExecSorter</span><wbr><span class="parameters">(<a href="sorter/IExecSorter.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling.sorter">IExecSorter</a> execSorter)</span></div> |
| <div class="block">Set the pluggable sorter for ExecutorDetails.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>execSorter</code> - to use for sorting executorDetails when scheduling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setNodeSorter(org.apache.storm.scheduler.resource.strategies.scheduling.sorter.INodeSorter)"> |
| <h3>setNodeSorter</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">void</span> <span class="element-name">setNodeSorter</span><wbr><span class="parameters">(<a href="sorter/INodeSorter.html" title="interface in org.apache.storm.scheduler.resource.strategies.scheduling.sorter">INodeSorter</a> nodeSorter)</span></div> |
| <div class="block">Set the pluggable sorter for Nodes.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>nodeSorter</code> - to use for sorting nodes when scheduling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getMaxStateSearchFromTopoConf(java.util.Map)"> |
| <h3>getMaxStateSearchFromTopoConf</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">int</span> <span class="element-name">getMaxStateSearchFromTopoConf</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>> topoConf)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isOrderByProximity(java.util.Map)"> |
| <h3>isOrderByProximity</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">boolean</span> <span class="element-name">isOrderByProximity</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>> topoConf)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="checkSchedulingFeasibility()"> |
| <h3>checkSchedulingFeasibility</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="../../SchedulingResult.html" title="class in org.apache.storm.scheduler.resource">SchedulingResult</a></span> <span class="element-name">checkSchedulingFeasibility</span>()</div> |
| <div class="block">Check scheduling feasibility for a quick failure as the second step in <a href="#schedule(org.apache.storm.scheduler.Cluster,org.apache.storm.scheduler.TopologyDetails)"><code>schedule(Cluster, TopologyDetails)</code></a>. |
| If scheduling is not possible, then return a SchedulingStatus object with a failure status. |
| If fully scheduled then return a successful SchedulingStatus. |
| This method can be extended by subclasses <a href="ConstraintSolverStrategy.html#checkSchedulingFeasibility()"><code>ConstraintSolverStrategy.checkSchedulingFeasibility()</code></a> |
| to check for additional failure conditions.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>A non-null <a href="../../SchedulingResult.html" title="class in org.apache.storm.scheduler.resource"><code>SchedulingResult</code></a> to terminate scheduling, otherwise return null to continue scheduling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isExecAssignmentToWorkerValid(org.apache.storm.scheduler.ExecutorDetails,org.apache.storm.scheduler.WorkerSlot)"> |
| <h3>isExecAssignmentToWorkerValid</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">boolean</span> <span class="element-name">isExecAssignmentToWorkerValid</span><wbr><span class="parameters">(<a href="../../../ExecutorDetails.html" title="class in org.apache.storm.scheduler">ExecutorDetails</a> exec, |
| <a href="../../../WorkerSlot.html" title="class in org.apache.storm.scheduler">WorkerSlot</a> worker)</span></div> |
| <div class="block">Check if the assignment of the executor to the worker is valid. In simple cases, |
| this is simply a check of <a href="../../RasNode.html#wouldFit(org.apache.storm.scheduler.WorkerSlot,org.apache.storm.scheduler.ExecutorDetails,org.apache.storm.scheduler.TopologyDetails)"><code>RasNode.wouldFit(WorkerSlot, ExecutorDetails, TopologyDetails)</code></a>. |
| This method may be extended by subclasses to add additional checks, |
| see <a href="ConstraintSolverStrategy.html#isExecAssignmentToWorkerValid(org.apache.storm.scheduler.ExecutorDetails,org.apache.storm.scheduler.WorkerSlot)"><code>ConstraintSolverStrategy.isExecAssignmentToWorkerValid(ExecutorDetails, WorkerSlot)</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>exec</code> - being scheduled.</dd> |
| <dd><code>worker</code> - on which to schedule.</dd> |
| <dt>Returns:</dt> |
| <dd>true if executor can be assigned to the worker, false otherwise.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="hostnameToNodes(java.lang.String)"> |
| <h3>hostnameToNodes</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="../../RasNode.html" title="class in org.apache.storm.scheduler.resource">RasNode</a>></span> <span class="element-name">hostnameToNodes</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> hostname)</span></div> |
| <div class="block">hostname to Ids.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>hostname</code> - the hostname.</dd> |
| <dt>Returns:</dt> |
| <dd>the ids n that node.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="idToNode(java.lang.String)"> |
| <h3>idToNode</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../../RasNode.html" title="class in org.apache.storm.scheduler.resource">RasNode</a></span> <span class="element-name">idToNode</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> id)</span></div> |
| <div class="block">Find RASNode for specified node id.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>id</code> - the node/supervisor id to lookup</dd> |
| <dt>Returns:</dt> |
| <dd>a RASNode object</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="scheduleExecutorsOnNodes(java.util.List,java.lang.Iterable)"> |
| <h3>scheduleExecutorsOnNodes</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="../../SchedulingResult.html" title="class in org.apache.storm.scheduler.resource">SchedulingResult</a></span> <span class="element-name">scheduleExecutorsOnNodes</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="../../../ExecutorDetails.html" title="class in org.apache.storm.scheduler">ExecutorDetails</a>> orderedExecutors, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> sortedNodesIter)</span></div> |
| <div class="block">Try to schedule till successful or till limits (backtrack count or time) have been exceeded.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>orderedExecutors</code> - Executors sorted in the preferred order cannot be null - note that ackers are isolated at the end.</dd> |
| <dd><code>sortedNodesIter</code> - Node iterable which may be null.</dd> |
| <dt>Returns:</dt> |
| <dd>SchedulingResult with success attribute set to true or false indicting whether ALL executors were assigned.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="assignBoundAckersForNewWorkerSlot(org.apache.storm.scheduler.ExecutorDetails,org.apache.storm.scheduler.resource.RasNode,org.apache.storm.scheduler.WorkerSlot)"> |
| <h3>assignBoundAckersForNewWorkerSlot</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">int</span> <span class="element-name">assignBoundAckersForNewWorkerSlot</span><wbr><span class="parameters">(<a href="../../../ExecutorDetails.html" title="class in org.apache.storm.scheduler">ExecutorDetails</a> exec, |
| <a href="../../RasNode.html" title="class in org.apache.storm.scheduler.resource">RasNode</a> node, |
| <a href="../../../WorkerSlot.html" title="class in org.apache.storm.scheduler">WorkerSlot</a> workerSlot)</span></div> |
| <div class="block"><p> |
| Determine how many bound ackers to put into the given workerSlot. |
| Then try to assign the ackers one by one into this workerSlot upto the calculated |
| maximum required. Return the number of ackers assigned. |
| |
| Return 0 if one of the conditions hold true: |
| 1. No bound ackers are used. |
| 2. This is not first exec assigned to this worker. |
| 3. No ackers could be assigned because of space or exception. |
| |
| </p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>exec</code> - being scheduled.</dd> |
| <dd><code>node</code> - RasNode on which to schedule.</dd> |
| <dd><code>workerSlot</code> - WorkerSlot on which to schedule.</dd> |
| <dt>Returns:</dt> |
| <dd>Number of ackers assigned.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |