blob: d86b60e3d0d63c414b13da99d00105c41e1cfe41 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>RoundRobinTableInputFormat (Apache HBase 4.0.0-alpha-1-SNAPSHOT API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.hadoop.hbase.mapreduce, class: RoundRobinTableInputFormat">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/RoundRobinTableInputFormat.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#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.hadoop.hbase.mapreduce</a></div>
<h1 title="Class RoundRobinTableInputFormat" class="title">Class RoundRobinTableInputFormat</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">org.apache.hadoop.mapreduce.InputFormat&lt;<a href="../io/ImmutableBytesWritable.html" title="class in org.apache.hadoop.hbase.io">ImmutableBytesWritable</a>,<wbr><a href="../client/Result.html" title="class in org.apache.hadoop.hbase.client">Result</a>&gt;
<div class="inheritance"><a href="TableInputFormatBase.html" title="class in org.apache.hadoop.hbase.mapreduce">org.apache.hadoop.hbase.mapreduce.TableInputFormatBase</a>
<div class="inheritance"><a href="TableInputFormat.html" title="class in org.apache.hadoop.hbase.mapreduce">org.apache.hadoop.hbase.mapreduce.TableInputFormat</a>
<div class="inheritance">org.apache.hadoop.hbase.mapreduce.RoundRobinTableInputFormat</div>
</div>
</div>
</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code>org.apache.hadoop.conf.Configurable</code></dd>
</dl>
<hr>
<div class="type-signature"><span class="annotations">@Public
</span><span class="modifiers">public class </span><span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/RoundRobinTableInputFormat.html#line-48">RoundRobinTableInputFormat</a></span>
<span class="extends-implements">extends <a href="TableInputFormat.html" title="class in org.apache.hadoop.hbase.mapreduce">TableInputFormat</a></span></div>
<div class="block">Process the return from super-class <a href="TableInputFormat.html" title="class in org.apache.hadoop.hbase.mapreduce"><code>TableInputFormat</code></a> (TIF) so as to undo any clumping of
<code>InputSplit</code>s around RegionServers. Spread splits broadly to distribute read-load over
RegionServers in the cluster. The super-class TIF returns splits in hbase:meta table order.
Adjacent or near-adjacent hbase:meta Regions can be hosted on the same RegionServer -- nothing
prevents this. This hbase:maeta ordering of InputSplit placement can be lumpy making it so some
RegionServers end up hosting lots of InputSplit scans while contemporaneously other RegionServers
host few or none. This class does a pass over the return from the super-class to better spread
the load. See the below helpful Flipkart blog post for a description and from where the base of
this code comes from (with permission).</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>(package private) static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color"><code><a href="#HBASE_REGIONSIZECALCULATOR_ENABLE" class="member-name-link">HBASE_REGIONSIZECALCULATOR_ENABLE</a></code></div>
<div class="col-last even-row-color">
<div class="block">Boolean config for whether superclass should produce InputSplits with 'lengths'.</div>
</div>
<div class="col-first odd-row-color"><code>private <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Boolean.html" title="class or interface in java.lang" class="external-link">Boolean</a></code></div>
<div class="col-second odd-row-color"><code><a href="#hbaseRegionsizecalculatorEnableOriginalValue" class="member-name-link">hbaseRegionsizecalculatorEnableOriginalValue</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.hadoop.hbase.mapreduce.TableInputFormat">Fields inherited from class&nbsp;org.apache.hadoop.hbase.mapreduce.<a href="TableInputFormat.html" title="class in org.apache.hadoop.hbase.mapreduce">TableInputFormat</a></h3>
<code><a href="TableInputFormat.html#INPUT_TABLE">INPUT_TABLE</a>, <a href="TableInputFormat.html#SCAN">SCAN</a>, <a href="TableInputFormat.html#SCAN_BATCHSIZE">SCAN_BATCHSIZE</a>, <a href="TableInputFormat.html#SCAN_CACHEBLOCKS">SCAN_CACHEBLOCKS</a>, <a href="TableInputFormat.html#SCAN_CACHEDROWS">SCAN_CACHEDROWS</a>, <a href="TableInputFormat.html#SCAN_COLUMN_FAMILY">SCAN_COLUMN_FAMILY</a>, <a href="TableInputFormat.html#SCAN_COLUMNS">SCAN_COLUMNS</a>, <a href="TableInputFormat.html#SCAN_MAXVERSIONS">SCAN_MAXVERSIONS</a>, <a href="TableInputFormat.html#SCAN_ROW_START">SCAN_ROW_START</a>, <a href="TableInputFormat.html#SCAN_ROW_STOP">SCAN_ROW_STOP</a>, <a href="TableInputFormat.html#SCAN_TIMERANGE_END">SCAN_TIMERANGE_END</a>, <a href="TableInputFormat.html#SCAN_TIMERANGE_START">SCAN_TIMERANGE_START</a>, <a href="TableInputFormat.html#SCAN_TIMESTAMP">SCAN_TIMESTAMP</a>, <a href="TableInputFormat.html#SHUFFLE_MAPS">SHUFFLE_MAPS</a></code></div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.hadoop.hbase.mapreduce.TableInputFormatBase">Fields inherited from class&nbsp;org.apache.hadoop.hbase.mapreduce.<a href="TableInputFormatBase.html" title="class in org.apache.hadoop.hbase.mapreduce">TableInputFormatBase</a></h3>
<code><a href="TableInputFormatBase.html#MAPREDUCE_INPUT_AUTOBALANCE">MAPREDUCE_INPUT_AUTOBALANCE</a>, <a href="TableInputFormatBase.html#MAX_AVERAGE_REGION_SIZE">MAX_AVERAGE_REGION_SIZE</a>, <a href="TableInputFormatBase.html#NUM_MAPPERS_PER_REGION">NUM_MAPPERS_PER_REGION</a></code></div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">RoundRobinTableInputFormat</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#configure()" class="member-name-link">configure</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds a configuration to the Context disabling remote rpc'ing to figure Region size when
calculating InputSplits.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;org.apache.hadoop.mapreduce.InputSplit&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSplits(org.apache.hadoop.mapreduce.JobContext)" class="member-name-link">getSplits</a><wbr>(org.apache.hadoop.mapreduce.JobContext&nbsp;context)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Calculates the splits that will serve as input for the map tasks.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;org.apache.hadoop.mapreduce.InputSplit&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSuperSplits(org.apache.hadoop.mapreduce.JobContext)" class="member-name-link">getSuperSplits</a><wbr>(org.apache.hadoop.mapreduce.JobContext&nbsp;context)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Call super-classes' getSplits.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#main(java.lang.String%5B%5D)" class="member-name-link">main</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>[]&nbsp;args)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Pass table name as argument.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;org.apache.hadoop.mapreduce.InputSplit&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#roundRobin(java.util.List)" class="member-name-link">roundRobin</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;org.apache.hadoop.mapreduce.InputSplit&gt;&nbsp;inputs)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Spread the splits list so as to avoid clumping on RegionServers.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#unconfigure()" class="member-name-link">unconfigure</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.hadoop.hbase.mapreduce.TableInputFormat">Methods inherited from class&nbsp;org.apache.hadoop.hbase.mapreduce.<a href="TableInputFormat.html" title="class in org.apache.hadoop.hbase.mapreduce">TableInputFormat</a></h3>
<code><a href="TableInputFormat.html#addColumns(org.apache.hadoop.hbase.client.Scan,byte%5B%5D%5B%5D)">addColumns</a>, <a href="TableInputFormat.html#configureSplitTable(org.apache.hadoop.mapreduce.Job,org.apache.hadoop.hbase.TableName)">configureSplitTable</a>, <a href="TableInputFormat.html#createScanFromConfiguration(org.apache.hadoop.conf.Configuration)">createScanFromConfiguration</a>, <a href="TableInputFormat.html#getConf()">getConf</a>, <a href="TableInputFormat.html#getStartEndKeys()">getStartEndKeys</a>, <a href="TableInputFormat.html#initialize(org.apache.hadoop.mapreduce.JobContext)">initialize</a>, <a href="TableInputFormat.html#setConf(org.apache.hadoop.conf.Configuration)">setConf</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.hadoop.hbase.mapreduce.TableInputFormatBase">Methods inherited from class&nbsp;org.apache.hadoop.hbase.mapreduce.<a href="TableInputFormatBase.html" title="class in org.apache.hadoop.hbase.mapreduce">TableInputFormatBase</a></h3>
<code><a href="TableInputFormatBase.html#calculateAutoBalancedSplits(java.util.List,long)">calculateAutoBalancedSplits</a>, <a href="TableInputFormatBase.html#closeTable()">closeTable</a>, <a href="TableInputFormatBase.html#createNInputSplitsUniform(org.apache.hadoop.mapreduce.InputSplit,int)">createNInputSplitsUniform</a>, <a href="TableInputFormatBase.html#createRecordReader(org.apache.hadoop.mapreduce.InputSplit,org.apache.hadoop.mapreduce.TaskAttemptContext)">createRecordReader</a>, <a href="TableInputFormatBase.html#createRegionSizeCalculator(org.apache.hadoop.hbase.client.RegionLocator,org.apache.hadoop.hbase.client.Admin)">createRegionSizeCalculator</a>, <a href="TableInputFormatBase.html#getAdmin()">getAdmin</a>, <a href="TableInputFormatBase.html#getRegionLocator()">getRegionLocator</a>, <a href="TableInputFormatBase.html#getScan()">getScan</a>, <a href="TableInputFormatBase.html#getTable()">getTable</a>, <a href="TableInputFormatBase.html#includeRegionInSplit(byte%5B%5D,byte%5B%5D)">includeRegionInSplit</a>, <a href="TableInputFormatBase.html#initializeTable(org.apache.hadoop.hbase.client.Connection,org.apache.hadoop.hbase.TableName)">initializeTable</a>, <a href="TableInputFormatBase.html#reverseDNS(java.net.InetAddress)">reverseDNS</a>, <a href="TableInputFormatBase.html#setScan(org.apache.hadoop.hbase.client.Scan)">setScan</a>, <a href="TableInputFormatBase.html#setTableRecordReader(org.apache.hadoop.hbase.mapreduce.TableRecordReader)">setTableRecordReader</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="hbaseRegionsizecalculatorEnableOriginalValue">
<h3>hbaseRegionsizecalculatorEnableOriginalValue</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Boolean.html" title="class or interface in java.lang" class="external-link">Boolean</a></span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/RoundRobinTableInputFormat.html#line-50">hbaseRegionsizecalculatorEnableOriginalValue</a></span></div>
</section>
</li>
<li>
<section class="detail" id="HBASE_REGIONSIZECALCULATOR_ENABLE">
<h3>HBASE_REGIONSIZECALCULATOR_ENABLE</h3>
<div class="member-signature"><span class="modifiers">static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/RoundRobinTableInputFormat.html#line-59">HBASE_REGIONSIZECALCULATOR_ENABLE</a></span></div>
<div class="block">Boolean config for whether superclass should produce InputSplits with 'lengths'. If true, TIF
will query every RegionServer to get the 'size' of all involved Regions and this 'size' will be
used the the InputSplit length. If false, we skip this query and the super-classes returned
InputSplits will have lenghths of zero. This override will set the flag to false. All returned
lengths will be zero. Makes it so sorting on 'length' becomes a noop. The sort returned by this
override will prevail. Thats what we want.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>RoundRobinTableInputFormat</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/RoundRobinTableInputFormat.html#line-49">RoundRobinTableInputFormat</a></span>()</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getSplits(org.apache.hadoop.mapreduce.JobContext)">
<h3>getSplits</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;org.apache.hadoop.mapreduce.InputSplit&gt;</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/RoundRobinTableInputFormat.html#line-61">getSplits</a></span><wbr><span class="parameters">(org.apache.hadoop.mapreduce.JobContext&nbsp;context)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block"><span class="descfrm-type-label">Description copied from class:&nbsp;<code><a href="TableInputFormat.html#getSplits(org.apache.hadoop.mapreduce.JobContext)">TableInputFormat</a></code></span></div>
<div class="block">Calculates the splits that will serve as input for the map tasks. The number of splits matches
the number of regions in a table. Splits are shuffled if required.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="TableInputFormat.html#getSplits(org.apache.hadoop.mapreduce.JobContext)">getSplits</a></code>&nbsp;in class&nbsp;<code><a href="TableInputFormat.html" title="class in org.apache.hadoop.hbase.mapreduce">TableInputFormat</a></code></dd>
<dt>Parameters:</dt>
<dd><code>context</code> - The current job context.</dd>
<dt>Returns:</dt>
<dd>The list of input splits.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - When creating the list of splits fails.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><code>InputFormat.getSplits(org.apache.hadoop.mapreduce.JobContext)</code></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSuperSplits(org.apache.hadoop.mapreduce.JobContext)">
<h3>getSuperSplits</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;org.apache.hadoop.mapreduce.InputSplit&gt;</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/RoundRobinTableInputFormat.html#line-75">getSuperSplits</a></span><wbr><span class="parameters">(org.apache.hadoop.mapreduce.JobContext&nbsp;context)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Call super-classes' getSplits. Have it out here as its own method so can be overridden.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="roundRobin(java.util.List)">
<h3>roundRobin</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;org.apache.hadoop.mapreduce.InputSplit&gt;</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/RoundRobinTableInputFormat.html#line-84">roundRobin</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;org.apache.hadoop.mapreduce.InputSplit&gt;&nbsp;inputs)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Spread the splits list so as to avoid clumping on RegionServers. Order splits so every server
gets one split before a server gets a second, and so on; i.e. round-robin the splits amongst
the servers in the cluster.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="configure()">
<h3>configure</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/RoundRobinTableInputFormat.html#line-135">configure</a></span>()</div>
<div class="block">Adds a configuration to the Context disabling remote rpc'ing to figure Region size when
calculating InputSplits. See up in super-class TIF where we rpc to every server to find the
size of all involved Regions. Here we disable this super-class action. This means InputSplits
will have a length of zero. If all InputSplits have zero-length InputSplits, the ordering done
in here will 'pass-through' Hadoop's length-first sort. The superclass TIF will ask every node
for the current size of each of the participating Table Regions. It does this because it wants
to schedule the biggest Regions first (This fixation comes of hadoop itself -- see JobSubmitter
where it sorts inputs by size). This extra diligence takes time and is of no utility in this
RRTIF where spread is of more import than size-first. Also, if a rolling restart is happening
when we go to launch the job, the job launch may fail because the request for Region size fails
-- even after retries -- because rolled RegionServer may take a while to come online: e.g. it
takes java 90 seconds to allocate a 160G. RegionServer is offline during this time. The job
launch will fail with 'Connection rejected'. So, we set 'hbase.regionsizecalculator.enable' to
false here in RRTIF.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#unconfigure()"><code>unconfigure()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="unconfigure()">
<h3>unconfigure</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/RoundRobinTableInputFormat.html#line-146">unconfigure</a></span>()</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#configure()"><code>configure()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="main(java.lang.String[])">
<h3>main</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/RoundRobinTableInputFormat.html#line-159">main</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>[]&nbsp;args)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Pass table name as argument. Set the zk ensemble to use with the System property
'hbase.zookeeper.quorum'</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2007&#x2013;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>