blob: 2dd1a48160259cdfcef7e665ba8e2a31c7711157 [file]
<!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_111) on Wed Nov 16 18:36:36 UTC 2016 -->
<title>ExecutorDriver</title>
<meta name="date" content="2016-11-16">
<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="ExecutorDriver";
}
//-->
</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/Executor.html" title="interface in org.apache.mesos"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/mesos/Log.html" title="class in org.apache.mesos"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/mesos/ExecutorDriver.html" target="_top">Frames</a></li>
<li><a href="ExecutorDriver.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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 ExecutorDriver" class="title">Interface ExecutorDriver</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/MesosExecutorDriver.html" title="class in org.apache.mesos">MesosExecutorDriver</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">ExecutorDriver</span></pre>
<div class="block">Abstract interface for connecting an executor to Mesos. This
interface is used both to manage the executor's lifecycle (start
it, stop it, or wait for it to finish) and to interact with Mesos
(e.g., send status updates, send framework messages, 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">&nbsp;</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/ExecutorDriver.html#abort()">abort</a></strong>()</code>
<div class="block">Aborts the driver so that no more callbacks can be made to the
executor.</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/ExecutorDriver.html#join()">join</a></strong>()</code>
<div class="block">Waits for the driver to be stopped or aborted, possibly
_blocking_ 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/ExecutorDriver.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/ExecutorDriver.html#sendFrameworkMessage(byte[])">sendFrameworkMessage</a></strong>(byte[]&nbsp;data)</code>
<div class="block">Sends a message to the framework scheduler.</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/ExecutorDriver.html#sendStatusUpdate(org.apache.mesos.Protos.TaskStatus)">sendStatusUpdate</a></strong>(<a href="../../../org/apache/mesos/Protos.TaskStatus.html" title="class in org.apache.mesos">Protos.TaskStatus</a>&nbsp;status)</code>
<div class="block">Sends a status update to the framework scheduler, retrying as
necessary until an acknowledgement has been received or the
executor is terminated (in which case, a TASK_LOST status update
will be sent).</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/ExecutorDriver.html#start()">start</a></strong>()</code>
<div class="block">Starts the executor driver.</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/ExecutorDriver.html#stop()">stop</a></strong>()</code>
<div class="block">Stops the executor driver.</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>&nbsp;start()</pre>
<div class="block">Starts the executor 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()">
<!-- -->
</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>&nbsp;stop()</pre>
<div class="block">Stops the executor driver.</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="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>&nbsp;abort()</pre>
<div class="block">Aborts the driver so that no more callbacks can be made to the
executor. 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/ExecutorDriver.html#join()"><code>join()</code></a>, see below),
and instantiate and start another driver if desired (from within
the same process ... although this functionality is currently not
supported for executors).</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="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>&nbsp;join()</pre>
<div class="block">Waits for the driver to be stopped or aborted, possibly
_blocking_ 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><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="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>&nbsp;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><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="sendStatusUpdate(org.apache.mesos.Protos.TaskStatus)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendStatusUpdate</h4>
<pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a>&nbsp;sendStatusUpdate(<a href="../../../org/apache/mesos/Protos.TaskStatus.html" title="class in org.apache.mesos">Protos.TaskStatus</a>&nbsp;status)</pre>
<div class="block">Sends a status update to the framework scheduler, retrying as
necessary until an acknowledgement has been received or the
executor is terminated (in which case, a TASK_LOST status update
will be sent). See <a href="../../../org/apache/mesos/Scheduler.html#statusUpdate(org.apache.mesos.SchedulerDriver,%20org.apache.mesos.Protos.TaskStatus)"><code>Scheduler.statusUpdate(org.apache.mesos.SchedulerDriver, org.apache.mesos.Protos.TaskStatus)</code></a> for more
information about status update acknowledgements.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>status</code> - The status update to send.</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="sendFrameworkMessage(byte[])">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>sendFrameworkMessage</h4>
<pre><a href="../../../org/apache/mesos/Protos.Status.html" title="enum in org.apache.mesos">Protos.Status</a>&nbsp;sendFrameworkMessage(byte[]&nbsp;data)</pre>
<div class="block">Sends a message to the framework scheduler. 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>data</code> - The message payload.</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>
</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/Executor.html" title="interface in org.apache.mesos"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/mesos/Log.html" title="class in org.apache.mesos"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/mesos/ExecutorDriver.html" target="_top">Frames</a></li>
<li><a href="ExecutorDriver.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>