blob: 351a5112814135a996b817e35211ce0c8bf29af2 [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 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IPartitionedTridentSpout.Emitter (Storm 2.4.0 API)</title>
<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="IPartitionedTridentSpout.Emitter (Storm 2.4.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":18,"i5":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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="class-use/IPartitionedTridentSpout.Emitter.html">Use</a></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/storm/trident/spout/IPartitionedTridentSpout.Coordinator.html" title="interface in org.apache.storm.trident.spout"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/storm/trident/spout/ISpoutPartition.html" title="interface in org.apache.storm.trident.spout"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" target="_top">Frames</a></li>
<li><a href="IPartitionedTridentSpout.Emitter.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>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.storm.trident.spout</div>
<h2 title="Interface IPartitionedTridentSpout.Emitter" class="title">Interface IPartitionedTridentSpout.Emitter&lt;PartitionsT,PartitionT extends <a href="../../../../../org/apache/storm/trident/spout/ISpoutPartition.html" title="interface in org.apache.storm.trident.spout">ISpoutPartition</a>,X&gt;</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/storm/kafka/spout/trident/KafkaTridentTransactionalSpoutEmitter.html" title="class in org.apache.storm.kafka.spout.trident">KafkaTridentTransactionalSpoutEmitter</a>, <a href="../../../../../org/apache/storm/eventhubs/trident/TransactionalTridentEventHubEmitter.html" title="class in org.apache.storm.eventhubs.trident">TransactionalTridentEventHubEmitter</a></dd>
</dl>
<dl>
<dt>Enclosing interface:</dt>
<dd><a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.html" title="interface in org.apache.storm.trident.spout">IPartitionedTridentSpout</a>&lt;<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.html" title="type parameter in IPartitionedTridentSpout">PartitionsT</a>,<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.html" title="type parameter in IPartitionedTridentSpout">PartitionT</a> extends <a href="../../../../../org/apache/storm/trident/spout/ISpoutPartition.html" title="interface in org.apache.storm.trident.spout">ISpoutPartition</a>,<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.html" title="type parameter in IPartitionedTridentSpout">T</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>public static interface <span class="typeNameLabel">IPartitionedTridentSpout.Emitter&lt;PartitionsT,PartitionT extends <a href="../../../../../org/apache/storm/trident/spout/ISpoutPartition.html" title="interface in org.apache.storm.trident.spout">ISpoutPartition</a>,X&gt;</span></pre>
</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">&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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default 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>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html#close--">close</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html#emitPartitionBatch-org.apache.storm.trident.topology.TransactionAttempt-org.apache.storm.trident.operation.TridentCollector-PartitionT-X-">emitPartitionBatch</a></span>(<a href="../../../../../org/apache/storm/trident/topology/TransactionAttempt.html" title="class in org.apache.storm.trident.topology">TransactionAttempt</a>&nbsp;tx,
<a href="../../../../../org/apache/storm/trident/operation/TridentCollector.html" title="interface in org.apache.storm.trident.operation">TridentCollector</a>&nbsp;collector,
<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&nbsp;partition,
<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">X</a>&nbsp;partitionMeta)</code>
<div class="block">Emit a batch of tuples for a partition/transaction that has been emitted before, using the metadata created when it was first emitted.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">X</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html#emitPartitionBatchNew-org.apache.storm.trident.topology.TransactionAttempt-org.apache.storm.trident.operation.TridentCollector-PartitionT-X-">emitPartitionBatchNew</a></span>(<a href="../../../../../org/apache/storm/trident/topology/TransactionAttempt.html" title="class in org.apache.storm.trident.topology">TransactionAttempt</a>&nbsp;tx,
<a href="../../../../../org/apache/storm/trident/operation/TridentCollector.html" title="interface in org.apache.storm.trident.operation">TridentCollector</a>&nbsp;collector,
<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&nbsp;partition,
<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">X</a>&nbsp;lastPartitionMeta)</code>
<div class="block">Emit a batch of tuples for a partition/transaction that&rsquo;s never been emitted before.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html#getOrderedPartitions-PartitionsT-">getOrderedPartitions</a></span>(<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionsT</a>&nbsp;allPartitionInfo)</code>
<div class="block">Sorts given partition info to produce an ordered list of partitions.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>default <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html#getPartitionsForTask-int-int-java.util.List-">getPartitionsForTask</a></span>(int&nbsp;taskId,
int&nbsp;numTasks,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&gt;&nbsp;allPartitionInfoSorted)</code>
<div class="block">Get the partitions assigned to the given task.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html#refreshPartitions-java.util.List-">refreshPartitions</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&gt;&nbsp;partitionResponsibilities)</code>
<div class="block">This method is called when this task is responsible for a new set of partitions.</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="getOrderedPartitions-java.lang.Object-">
<!-- -->
</a><a name="getOrderedPartitions-PartitionsT-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOrderedPartitions</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&gt;&nbsp;getOrderedPartitions(<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionsT</a>&nbsp;allPartitionInfo)</pre>
<div class="block"><p>Sorts given partition info to produce an ordered list of partitions.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>allPartitionInfo</code> - The partition info for all partitions being processed by all spout tasks</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>sorted list of partitions being processed by all the tasks. The ordering must be consistent for all tasks.</dd>
</dl>
</li>
</ul>
<a name="emitPartitionBatchNew-org.apache.storm.trident.topology.TransactionAttempt-org.apache.storm.trident.operation.TridentCollector-org.apache.storm.trident.spout.ISpoutPartition-java.lang.Object-">
<!-- -->
</a><a name="emitPartitionBatchNew-org.apache.storm.trident.topology.TransactionAttempt-org.apache.storm.trident.operation.TridentCollector-PartitionT-X-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>emitPartitionBatchNew</h4>
<pre><a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">X</a>&nbsp;emitPartitionBatchNew(<a href="../../../../../org/apache/storm/trident/topology/TransactionAttempt.html" title="class in org.apache.storm.trident.topology">TransactionAttempt</a>&nbsp;tx,
<a href="../../../../../org/apache/storm/trident/operation/TridentCollector.html" title="interface in org.apache.storm.trident.operation">TridentCollector</a>&nbsp;collector,
<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&nbsp;partition,
<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">X</a>&nbsp;lastPartitionMeta)</pre>
<div class="block"><p>Emit a batch of tuples for a partition/transaction that&rsquo;s never been emitted before. Return the metadata that can be used to reconstruct this partition/batch in the future.</p></div>
</li>
</ul>
<a name="refreshPartitions-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>refreshPartitions</h4>
<pre>void&nbsp;refreshPartitions(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&gt;&nbsp;partitionResponsibilities)</pre>
<div class="block"><p>This method is called when this task is responsible for a new set of partitions. Should be used to manage things like connections to brokers.</p></div>
</li>
</ul>
<a name="emitPartitionBatch-org.apache.storm.trident.topology.TransactionAttempt-org.apache.storm.trident.operation.TridentCollector-org.apache.storm.trident.spout.ISpoutPartition-java.lang.Object-">
<!-- -->
</a><a name="emitPartitionBatch-org.apache.storm.trident.topology.TransactionAttempt-org.apache.storm.trident.operation.TridentCollector-PartitionT-X-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>emitPartitionBatch</h4>
<pre>void&nbsp;emitPartitionBatch(<a href="../../../../../org/apache/storm/trident/topology/TransactionAttempt.html" title="class in org.apache.storm.trident.topology">TransactionAttempt</a>&nbsp;tx,
<a href="../../../../../org/apache/storm/trident/operation/TridentCollector.html" title="interface in org.apache.storm.trident.operation">TridentCollector</a>&nbsp;collector,
<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&nbsp;partition,
<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">X</a>&nbsp;partitionMeta)</pre>
<div class="block"><p>Emit a batch of tuples for a partition/transaction that has been emitted before, using the metadata created when it was first emitted.</p></div>
</li>
</ul>
<a name="getPartitionsForTask-int-int-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartitionsForTask</h4>
<pre>default&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&gt;&nbsp;getPartitionsForTask(int&nbsp;taskId,
int&nbsp;numTasks,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" title="type parameter in IPartitionedTridentSpout.Emitter">PartitionT</a>&gt;&nbsp;allPartitionInfoSorted)</pre>
<div class="block"><p>Get the partitions assigned to the given task.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>taskId</code> - The id of the task</dd>
<dd><code>numTasks</code> - The number of tasks for the spout</dd>
<dd><code>allPartitionInfoSorted</code> - The partition info of all partitions being processed by all spout tasks, sorted according to <a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html#getOrderedPartitions-PartitionsT-"><code>getOrderedPartitions(java.lang.Object)</code></a></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The list of partitions that are to be processed by the task with <code>taskId</code></dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>close</h4>
<pre>void&nbsp;close()</pre>
</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="class-use/IPartitionedTridentSpout.Emitter.html">Use</a></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 class="aboutLanguage"><script type="text/javascript" src="../../../../../highlight.pack.js"></script>
<script type="text/javascript"><!--
hljs.initHighlightingOnLoad();
//--></script></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/storm/trident/spout/IPartitionedTridentSpout.Coordinator.html" title="interface in org.apache.storm.trident.spout"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/storm/trident/spout/ISpoutPartition.html" title="interface in org.apache.storm.trident.spout"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/storm/trident/spout/IPartitionedTridentSpout.Emitter.html" target="_top">Frames</a></li>
<li><a href="IPartitionedTridentSpout.Emitter.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>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 ======= -->
<p class="legalCopy"><small>Copyright &#169; 2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>