blob: 5279ff87edf232251190a4d42f9b77212d960d52 [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:16:31 PDT 2017 -->
<title>KafkaUtils (gobblin-kafka-common 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="KafkaUtils (gobblin-kafka-common 0.11.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/source/extractor/extract/kafka/KafkaTopic.html" title="class in gobblin.source.extractor.extract.kafka"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../gobblin/source/extractor/extract/kafka/MultiLongWatermark.html" title="class in gobblin.source.extractor.extract.kafka"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?gobblin/source/extractor/extract/kafka/KafkaUtils.html" target="_top">Frames</a></li>
<li><a href="KafkaUtils.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.source.extractor.extract.kafka</div>
<h2 title="Class KafkaUtils" class="title">Class KafkaUtils</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.source.extractor.extract.kafka.KafkaUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">KafkaUtils</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></pre>
<div class="block">A Utils class for Kafka.</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/source/extractor/extract/kafka/KafkaUtils.html#KafkaUtils--">KafkaUtils</a></span>()</code>&nbsp;</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="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>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaUtils.html#containsPartitionAvgRecordMillis-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-">containsPartitionAvgRecordMillis</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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition)</code>
<div class="block">Determines whether the given <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"><code>State</code></a> contains "[topicname].[partitionid].avg.record.millis".</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaUtils.html#containsPartitionAvgRecordSize-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-">containsPartitionAvgRecordSize</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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition)</code>
<div class="block">Determines whether the given <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"><code>State</code></a> contains "[topicname].[partitionid].avg.record.size".</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaUtils.html#getPartition-gobblin.configuration.State-">getPartition</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>
<div class="block">Get <a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka"><code>KafkaPartition</code></a> from a <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"><code>State</code></a> object.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaUtils.html#getPartitionAvgRecordMillis-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-">getPartitionAvgRecordMillis</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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition)</code>
<div class="block">Get the average time to pull a record of a partition, which is stored in property
"[topicname].[partitionid].avg.record.millis".</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaUtils.html#getPartitionAvgRecordSize-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-">getPartitionAvgRecordSize</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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition)</code>
<div class="block">Get the average record size of a partition, which is stored in property "[topicname].[partitionid].avg.record.size".</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <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/source/extractor/extract/kafka/KafkaUtils.html#getPartitionPropName-java.lang.String-int-">getPartitionPropName</a></span>(<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;topicName,
int&nbsp;partitionId)</code>
<div class="block">This method returns topicName + '.' + partitionId.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <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="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaUtils.html#getPartitions-gobblin.configuration.State-">getPartitions</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>
<div class="block">Get a list of <a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka"><code>KafkaPartition</code></a>s from a <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"><code>State</code></a> object.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <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/source/extractor/extract/kafka/KafkaUtils.html#getTopicName-gobblin.configuration.State-">getTopicName</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>
<div class="block">Get topic name from a <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"><code>State</code></a> object.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaUtils.html#setPartitionAvgRecordMillis-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-double-">setPartitionAvgRecordMillis</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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition,
double&nbsp;millis)</code>
<div class="block">Set the average time in milliseconds to pull a record of a partition, which will be stored in property
"[topicname].[partitionid].avg.record.millis".</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaUtils.html#setPartitionAvgRecordSize-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-long-">setPartitionAvgRecordSize</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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition,
long&nbsp;size)</code>
<div class="block">Set the average record size of a partition, which will be stored in property
"[topicname].[partitionid].avg.record.size".</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#toString--" title="class or interface in java.lang">toString</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="KafkaUtils--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>KafkaUtils</h4>
<pre>public&nbsp;KafkaUtils()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getTopicName-gobblin.configuration.State-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTopicName</h4>
<pre>public static&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;getTopicName(<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>
<div class="block">Get topic name from a <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"><code>State</code></a> object. The <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"><code>State</code></a> should contain property
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaSource.html#TOPIC_NAME"><code>KafkaSource.TOPIC_NAME</code></a>.</div>
</li>
</ul>
<a name="getPartition-gobblin.configuration.State-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartition</h4>
<pre>public static&nbsp;<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;getPartition(<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>
<div class="block">Get <a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka"><code>KafkaPartition</code></a> from a <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"><code>State</code></a> object. The <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"><code>State</code></a> should contain properties
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaSource.html#TOPIC_NAME"><code>KafkaSource.TOPIC_NAME</code></a>, <a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaSource.html#PARTITION_ID"><code>KafkaSource.PARTITION_ID</code></a>, and may optionally contain
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaSource.html#LEADER_ID"><code>KafkaSource.LEADER_ID</code></a> and <a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaSource.html#LEADER_HOSTANDPORT"><code>KafkaSource.LEADER_HOSTANDPORT</code></a>.</div>
</li>
</ul>
<a name="getPartitions-gobblin.configuration.State-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartitions</h4>
<pre>public static&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="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&gt;&nbsp;getPartitions(<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>
<div class="block">Get a list of <a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka"><code>KafkaPartition</code></a>s from a <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"><code>State</code></a> object. The given <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"><code>State</code></a> should contain property
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaSource.html#TOPIC_NAME"><code>KafkaSource.TOPIC_NAME</code></a>. If there are multiple partitions in the <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"><code>State</code></a>, all partitions should have
the same topic name.
It first checks whether the given <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"><code>State</code></a> contains "partition.id.i", "leader.id.i" and
"leader.hostandport.i", i = 0,1,2,...
Otherwise it will call <a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaUtils.html#getPartition-gobblin.configuration.State-"><code>getPartition(State)</code></a>.</div>
</li>
</ul>
<a name="getPartitionPropName-java.lang.String-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartitionPropName</h4>
<pre>public static&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;getPartitionPropName(<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;topicName,
int&nbsp;partitionId)</pre>
<div class="block">This method returns topicName + '.' + partitionId.</div>
</li>
</ul>
<a name="containsPartitionAvgRecordSize-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsPartitionAvgRecordSize</h4>
<pre>public static&nbsp;boolean&nbsp;containsPartitionAvgRecordSize(<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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition)</pre>
<div class="block">Determines whether the given <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"><code>State</code></a> contains "[topicname].[partitionid].avg.record.size".</div>
</li>
</ul>
<a name="getPartitionAvgRecordSize-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartitionAvgRecordSize</h4>
<pre>public static&nbsp;long&nbsp;getPartitionAvgRecordSize(<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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition)</pre>
<div class="block">Get the average record size of a partition, which is stored in property "[topicname].[partitionid].avg.record.size".
If state doesn't contain this property, it returns defaultSize.</div>
</li>
</ul>
<a name="setPartitionAvgRecordSize-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPartitionAvgRecordSize</h4>
<pre>public static&nbsp;void&nbsp;setPartitionAvgRecordSize(<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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition,
long&nbsp;size)</pre>
<div class="block">Set the average record size of a partition, which will be stored in property
"[topicname].[partitionid].avg.record.size".</div>
</li>
</ul>
<a name="containsPartitionAvgRecordMillis-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsPartitionAvgRecordMillis</h4>
<pre>public static&nbsp;boolean&nbsp;containsPartitionAvgRecordMillis(<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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition)</pre>
<div class="block">Determines whether the given <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"><code>State</code></a> contains "[topicname].[partitionid].avg.record.millis".</div>
</li>
</ul>
<a name="getPartitionAvgRecordMillis-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartitionAvgRecordMillis</h4>
<pre>public static&nbsp;double&nbsp;getPartitionAvgRecordMillis(<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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition)</pre>
<div class="block">Get the average time to pull a record of a partition, which is stored in property
"[topicname].[partitionid].avg.record.millis". If state doesn't contain this property, it returns defaultValue.</div>
</li>
</ul>
<a name="setPartitionAvgRecordMillis-gobblin.configuration.State-gobblin.source.extractor.extract.kafka.KafkaPartition-double-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setPartitionAvgRecordMillis</h4>
<pre>public static&nbsp;void&nbsp;setPartitionAvgRecordMillis(<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,
<a href="../../../../../gobblin/source/extractor/extract/kafka/KafkaPartition.html" title="class in gobblin.source.extractor.extract.kafka">KafkaPartition</a>&nbsp;partition,
double&nbsp;millis)</pre>
<div class="block">Set the average time in milliseconds to pull a record of a partition, which will be stored in property
"[topicname].[partitionid].avg.record.millis".</div>
</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/source/extractor/extract/kafka/KafkaTopic.html" title="class in gobblin.source.extractor.extract.kafka"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../gobblin/source/extractor/extract/kafka/MultiLongWatermark.html" title="class in gobblin.source.extractor.extract.kafka"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?gobblin/source/extractor/extract/kafka/KafkaUtils.html" target="_top">Frames</a></li>
<li><a href="KafkaUtils.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>