blob: 088aed0039ad5c23c9f4b417cad6b79515edb39e [file] [log] [blame]
<!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_40) on Thu Jul 20 13:18:18 PDT 2017 -->
<title>Task (gobblin-runtime 0.11.0 API)</title>
<meta name="date" content="2017-07-20">
<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="Task (gobblin-runtime 0.11.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":9,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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="../../gobblin/runtime/StreamModelTaskRunner.html" title="class in gobblin.runtime"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../gobblin/runtime/TaskConfigurationKeys.html" title="class in gobblin.runtime"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?gobblin/runtime/Task.html" target="_top">Frames</a></li>
<li><a href="Task.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All&nbsp;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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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">gobblin.runtime</div>
<h2 title="Class Task" class="title">Class Task</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>gobblin.runtime.Task</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../gobblin/runtime/task/TaskIFaceWrapper.html" title="class in gobblin.runtime.task">TaskIFaceWrapper</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">Task</span>
extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a></pre>
<div class="block">A physical unit of execution for a Gobblin <a href="http://linkedin.github.io/gobblin/javadoc/0.11.0/gobblin-api/gobblin/source/workunit/WorkUnit.html?is-external=true" title="class or interface in gobblin.source.workunit"><code>WorkUnit</code></a>.
<p>
Each task is executed by a single thread in a thread pool managed by the <a href="../../gobblin/runtime/TaskExecutor.html" title="class in gobblin.runtime"><code>TaskExecutor</code></a>
and each <a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork"><code>Fork</code></a> of the task is executed in a separate thread pool also managed by the
<a href="../../gobblin/runtime/TaskExecutor.html" title="class in gobblin.runtime"><code>TaskExecutor</code></a>.
Each <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a> consists of the following steps:
<ul>
<li>Extracting, converting, and forking the source schema.</li>
<li>Extracting, converting, doing row-level quality checking, and forking each data record.</li>
<li>Putting each forked record into the record queue managed by each <a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork"><code>Fork</code></a>.</li>
<li>Committing output data of each <a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork"><code>Fork</code></a> once all <a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork"><code>Fork</code></a>s finish.</li>
<li>Cleaning up and exiting.</li>
</ul>
Each <a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork"><code>Fork</code></a> consists of the following steps:
<ul>
<li>Getting the next record off the record queue.</li>
<li>Converting the record and doing row-level quality checking if applicable.</li>
<li>Writing the record out if it passes the quality checking.</li>
<li>Cleaning up and exiting once all the records have been processed.</li>
</ul>
</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#Task-gobblin.runtime.TaskContext-gobblin.runtime.TaskStateTracker-gobblin.runtime.TaskExecutor-com.google.common.base.Optional-">Task</a></span>(<a href="../../gobblin/runtime/TaskContext.html" title="class in gobblin.runtime">TaskContext</a>&nbsp;context,
<a href="../../gobblin/runtime/TaskStateTracker.html" title="interface in gobblin.runtime">TaskStateTracker</a>&nbsp;taskStateTracker,
<a href="../../gobblin/runtime/TaskExecutor.html" title="class in gobblin.runtime">TaskExecutor</a>&nbsp;taskExecutor,
<a href="http://google.github.io/guava/releases/15.0/api/docs/com/google/common/base/Optional.html?is-external=true" title="class or interface in com.google.common.base">Optional</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CountDownLatch.html?is-external=true" title="class or interface in java.util.concurrent">CountDownLatch</a>&gt;&nbsp;countDownLatch)</code>
<div class="block">Instantiate a new <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== 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">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#areSingleBranchTasksSynchronous-gobblin.runtime.TaskContext-">areSingleBranchTasksSynchronous</a></span>(<a href="../../gobblin/runtime/TaskContext.html" title="class in gobblin.runtime">TaskContext</a>&nbsp;taskContext)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#awaitShutdown-long-">awaitShutdown</a></span>(long&nbsp;timeoutInMillis)</code>
<div class="block">Block until the task finishes shutting down.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#commit--">commit</a></span>()</code>
<div class="block">Commit this task by doing the following things:
1.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#configureStreamingFork-gobblin.runtime.fork.Fork-java.lang.String-">configureStreamingFork</a></span>(<a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork">Fork</a>&nbsp;fork,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;watermarkingStrategy)</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="http://linkedin.github.io/gobblin/javadoc/0.11.0/gobblin-api/gobblin/configuration/State.html?is-external=true" title="class or interface in gobblin.configuration">State</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getExecutionMetadata--">getExecutionMetadata</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../../gobblin/runtime/ExecutionModel.html" title="enum in gobblin.runtime">ExecutionModel</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getExecutionModel-gobblin.configuration.State-">getExecutionModel</a></span>(<a href="http://linkedin.github.io/gobblin/javadoc/0.11.0/gobblin-api/gobblin/configuration/State.html?is-external=true" title="class or interface in gobblin.configuration">State</a>&nbsp;state)</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://google.github.io/guava/releases/15.0/api/docs/com/google/common/base/Optional.html?is-external=true" title="class or interface in com.google.common.base">Optional</a>&lt;<a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork">Fork</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getForks--">getForks</a></span>()</code>
<div class="block">Get the list of <a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork"><code>Fork</code></a>s created by this <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getJobId--">getJobId</a></span>()</code>
<div class="block">Get the ID of the job this <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a> belongs to.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="http://linkedin.github.io/gobblin/javadoc/0.11.0/gobblin-api/gobblin/configuration/State.html?is-external=true" title="class or interface in gobblin.configuration">State</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getPersistentState--">getPersistentState</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getProgress--">getProgress</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getRetryCount--">getRetryCount</a></span>()</code>
<div class="block">Get the number of times this task has been retried.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../gobblin/runtime/TaskContext.html" title="class in gobblin.runtime">TaskContext</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getTaskContext--">getTaskContext</a></span>()</code>
<div class="block">Get the <a href="../../gobblin/runtime/TaskContext.html" title="class in gobblin.runtime"><code>TaskContext</code></a> associated with this task.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getTaskId--">getTaskId</a></span>()</code>
<div class="block">Get the ID of this task.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getTaskKey--">getTaskKey</a></span>()</code>
<div class="block">Get the key of this task.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../gobblin/runtime/TaskState.html" title="class in gobblin.runtime">TaskState</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getTaskState--">getTaskState</a></span>()</code>
<div class="block">Get the state of this task.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="http://linkedin.github.io/gobblin/javadoc/0.11.0/gobblin-api/gobblin/configuration/WorkUnitState.WorkingState.html?is-external=true" title="class or interface in gobblin.configuration">WorkUnitState.WorkingState</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#getWorkingState--">getWorkingState</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#incrementRetryCount--">incrementRetryCount</a></span>()</code>
<div class="block">Increment the retry count of this task.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#isSpeculativeExecutionSafe--">isSpeculativeExecutionSafe</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#isStreamingTask--">isStreamingTask</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#markTaskCompletion--">markTaskCompletion</a></span>()</code>
<div class="block">Mark the completion of this <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a>.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#onRecordExtract--">onRecordExtract</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#run--">run</a></span>()</code>
<div class="block">Execute the bulk of the work for this task.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#shutdown--">shutdown</a></span>()</code>
<div class="block">Prematurely shutdown the task.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#submitTaskCommittedEvent--">submitTaskCommittedEvent</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#updateByteMetrics--">updateByteMetrics</a></span>()</code>
<div class="block">Update byte-level metrics.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../gobblin/runtime/Task.html#updateRecordMetrics--">updateRecordMetrics</a></span>()</code>
<div class="block">Update record-level metrics.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Task-gobblin.runtime.TaskContext-gobblin.runtime.TaskStateTracker-gobblin.runtime.TaskExecutor-com.google.common.base.Optional-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Task</h4>
<pre>public&nbsp;Task(<a href="../../gobblin/runtime/TaskContext.html" title="class in gobblin.runtime">TaskContext</a>&nbsp;context,
<a href="../../gobblin/runtime/TaskStateTracker.html" title="interface in gobblin.runtime">TaskStateTracker</a>&nbsp;taskStateTracker,
<a href="../../gobblin/runtime/TaskExecutor.html" title="class in gobblin.runtime">TaskExecutor</a>&nbsp;taskExecutor,
<a href="http://google.github.io/guava/releases/15.0/api/docs/com/google/common/base/Optional.html?is-external=true" title="class or interface in com.google.common.base">Optional</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CountDownLatch.html?is-external=true" title="class or interface in java.util.concurrent">CountDownLatch</a>&gt;&nbsp;countDownLatch)</pre>
<div class="block">Instantiate a new <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - a <a href="../../gobblin/runtime/TaskContext.html" title="class in gobblin.runtime"><code>TaskContext</code></a> containing all necessary information to construct and run a <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a></dd>
<dd><code>taskStateTracker</code> - a <a href="../../gobblin/runtime/TaskStateTracker.html" title="interface in gobblin.runtime"><code>TaskStateTracker</code></a> for tracking task state</dd>
<dd><code>taskExecutor</code> - a <a href="../../gobblin/runtime/TaskExecutor.html" title="class in gobblin.runtime"><code>TaskExecutor</code></a> for executing the <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a> and its <a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork"><code>Fork</code></a>s</dd>
<dd><code>countDownLatch</code> - an optional <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CountDownLatch.html?is-external=true" title="class or interface in java.util.concurrent"><code>CountDownLatch</code></a> used to signal the task completion</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getExecutionModel-gobblin.configuration.State-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExecutionModel</h4>
<pre>public static&nbsp;<a href="../../gobblin/runtime/ExecutionModel.html" title="enum in gobblin.runtime">ExecutionModel</a>&nbsp;getExecutionModel(<a href="http://linkedin.github.io/gobblin/javadoc/0.11.0/gobblin-api/gobblin/configuration/State.html?is-external=true" title="class or interface in gobblin.configuration">State</a>&nbsp;state)</pre>
</li>
</ul>
<a name="areSingleBranchTasksSynchronous-gobblin.runtime.TaskContext-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>areSingleBranchTasksSynchronous</h4>
<pre>protected&nbsp;boolean&nbsp;areSingleBranchTasksSynchronous(<a href="../../gobblin/runtime/TaskContext.html" title="class in gobblin.runtime">TaskContext</a>&nbsp;taskContext)</pre>
</li>
</ul>
<a name="isStreamingTask--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isStreamingTask</h4>
<pre>protected&nbsp;boolean&nbsp;isStreamingTask()</pre>
</li>
</ul>
<a name="awaitShutdown-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>awaitShutdown</h4>
<pre>public&nbsp;boolean&nbsp;awaitShutdown(long&nbsp;timeoutInMillis)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html#awaitShutdown-long-">TaskIFace</a></code></span></div>
<div class="block">Block until the task finishes shutting down. This method is guaranteed to only be called after <a href="../../gobblin/runtime/task/TaskIFace.html#shutdown--"><code>TaskIFace.shutdown()</code></a>
is called.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../gobblin/runtime/task/TaskIFace.html#awaitShutdown-long-">awaitShutdown</a></code>&nbsp;in interface&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timeoutInMillis</code> - The method should return after this many millis regardless of the shutdown of the task.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the task shut down correctly.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd>
</dl>
</li>
</ul>
<a name="shutdown--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shutdown</h4>
<pre>public&nbsp;void&nbsp;shutdown()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html#shutdown--">TaskIFace</a></code></span></div>
<div class="block">Prematurely shutdown the task.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../gobblin/runtime/task/TaskIFace.html#shutdown--">shutdown</a></code>&nbsp;in interface&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a></code></dd>
</dl>
</li>
</ul>
<a name="getProgress--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProgress</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getProgress()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../gobblin/runtime/task/TaskIFace.html#getProgress--">getProgress</a></code>&nbsp;in interface&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string describing the progress of this task.</dd>
</dl>
</li>
</ul>
<a name="run--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>run</h4>
<pre>public&nbsp;void&nbsp;run()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html#run--">TaskIFace</a></code></span></div>
<div class="block">Execute the bulk of the work for this task. Due to possible speculative execution, all operations in this method
should be attempt-isolated.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../gobblin/runtime/task/TaskIFace.html#run--">run</a></code>&nbsp;in interface&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true#run--" title="class or interface in java.lang">run</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></dd>
</dl>
</li>
</ul>
<a name="configureStreamingFork-gobblin.runtime.fork.Fork-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>configureStreamingFork</h4>
<pre>protected&nbsp;void&nbsp;configureStreamingFork(<a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork">Fork</a>&nbsp;fork,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;watermarkingStrategy)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="onRecordExtract--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onRecordExtract</h4>
<pre>protected&nbsp;void&nbsp;onRecordExtract()</pre>
</li>
</ul>
<a name="getJobId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJobId</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getJobId()</pre>
<div class="block">Get the ID of the job this <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a> belongs to.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>ID of the job this <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a> belongs to.</dd>
</dl>
</li>
</ul>
<a name="getTaskId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTaskId</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getTaskId()</pre>
<div class="block">Get the ID of this task.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>ID of this task</dd>
</dl>
</li>
</ul>
<a name="getTaskKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTaskKey</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getTaskKey()</pre>
<div class="block">Get the key of this task.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Key of this task</dd>
</dl>
</li>
</ul>
<a name="getTaskContext--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTaskContext</h4>
<pre>public&nbsp;<a href="../../gobblin/runtime/TaskContext.html" title="class in gobblin.runtime">TaskContext</a>&nbsp;getTaskContext()</pre>
<div class="block">Get the <a href="../../gobblin/runtime/TaskContext.html" title="class in gobblin.runtime"><code>TaskContext</code></a> associated with this task.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../gobblin/runtime/TaskContext.html" title="class in gobblin.runtime"><code>TaskContext</code></a> associated with this task</dd>
</dl>
</li>
</ul>
<a name="getTaskState--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTaskState</h4>
<pre>public&nbsp;<a href="../../gobblin/runtime/TaskState.html" title="class in gobblin.runtime">TaskState</a>&nbsp;getTaskState()</pre>
<div class="block">Get the state of this task.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>state of this task</dd>
</dl>
</li>
</ul>
<a name="getPersistentState--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPersistentState</h4>
<pre>public&nbsp;<a href="http://linkedin.github.io/gobblin/javadoc/0.11.0/gobblin-api/gobblin/configuration/State.html?is-external=true" title="class or interface in gobblin.configuration">State</a>&nbsp;getPersistentState()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../gobblin/runtime/task/TaskIFace.html#getPersistentState--">getPersistentState</a></code>&nbsp;in interface&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The persistent state for this task. This is the state that will be available in the next Gobblin execution.</dd>
</dl>
</li>
</ul>
<a name="getExecutionMetadata--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExecutionMetadata</h4>
<pre>public&nbsp;<a href="http://linkedin.github.io/gobblin/javadoc/0.11.0/gobblin-api/gobblin/configuration/State.html?is-external=true" title="class or interface in gobblin.configuration">State</a>&nbsp;getExecutionMetadata()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../gobblin/runtime/task/TaskIFace.html#getExecutionMetadata--">getExecutionMetadata</a></code>&nbsp;in interface&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The metadata corresponding to this task execution. This metadata will be available to the publisher and may
be viewable by the user, but may not be stored for the next Gobblin execution.</dd>
</dl>
</li>
</ul>
<a name="getWorkingState--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWorkingState</h4>
<pre>public&nbsp;<a href="http://linkedin.github.io/gobblin/javadoc/0.11.0/gobblin-api/gobblin/configuration/WorkUnitState.WorkingState.html?is-external=true" title="class or interface in gobblin.configuration">WorkUnitState.WorkingState</a>&nbsp;getWorkingState()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../gobblin/runtime/task/TaskIFace.html#getWorkingState--">getWorkingState</a></code>&nbsp;in interface&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The current working state of the task.</dd>
</dl>
</li>
</ul>
<a name="getForks--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getForks</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://google.github.io/guava/releases/15.0/api/docs/com/google/common/base/Optional.html?is-external=true" title="class or interface in com.google.common.base">Optional</a>&lt;<a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork">Fork</a>&gt;&gt;&nbsp;getForks()</pre>
<div class="block">Get the list of <a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork"><code>Fork</code></a>s created by this <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the list of <a href="../../gobblin/runtime/fork/Fork.html" title="class in gobblin.runtime.fork"><code>Fork</code></a>s created by this <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a></dd>
</dl>
</li>
</ul>
<a name="updateRecordMetrics--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateRecordMetrics</h4>
<pre>public&nbsp;void&nbsp;updateRecordMetrics()</pre>
<div class="block">Update record-level metrics.</div>
</li>
</ul>
<a name="updateByteMetrics--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateByteMetrics</h4>
<pre>public&nbsp;void&nbsp;updateByteMetrics()</pre>
<div class="block">Update byte-level metrics.
<p>
This method is only supposed to be called after the writer commits.
</p></div>
</li>
</ul>
<a name="incrementRetryCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>incrementRetryCount</h4>
<pre>public&nbsp;void&nbsp;incrementRetryCount()</pre>
<div class="block">Increment the retry count of this task.</div>
</li>
</ul>
<a name="getRetryCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRetryCount</h4>
<pre>public&nbsp;int&nbsp;getRetryCount()</pre>
<div class="block">Get the number of times this task has been retried.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of times this task has been retried</dd>
</dl>
</li>
</ul>
<a name="markTaskCompletion--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>markTaskCompletion</h4>
<pre>public&nbsp;void&nbsp;markTaskCompletion()</pre>
<div class="block">Mark the completion of this <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a>.</div>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="commit--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>commit</h4>
<pre>public&nbsp;void&nbsp;commit()</pre>
<div class="block">Commit this task by doing the following things:
1. Committing each fork by <a href="../../gobblin/runtime/fork/Fork.html#commit--"><code>Fork.commit()</code></a>.
2. Update final state of construct in <a href="../../gobblin/runtime/Task.html#taskState"><code>taskState</code></a>.
3. Check whether to publish data in task.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../gobblin/runtime/task/TaskIFace.html#commit--">commit</a></code>&nbsp;in interface&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a></code></dd>
</dl>
</li>
</ul>
<a name="submitTaskCommittedEvent--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>submitTaskCommittedEvent</h4>
<pre>protected&nbsp;void&nbsp;submitTaskCommittedEvent()</pre>
</li>
</ul>
<a name="isSpeculativeExecutionSafe--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isSpeculativeExecutionSafe</h4>
<pre>public&nbsp;boolean&nbsp;isSpeculativeExecutionSafe()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../gobblin/runtime/task/TaskIFace.html#isSpeculativeExecutionSafe--">isSpeculativeExecutionSafe</a></code>&nbsp;in interface&nbsp;<code><a href="../../gobblin/runtime/task/TaskIFace.html" title="interface in gobblin.runtime.task">TaskIFace</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the current <a href="../../gobblin/runtime/Task.html" title="class in gobblin.runtime"><code>Task</code></a> is safe to have duplicate attempts; false, otherwise.</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="../../gobblin/runtime/StreamModelTaskRunner.html" title="class in gobblin.runtime"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../gobblin/runtime/TaskConfigurationKeys.html" title="class in gobblin.runtime"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?gobblin/runtime/Task.html" target="_top">Frames</a></li>
<li><a href="Task.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All&nbsp;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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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>