| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <META NAME="ROBOTS" CONTENT="NOINDEX"> |
| <link rel="canonical" href="https://ignite.apache.org/releases/1.6.0/dotnetdoc/interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_task.html" /> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.9.1"/> |
| <title>Apache Ignite.NET: Apache.Ignite.Core.Compute.IComputeTask< in in TArg, TJobRes, out out TRes > Interface Template Reference</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="resize.js"></script> |
| <script type="text/javascript" src="navtreedata.js"></script> |
| <script type="text/javascript" src="navtree.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(initResizable); |
| $(window).load(resizeHeight); |
| </script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-61232409-1', 'auto'); |
| ga('send', 'pageview'); |
| |
| </script></head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <td id="projectlogo"><img alt="Logo" src="ignite_logo.png"/></td> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname">Apache Ignite.NET |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.9.1 --> |
| </div><!-- top --> |
| <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| <div id="nav-tree"> |
| <div id="nav-tree-contents"> |
| <div id="nav-sync" class="sync"></div> |
| </div> |
| </div> |
| <div id="splitbar" style="-moz-user-select:none;" |
| class="ui-resizable-handle"> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| $(document).ready(function(){initNavTree('interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_task.html','');}); |
| </script> |
| <div id="doc-content"> |
| <div class="header"> |
| <div class="headertitle"> |
| <div class="title">Apache.Ignite.Core.Compute.IComputeTask< in in TArg, TJobRes, out out TRes > Interface Template Reference</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p>Ignite task interface defines a task that can be executed on the grid. Ignite task is responsible for splitting business logic into multiple Ignite jobs, receiving results from individual Ignite jobs executing on remote nodes, and reducing (aggregating) received jobs' results into final Ignite task result. |
| <a href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_task.html#details">More...</a></p> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><p>Upon request to execute a task, the system will do the following: </p><ul> |
| <li> |
| Inject annotated resources into task instance. </li> |
| <li> |
| Apply Map. This method is responsible for splitting business logic into multiple jobs (units of execution) and mapping them to Ignite nodes. </li> |
| <li> |
| System will send mapped Ignite jobs to their respective nodes. </li> |
| <li> |
| <p class="startli">Once job execution results become available, OnResult method will be called for ech received job result. The policy returned by this method will determine the way task reacts to every job result. </p> |
| <p>If ComputeJobResultPolicy.Wait is returned, task will continue to wait for other job results. If this result is the last job result, then reduce phase will be started. </p> |
| <p>If ComputeJobResultPolicy.Reduce is returned, reduce phase will be started right away without waiting for other jobs completion (all remaining jobs will receive cancel request). </p> |
| <p class="endli">If ComputeJobResultPolicy.Failover is returned, job will be failed over to another node for execution. Note that if you use ComputeTaskAdapter<A,T,R>, it will automatically fail jobs to another node for 2 well-known failure cases: 1) job has failed to due to node crash (in this case <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job_result.html#ad2a1d34a14fffbb39d0bb82f93d8a09a" title="Gets exception produced by execution of remote job, or null if no exception was produced. ">IComputeJobResult<T>.Exception()</a> will return ClusterTopologyException); 2) job execution was rejected, i.e. remote node has cancelled job before it got a chance to execute, while it still was on the waiting list. (in this case <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job_result.html#ad2a1d34a14fffbb39d0bb82f93d8a09a" title="Gets exception produced by execution of remote job, or null if no exception was produced. ">IComputeJobResult<T>.Exception()</a> will return <a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_execution_rejected_exception.html" title="Indicates a situation when execution service provided by the user in configuration rejects execution...">ComputeExecutionRejectedException</a>). </p> |
| </li> |
| <li> |
| Once all results are received or OnResult method returned ComputeJobResultPolicy.Reduce policy, method <a class="el" href="namespace_apache_1_1_ignite_1_1_core_1_1_compute.html#a630d59e56d9558cb537c357c2b2f3fdcaec4875f03ff0bb0b26cf76ac7f41e3c8" title="Ignore all not yet received results and start reducing results. ">Reduce</a> is called to aggregate received results into one final result. Once this method is finished the execution of the Ignite task is complete. This result will be returned to the user through future. </li> |
| </ul> |
| <dl class="tparams"><dt>Template Parameters</dt><dd> |
| <table class="tparams"> |
| <tr><td class="paramname">TArg</td><td>Argument type.</td></tr> |
| <tr><td class="paramname">TJobRes</td><td>Type of job result.</td></tr> |
| <tr><td class="paramname">TRes</td><td>Type of final task result after reduce.</td></tr> |
| </table> |
| </dd> |
| </dl> |
| </div></div><!-- contents --> |
| </div><!-- doc-content --> |
| <!-- start footer part --> |
| <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| <ul> |
| <li class="navelem"><a class="el" href="namespace_apache.html">Apache</a></li><li class="navelem"><a class="el" href="namespace_apache_1_1_ignite.html">Ignite</a></li><li class="navelem"><a class="el" href="namespace_apache_1_1_ignite_1_1_core.html">Core</a></li><li class="navelem"><a class="el" href="namespace_apache_1_1_ignite_1_1_core_1_1_compute.html">Compute</a></li><li class="navelem"><a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_task.html">IComputeTask</a></li> |
| <li class="footer">Generated on Wed May 18 2016 16:44:13 for Apache Ignite.NET by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li> |
| </ul> |
| </div> |
| </body> |
| </html> |