| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (version 1.7.0_101) on Mon Jul 25 19:40:53 UTC 2016 --> |
| <title>SchedulerDriver</title> |
| <meta name="date" content="2016-07-25"> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="SchedulerDriver"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../org/apache/mesos/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</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">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../org/apache/mesos/Scheduler.html" title="interface in org.apache.mesos"><span class="strong">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/apache/mesos/SchedulerDriver.html" target="_top">Frames</a></li> |
| <li><a href="SchedulerDriver.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.mesos</div> |
| <h2 title="Interface SchedulerDriver" class="title">Interface SchedulerDriver</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../org/apache/mesos/MesosSchedulerDriver.html" title="class in org.apache.mesos">MesosSchedulerDriver</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="strong">SchedulerDriver</span></pre> |
| <div class="block">Abstract interface for connecting a scheduler to Mesos. This |
| interface is used both to manage the scheduler's lifecycle (start |
| it, stop it, or wait for it to finish) and to interact with Mesos |
| (e.g., launch tasks, kill tasks, etc.).</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#abort()">abort</a></strong>()</code> |
| <div class="block">Aborts the driver so that no more callbacks can be made to the |
| scheduler.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#acceptOffers(java.util.Collection,%20java.util.Collection,%20org.apache.mesos.Protos.Filters)">acceptOffers</a></strong>(java.util.Collection<<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a>> offerIds, |
| java.util.Collection<<a href="../../../org/apache/mesos/Protos.Offer.Operation.html" title="class in org.apache.mesos">Protos.Offer.Operation</a>> operations, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos">Protos.Filters</a> filters)</code> |
| <div class="block">Accepts the given offers and performs a sequence of operations on |
| those accepted offers.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#acknowledgeStatusUpdate(org.apache.mesos.Protos.TaskStatus)">acknowledgeStatusUpdate</a></strong>(<a href="../../../org/apache/mesos/Protos.TaskStatus.html" title="class in org.apache.mesos">Protos.TaskStatus</a> status)</code> |
| <div class="block">Acknowledges the status update.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#declineOffer(org.apache.mesos.Protos.OfferID)">declineOffer</a></strong>(<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a> offerId)</code> |
| <div class="block">Declines an offer in its entirety.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#declineOffer(org.apache.mesos.Protos.OfferID,%20org.apache.mesos.Protos.Filters)">declineOffer</a></strong>(<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a> offerId, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos">Protos.Filters</a> filters)</code> |
| <div class="block">Declines an offer in its entirety and applies the specified |
| filters on the resources (see mesos.proto for a description of |
| Filters).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#join()">join</a></strong>()</code> |
| <div class="block">Waits for the driver to be stopped or aborted, possibly |
| <i>blocking</i> the current thread indefinitely.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#killTask(org.apache.mesos.Protos.TaskID)">killTask</a></strong>(<a href="../../../org/apache/mesos/Protos.TaskID.html" title="class in org.apache.mesos">Protos.TaskID</a> taskId)</code> |
| <div class="block">Kills the specified task.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#launchTasks(java.util.Collection,%20java.util.Collection)">launchTasks</a></strong>(java.util.Collection<<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a>> offerIds, |
| java.util.Collection<<a href="../../../org/apache/mesos/Protos.TaskInfo.html" title="class in org.apache.mesos">Protos.TaskInfo</a>> tasks)</code> |
| <div class="block">Launches the given set of tasks.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#launchTasks(java.util.Collection,%20java.util.Collection,%20org.apache.mesos.Protos.Filters)">launchTasks</a></strong>(java.util.Collection<<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a>> offerIds, |
| java.util.Collection<<a href="../../../org/apache/mesos/Protos.TaskInfo.html" title="class in org.apache.mesos">Protos.TaskInfo</a>> tasks, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos">Protos.Filters</a> filters)</code> |
| <div class="block">Launches the given set of tasks.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#launchTasks(org.apache.mesos.Protos.OfferID,%20java.util.Collection)">launchTasks</a></strong>(<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a> offerId, |
| java.util.Collection<<a href="../../../org/apache/mesos/Protos.TaskInfo.html" title="class in org.apache.mesos">Protos.TaskInfo</a>> tasks)</code> |
| <div class="block"><strong>Deprecated.</strong> |
| <div class="block"><i>Use <a href="../../../org/apache/mesos/SchedulerDriver.html#launchTasks(java.util.Collection,%20java.util.Collection)"><code>launchTasks(Collection, Collection)</code></a> instead. |
| Note that this may add a default filter (see mesos.proto) |
| for the remaining resources. Notably the MesosSchedulerDriver |
| does so.</i></div> |
| </div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#launchTasks(org.apache.mesos.Protos.OfferID,%20java.util.Collection,%20org.apache.mesos.Protos.Filters)">launchTasks</a></strong>(<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a> offerId, |
| java.util.Collection<<a href="../../../org/apache/mesos/Protos.TaskInfo.html" title="class in org.apache.mesos">Protos.TaskInfo</a>> tasks, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos">Protos.Filters</a> filters)</code> |
| <div class="block"><strong>Deprecated.</strong> |
| <div class="block"><i>Use <code>#launchTasks(Collection, Collection, Filters)</code> instead.</i></div> |
| </div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#reconcileTasks(java.util.Collection)">reconcileTasks</a></strong>(java.util.Collection<<a href="../../../org/apache/mesos/Protos.TaskStatus.html" title="class in org.apache.mesos">Protos.TaskStatus</a>> statuses)</code> |
| <div class="block">Allows the framework to query the status for non-terminal tasks.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#requestResources(java.util.Collection)">requestResources</a></strong>(java.util.Collection<<a href="../../../org/apache/mesos/Protos.Request.html" title="class in org.apache.mesos">Protos.Request</a>> requests)</code> |
| <div class="block">Requests resources from Mesos (see mesos.proto for a description |
| of Request and how, for example, to request resources |
| from specific slaves).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#reviveOffers()">reviveOffers</a></strong>()</code> |
| <div class="block">Removes all filters, previously set by the framework (via <a href="../../../org/apache/mesos/SchedulerDriver.html#launchTasks(java.util.Collection,%20java.util.Collection,%20org.apache.mesos.Protos.Filters)"><code>launchTasks(java.util.Collection<org.apache.mesos.Protos.OfferID>, java.util.Collection<org.apache.mesos.Protos.TaskInfo>, org.apache.mesos.Protos.Filters)</code></a>).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#run()">run</a></strong>()</code> |
| <div class="block">Starts and immediately joins (i.e., blocks on) the driver.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#sendFrameworkMessage(org.apache.mesos.Protos.ExecutorID,%20org.apache.mesos.Protos.SlaveID,%20byte[])">sendFrameworkMessage</a></strong>(<a href="../../../org/apache/mesos/Protos.ExecutorID.html" title="class in org.apache.mesos">Protos.ExecutorID</a> executorId, |
| <a href="../../../org/apache/mesos/Protos.SlaveID.html" title="class in org.apache.mesos">Protos.SlaveID</a> slaveId, |
| byte[] data)</code> |
| <div class="block">Sends a message from the framework to one of its executors.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#start()">start</a></strong>()</code> |
| <div class="block">Starts the scheduler driver.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#stop()">stop</a></strong>()</code> |
| <div class="block">Stops the scheduler driver assuming no failover.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#stop(boolean)">stop</a></strong>(boolean failover)</code> |
| <div class="block">Stops the scheduler driver.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/SchedulerDriver.html#suppressOffers()">suppressOffers</a></strong>()</code> |
| <div class="block">Inform Mesos master to stop sending offers to the framework.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="start()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>start</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> start()</pre> |
| <div class="block">Starts the scheduler driver. This needs to be called before any |
| other driver calls are made.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos"><code>Protos.Status</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="stop(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stop</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> stop(boolean failover)</pre> |
| <div class="block">Stops the scheduler driver. If the 'failover' flag is set to |
| false then it is expected that this framework will never |
| reconnect to Mesos. So Mesos will unregister the framework |
| and shutdown all its tasks and executors. If 'failover' is true, |
| all executors and tasks will remain running (for some framework |
| specific failover timeout) allowing the scheduler to reconnect |
| (possibly in the same process, or from a different process, for |
| example, on a different machine).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>failover</code> - Whether framework failover is expected.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos"><code>Protos.Status</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="stop()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stop</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> stop()</pre> |
| <div class="block">Stops the scheduler driver assuming no failover. This will |
| cause Mesos to unregister the framework and shutdown all |
| its tasks and executors. Please see <a href="../../../org/apache/mesos/SchedulerDriver.html#stop(boolean)"><code>stop(boolean)</code></a> |
| for more details.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd></dl> |
| </li> |
| </ul> |
| <a name="abort()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>abort</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> abort()</pre> |
| <div class="block">Aborts the driver so that no more callbacks can be made to the |
| scheduler. The semantics of abort and stop have deliberately been |
| separated so that code can detect an aborted driver (i.e., via |
| the return status of <a href="../../../org/apache/mesos/SchedulerDriver.html#join()"><code>join()</code></a>, see below), and instantiate |
| and start another driver if desired (from within the same |
| process).</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd></dl> |
| </li> |
| </ul> |
| <a name="join()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>join</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> join()</pre> |
| <div class="block">Waits for the driver to be stopped or aborted, possibly |
| <i>blocking</i> the current thread indefinitely. The return status of |
| this function can be used to determine if the driver was aborted |
| (see mesos.proto for a description of Status).</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd></dl> |
| </li> |
| </ul> |
| <a name="run()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>run</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> run()</pre> |
| <div class="block">Starts and immediately joins (i.e., blocks on) the driver.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd></dl> |
| </li> |
| </ul> |
| <a name="requestResources(java.util.Collection)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>requestResources</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> requestResources(java.util.Collection<<a href="../../../org/apache/mesos/Protos.Request.html" title="class in org.apache.mesos">Protos.Request</a>> requests)</pre> |
| <div class="block">Requests resources from Mesos (see mesos.proto for a description |
| of Request and how, for example, to request resources |
| from specific slaves). Any resources available are offered to the |
| framework via <a href="../../../org/apache/mesos/Scheduler.html#resourceOffers(org.apache.mesos.SchedulerDriver,%20java.util.List)"><code>Scheduler.resourceOffers(org.apache.mesos.SchedulerDriver, java.util.List<org.apache.mesos.Protos.Offer>)</code></a> callback, |
| asynchronously.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>requests</code> - The resource requests.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.Request.html" title="class in org.apache.mesos"><code>Protos.Request</code></a>, |
| <a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos"><code>Protos.Status</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="launchTasks(java.util.Collection, java.util.Collection, org.apache.mesos.Protos.Filters)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>launchTasks</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> launchTasks(java.util.Collection<<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a>> offerIds, |
| java.util.Collection<<a href="../../../org/apache/mesos/Protos.TaskInfo.html" title="class in org.apache.mesos">Protos.TaskInfo</a>> tasks, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos">Protos.Filters</a> filters)</pre> |
| <div class="block">Launches the given set of tasks. Any remaining resources (i.e., |
| those that are not used by the launched tasks or their executors) |
| will be considered declined. Note that this includes resources |
| used by tasks that the framework attempted to launch but failed |
| (with TASK_ERROR) due to a malformed task description. The |
| specified filters are applied on all unused resources (see |
| mesos.proto for a description of Filters). Available resources |
| are aggregated when multiple offers are provided. Note that all |
| offers must belong to the same slave. Invoking this function with |
| an empty collection of tasks declines offers in their entirety |
| (see <a href="../../../org/apache/mesos/SchedulerDriver.html#declineOffer(org.apache.mesos.Protos.OfferID,%20org.apache.mesos.Protos.Filters)"><code>declineOffer(org.apache.mesos.Protos.OfferID, org.apache.mesos.Protos.Filters)</code></a>).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>offerIds</code> - The collection of offer IDs.</dd><dd><code>tasks</code> - The collection of tasks to be launched.</dd><dd><code>filters</code> - The filters to set for any remaining resources.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos"><code>Protos.OfferID</code></a>, |
| <a href="../../../org/apache/mesos/Protos.TaskInfo.html" title="class in org.apache.mesos"><code>Protos.TaskInfo</code></a>, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos"><code>Protos.Filters</code></a>, |
| <a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos"><code>Protos.Status</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="launchTasks(java.util.Collection, java.util.Collection)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>launchTasks</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> launchTasks(java.util.Collection<<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a>> offerIds, |
| java.util.Collection<<a href="../../../org/apache/mesos/Protos.TaskInfo.html" title="class in org.apache.mesos">Protos.TaskInfo</a>> tasks)</pre> |
| <div class="block">Launches the given set of tasks. See above for details. |
| Note that this may add a default filter (see mesos.proto) |
| for the remaining resources. Notably the MesosSchedulerDriver |
| does so.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>offerIds</code> - The collection of offer IDs.</dd><dd><code>tasks</code> - The collection of tasks to be launched.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd></dl> |
| </li> |
| </ul> |
| <a name="launchTasks(org.apache.mesos.Protos.OfferID, java.util.Collection, org.apache.mesos.Protos.Filters)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>launchTasks</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> launchTasks(<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a> offerId, |
| java.util.Collection<<a href="../../../org/apache/mesos/Protos.TaskInfo.html" title="class in org.apache.mesos">Protos.TaskInfo</a>> tasks, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos">Protos.Filters</a> filters)</pre> |
| <div class="block"><span class="strong">Deprecated.</span> <i>Use <code>#launchTasks(Collection, Collection, Filters)</code> instead.</i></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>offerId</code> - The offer ID.</dd><dd><code>tasks</code> - The collection of tasks to be launched.</dd><dd><code>filters</code> - The filters to set for any remaining resources.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd></dl> |
| </li> |
| </ul> |
| <a name="launchTasks(org.apache.mesos.Protos.OfferID, java.util.Collection)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>launchTasks</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> launchTasks(<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a> offerId, |
| java.util.Collection<<a href="../../../org/apache/mesos/Protos.TaskInfo.html" title="class in org.apache.mesos">Protos.TaskInfo</a>> tasks)</pre> |
| <div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/apache/mesos/SchedulerDriver.html#launchTasks(java.util.Collection,%20java.util.Collection)"><code>launchTasks(Collection, Collection)</code></a> instead. |
| Note that this may add a default filter (see mesos.proto) |
| for the remaining resources. Notably the MesosSchedulerDriver |
| does so.</i></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>offerId</code> - The offer ID.</dd><dd><code>tasks</code> - The collection of tasks to be launched.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd></dl> |
| </li> |
| </ul> |
| <a name="killTask(org.apache.mesos.Protos.TaskID)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>killTask</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> killTask(<a href="../../../org/apache/mesos/Protos.TaskID.html" title="class in org.apache.mesos">Protos.TaskID</a> taskId)</pre> |
| <div class="block">Kills the specified task. Note that attempting to kill a task is |
| currently not reliable. If, for example, a scheduler fails over |
| while it was attempting to kill a task it will need to retry in |
| the future Likewise, if unregistered / disconnected, the request |
| will be dropped (these semantics may be changed in the future).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>taskId</code> - The ID of the task to be killed.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd></dl> |
| </li> |
| </ul> |
| <a name="acceptOffers(java.util.Collection, java.util.Collection, org.apache.mesos.Protos.Filters)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>acceptOffers</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> acceptOffers(java.util.Collection<<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a>> offerIds, |
| java.util.Collection<<a href="../../../org/apache/mesos/Protos.Offer.Operation.html" title="class in org.apache.mesos">Protos.Offer.Operation</a>> operations, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos">Protos.Filters</a> filters)</pre> |
| <div class="block">Accepts the given offers and performs a sequence of operations on |
| those accepted offers. See Offer.Operation in mesos.proto for the |
| set of available operations. Any remaining resources (i.e., those |
| that are not used by the launched tasks or their executors) will |
| be considered declined. Note that this includes resources used by |
| tasks that the framework attempted to launch but failed (with |
| TASK_ERROR) due to a malformed task description. The specified |
| filters are applied on all unused resources (see mesos.proto for |
| a description of Filters). Available resources are aggregated |
| when multiple offers are provided. Note that all offers must |
| belong to the same slave.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>offerIds</code> - The collection of offer IDs.</dd><dd><code>operations</code> - The collection of offer operations to perform.</dd><dd><code>filters</code> - The filters to set for any remaining resources.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos"><code>Protos.OfferID</code></a>, |
| <code>Offer.Operation</code>, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos"><code>Protos.Filters</code></a>, |
| <a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos"><code>Protos.Status</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="declineOffer(org.apache.mesos.Protos.OfferID, org.apache.mesos.Protos.Filters)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>declineOffer</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> declineOffer(<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a> offerId, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos">Protos.Filters</a> filters)</pre> |
| <div class="block">Declines an offer in its entirety and applies the specified |
| filters on the resources (see mesos.proto for a description of |
| Filters). Note that this can be done at any time, it is not |
| necessary to do this within the <a href="../../../org/apache/mesos/Scheduler.html#resourceOffers(org.apache.mesos.SchedulerDriver,%20java.util.List)"><code>Scheduler.resourceOffers(org.apache.mesos.SchedulerDriver, java.util.List<org.apache.mesos.Protos.Offer>)</code></a> |
| callback.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>offerId</code> - The ID of the offer to be declined.</dd><dd><code>filters</code> - The filters to set for any remaining resources.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos"><code>Protos.OfferID</code></a>, |
| <a href="../../../org/apache/mesos/Protos.Filters.html" title="class in org.apache.mesos"><code>Protos.Filters</code></a>, |
| <a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos"><code>Protos.Status</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="declineOffer(org.apache.mesos.Protos.OfferID)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>declineOffer</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> declineOffer(<a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos">Protos.OfferID</a> offerId)</pre> |
| <div class="block">Declines an offer in its entirety. See above for details.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>offerId</code> - The ID of the offer to be declined.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.OfferID.html" title="class in org.apache.mesos"><code>Protos.OfferID</code></a>, |
| <a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos"><code>Protos.Status</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="reviveOffers()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>reviveOffers</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> reviveOffers()</pre> |
| <div class="block">Removes all filters, previously set by the framework (via <a href="../../../org/apache/mesos/SchedulerDriver.html#launchTasks(java.util.Collection,%20java.util.Collection,%20org.apache.mesos.Protos.Filters)"><code>launchTasks(java.util.Collection<org.apache.mesos.Protos.OfferID>, java.util.Collection<org.apache.mesos.Protos.TaskInfo>, org.apache.mesos.Protos.Filters)</code></a>). This enables the framework to receive offers |
| from those filtered slaves.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos"><code>Protos.Status</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="suppressOffers()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>suppressOffers</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> suppressOffers()</pre> |
| <div class="block">Inform Mesos master to stop sending offers to the framework. The |
| scheduler should call reviveOffers() to resume getting offers.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos"><code>Protos.Status</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="acknowledgeStatusUpdate(org.apache.mesos.Protos.TaskStatus)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>acknowledgeStatusUpdate</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> acknowledgeStatusUpdate(<a href="../../../org/apache/mesos/Protos.TaskStatus.html" title="class in org.apache.mesos">Protos.TaskStatus</a> status)</pre> |
| <div class="block">Acknowledges the status update. This should only be called |
| once the status update is processed durably by the scheduler. |
| Not that explicit acknowledgements must be requested via the |
| constructor argument, otherwise a call to this method will |
| cause the driver to crash.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>status</code> - The status to acknowledge.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.TaskStatus.html" title="class in org.apache.mesos"><code>Protos.TaskStatus</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="sendFrameworkMessage(org.apache.mesos.Protos.ExecutorID, org.apache.mesos.Protos.SlaveID, byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendFrameworkMessage</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> sendFrameworkMessage(<a href="../../../org/apache/mesos/Protos.ExecutorID.html" title="class in org.apache.mesos">Protos.ExecutorID</a> executorId, |
| <a href="../../../org/apache/mesos/Protos.SlaveID.html" title="class in org.apache.mesos">Protos.SlaveID</a> slaveId, |
| byte[] data)</pre> |
| <div class="block">Sends a message from the framework to one of its executors. These |
| messages are best effort; do not expect a framework message to be |
| retransmitted in any reliable fashion.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>executorId</code> - The ID of the executor to send the message to.</dd><dd><code>slaveId</code> - The ID of the slave that is running the executor.</dd><dd><code>data</code> - The message.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.ExecutorID.html" title="class in org.apache.mesos"><code>Protos.ExecutorID</code></a>, |
| <a href="../../../org/apache/mesos/Protos.SlaveID.html" title="class in org.apache.mesos"><code>Protos.SlaveID</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="reconcileTasks(java.util.Collection)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>reconcileTasks</h4> |
| <pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a> reconcileTasks(java.util.Collection<<a href="../../../org/apache/mesos/Protos.TaskStatus.html" title="class in org.apache.mesos">Protos.TaskStatus</a>> statuses)</pre> |
| <div class="block">Allows the framework to query the status for non-terminal tasks. |
| This causes the master to send back the latest task status for |
| each task in 'statuses', if possible. Tasks that are no longer |
| known will result in a TASK_LOST update. If statuses is empty, |
| then the master will send the latest status for each task |
| currently known.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>statuses</code> - The collection of non-terminal TaskStatuses to reconcile.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The state of the driver after the call.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/mesos/Protos.TaskStatus.html" title="class in org.apache.mesos"><code>Protos.TaskStatus</code></a>, |
| <a href="../../../org/apache/mesos/Protos.SlaveID.html" title="class in org.apache.mesos"><code>Protos.SlaveID</code></a></dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../org/apache/mesos/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</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">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../org/apache/mesos/Scheduler.html" title="interface in org.apache.mesos"><span class="strong">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/apache/mesos/SchedulerDriver.html" target="_top">Frames</a></li> |
| <li><a href="SchedulerDriver.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |