| <!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 (1.8.0_312) on Mon Jul 11 16:23:51 UTC 2022 --> |
| <title>ExecutorPlugin (Spark 3.2.2 JavaDoc)</title> |
| <meta name="date" content="2022-07-11"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ExecutorPlugin (Spark 3.2.2 JavaDoc)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":18,"i1":18,"i2":18,"i3":18,"i4":18}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],16:["t5","Default Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="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/spark/api/plugin/DriverPlugin.html" title="interface in org.apache.spark.api.plugin"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/spark/api/plugin/PluginContext.html" title="interface in org.apache.spark.api.plugin"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/spark/api/plugin/ExecutorPlugin.html" target="_top">Frames</a></li> |
| <li><a href="ExecutorPlugin.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.spark.api.plugin</div> |
| <h2 title="Interface ExecutorPlugin" class="title">Interface ExecutorPlugin</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>@DeveloperApi |
| public interface <span class="typeNameLabel">ExecutorPlugin</span></pre> |
| <div class="block">:: DeveloperApi :: |
| Executor component of a <a href="../../../../../org/apache/spark/api/plugin/SparkPlugin.html" title="interface in org.apache.spark.api.plugin"><code>SparkPlugin</code></a>.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.0.0</dd> |
| </dl> |
| </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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>default void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/api/plugin/ExecutorPlugin.html#init-org.apache.spark.api.plugin.PluginContext-java.util.Map-">init</a></span>(<a href="../../../../../org/apache/spark/api/plugin/PluginContext.html" title="interface in org.apache.spark.api.plugin">PluginContext</a> ctx, |
| java.util.Map<String,String> extraConf)</code> |
| <div class="block">Initialize the executor plugin.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>default void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/api/plugin/ExecutorPlugin.html#onTaskFailed-org.apache.spark.TaskFailedReason-">onTaskFailed</a></span>(<a href="../../../../../org/apache/spark/TaskFailedReason.html" title="interface in org.apache.spark">TaskFailedReason</a> failureReason)</code> |
| <div class="block">Perform an action after tasks completes with exceptions.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>default void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/api/plugin/ExecutorPlugin.html#onTaskStart--">onTaskStart</a></span>()</code> |
| <div class="block">Perform any action before the task is run.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>default void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/api/plugin/ExecutorPlugin.html#onTaskSucceeded--">onTaskSucceeded</a></span>()</code> |
| <div class="block">Perform an action after tasks completes without exceptions.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>default void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/api/plugin/ExecutorPlugin.html#shutdown--">shutdown</a></span>()</code> |
| <div class="block">Clean up and terminate this plugin.</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="init-org.apache.spark.api.plugin.PluginContext-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>init</h4> |
| <pre>default void init(<a href="../../../../../org/apache/spark/api/plugin/PluginContext.html" title="interface in org.apache.spark.api.plugin">PluginContext</a> ctx, |
| java.util.Map<String,String> extraConf)</pre> |
| <div class="block">Initialize the executor plugin. |
| <p> |
| When a Spark plugin provides an executor plugin, this method will be called during the |
| initialization of the executor process. It will block executor initialization until it |
| returns. |
| <p> |
| Executor plugins that publish metrics should register all metrics with the context's |
| registry (<a href="../../../../../org/apache/spark/api/plugin/PluginContext.html#metricRegistry--"><code>PluginContext.metricRegistry()</code></a>) when this method is called. Metrics |
| registered afterwards are not guaranteed to show up.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ctx</code> - Context information for the executor where the plugin is running.</dd> |
| <dd><code>extraConf</code> - Extra configuration provided by the driver component during its |
| initialization.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="shutdown--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>shutdown</h4> |
| <pre>default void shutdown()</pre> |
| <div class="block">Clean up and terminate this plugin. |
| <p> |
| This method is called during the executor shutdown phase, and blocks executor shutdown.</div> |
| </li> |
| </ul> |
| <a name="onTaskStart--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onTaskStart</h4> |
| <pre>default void onTaskStart()</pre> |
| <div class="block">Perform any action before the task is run. |
| <p> |
| This method is invoked from the same thread the task will be executed. |
| Task-specific information can be accessed via <a href="../../../../../org/apache/spark/TaskContext.html#get--"><code>TaskContext.get()</code></a>. |
| <p> |
| Plugin authors should avoid expensive operations here, as this method will be called |
| on every task, and doing something expensive can significantly slow down a job. |
| It is not recommended for a user to call a remote service, for example. |
| <p> |
| Exceptions thrown from this method do not propagate - they're caught, |
| logged, and suppressed. Therefore exceptions when executing this method won't |
| make the job fail.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="onTaskSucceeded--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onTaskSucceeded</h4> |
| <pre>default void onTaskSucceeded()</pre> |
| <div class="block">Perform an action after tasks completes without exceptions. |
| <p> |
| As <a href="../../../../../org/apache/spark/api/plugin/ExecutorPlugin.html#onTaskStart--"><code>onTaskStart</code></a> exceptions are suppressed, this method |
| will still be invoked even if the corresponding <a href="../../../../../org/apache/spark/api/plugin/ExecutorPlugin.html#onTaskStart--"><code>onTaskStart()</code></a> call for this |
| task failed. |
| <p> |
| Same warnings of <a href="../../../../../org/apache/spark/api/plugin/ExecutorPlugin.html#onTaskStart--"><code>onTaskStart</code></a> apply here.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="onTaskFailed-org.apache.spark.TaskFailedReason-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>onTaskFailed</h4> |
| <pre>default void onTaskFailed(<a href="../../../../../org/apache/spark/TaskFailedReason.html" title="interface in org.apache.spark">TaskFailedReason</a> failureReason)</pre> |
| <div class="block">Perform an action after tasks completes with exceptions. |
| <p> |
| Same warnings of <a href="../../../../../org/apache/spark/api/plugin/ExecutorPlugin.html#onTaskStart--"><code>onTaskStart</code></a> apply here.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>failureReason</code> - the exception thrown from the failed task.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.1.0</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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="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/spark/api/plugin/DriverPlugin.html" title="interface in org.apache.spark.api.plugin"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/spark/api/plugin/PluginContext.html" title="interface in org.apache.spark.api.plugin"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/spark/api/plugin/ExecutorPlugin.html" target="_top">Frames</a></li> |
| <li><a href="ExecutorPlugin.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 ======= --> |
| <script defer="defer" type="text/javascript" src="../../../../../lib/jquery.js"></script><script defer="defer" type="text/javascript" src="../../../../../lib/api-javadocs.js"></script></body> |
| </html> |