blob: 67b9ccf6d1eaf8b30e9a373ce0ff443885853690 [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>TableInputFormatBase (Apache HBase 3.0.0-alpha-2-SNAPSHOT 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="TableInputFormatBase (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"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};
var tabs = {65535:["t0","All 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="class-use/TableInputFormatBase.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/hadoop/hbase/mapreduce/TableInputFormat.html" title="class in org.apache.hadoop.hbase.mapreduce"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableMapper.html" title="class in org.apache.hadoop.hbase.mapreduce"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html" target="_top">Frames</a></li>
<li><a href="TableInputFormatBase.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><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="subNavList">
<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>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.hadoop.hbase.mapreduce</div>
<h2 title="Class TableInputFormatBase" class="title">Class TableInputFormatBase</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/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>org.apache.hadoop.mapreduce.InputFormat&lt;<a href="../../../../../org/apache/hadoop/hbase/io/ImmutableBytesWritable.html" title="class in org.apache.hadoop.hbase.io">ImmutableBytesWritable</a>,<a href="../../../../../org/apache/hadoop/hbase/client/Result.html" title="class in org.apache.hadoop.hbase.client">Result</a>&gt;</li>
<li>
<ul class="inheritance">
<li>org.apache.hadoop.hbase.mapreduce.TableInputFormatBase</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormat.html" title="class in org.apache.hadoop.hbase.mapreduce">TableInputFormat</a></dd>
</dl>
<hr>
<br>
<pre>@InterfaceAudience.Public
public abstract class <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.107">TableInputFormatBase</a>
extends org.apache.hadoop.mapreduce.InputFormat&lt;<a href="../../../../../org/apache/hadoop/hbase/io/ImmutableBytesWritable.html" title="class in org.apache.hadoop.hbase.io">ImmutableBytesWritable</a>,<a href="../../../../../org/apache/hadoop/hbase/client/Result.html" title="class in org.apache.hadoop.hbase.client">Result</a>&gt;</pre>
<div class="block">A base for <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormat.html" title="class in org.apache.hadoop.hbase.mapreduce"><code>TableInputFormat</code></a>s. Receives a <a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client"><code>Connection</code></a>, a <a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase"><code>TableName</code></a>,
an <a href="../../../../../org/apache/hadoop/hbase/client/Scan.html" title="class in org.apache.hadoop.hbase.client"><code>Scan</code></a> instance that defines the input columns etc. Subclasses may use
other TableRecordReader implementations.
Subclasses MUST ensure initializeTable(Connection, TableName) is called for an instance to
function properly. Each of the entry points to this class used by the MapReduce framework,
<a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#createRecordReader-org.apache.hadoop.mapreduce.InputSplit-org.apache.hadoop.mapreduce.TaskAttemptContext-"><code>createRecordReader(InputSplit, TaskAttemptContext)</code></a> and <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#getSplits-org.apache.hadoop.mapreduce.JobContext-"><code>getSplits(JobContext)</code></a>,
will call <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#initialize-org.apache.hadoop.mapreduce.JobContext-"><code>initialize(JobContext)</code></a> as a convenient centralized location to handle
retrieving the necessary configuration information. If your subclass overrides either of these
methods, either call the parent version or call initialize yourself.
<p>
An example of a subclass:
<pre>
class ExampleTIF extends TableInputFormatBase {
@Override
protected void initialize(JobContext context) throws IOException {
// We are responsible for the lifecycle of this connection until we hand it over in
// initializeTable.
Connection connection = ConnectionFactory.createConnection(HBaseConfiguration.create(
job.getConfiguration()));
TableName tableName = TableName.valueOf("exampleTable");
// mandatory. once passed here, TableInputFormatBase will handle closing the connection.
initializeTable(connection, tableName);
byte[][] inputColumns = new byte [][] { Bytes.toBytes("columnA"),
Bytes.toBytes("columnB") };
// optional, by default we'll get everything for the table.
Scan scan = new Scan();
for (byte[] family : inputColumns) {
scan.addFamily(family);
}
Filter exampleFilter = new RowFilter(CompareOp.EQUAL, new RegexStringComparator("aa.*"));
scan.setFilter(exampleFilter);
setScan(scan);
}
}
</pre>
The number of InputSplits(mappers) match the number of regions in a table by default.
Set "hbase.mapreduce.tableinput.mappers.per.region" to specify how many mappers per region, set
this property will disable autobalance below.\
Set "hbase.mapreduce.tif.input.autobalance" to enable autobalance, hbase will assign mappers
based on average region size; For regions, whose size larger than average region size may assigned
more mappers, and for smaller one, they may group together to use one mapper. If actual average
region size is too big, like 50G, it is not good to only assign 1 mapper for those large regions.
Use "hbase.mapreduce.tif.ave.regionsize" to set max average region size when enable "autobalanece",
default mas average region size is 8G.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../../../../org/apache/hadoop/hbase/client/Admin.html" title="interface in org.apache.hadoop.hbase.client">Admin</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#admin">admin</a></span></code>
<div class="block">The <a href="../../../../../org/apache/hadoop/hbase/client/Admin.html" title="interface in org.apache.hadoop.hbase.client"><code>Admin</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client">Connection</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#connection">connection</a></span></code>
<div class="block">The underlying <a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client"><code>Connection</code></a> of the table.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/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="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#INITIALIZATION_ERROR">INITIALIZATION_ERROR</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static org.slf4j.Logger</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#LOG">LOG</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/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="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#MAPREDUCE_INPUT_AUTOBALANCE">MAPREDUCE_INPUT_AUTOBALANCE</a></span></code>
<div class="block">Specify if we enable auto-balance to set number of mappers in M/R jobs.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/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="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#MAX_AVERAGE_REGION_SIZE">MAX_AVERAGE_REGION_SIZE</a></span></code>
<div class="block">In auto-balance, we split input by ave region size, if calculated region size is too big, we can set it.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/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="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#NOT_INITIALIZED">NOT_INITIALIZED</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/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="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#NUM_MAPPERS_PER_REGION">NUM_MAPPERS_PER_REGION</a></span></code>
<div class="block">Set the number of Mappers for each region, all regions have same number of Mappers</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../../../../org/apache/hadoop/hbase/client/RegionLocator.html" title="interface in org.apache.hadoop.hbase.client">RegionLocator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#regionLocator">regionLocator</a></span></code>
<div class="block">The <a href="../../../../../org/apache/hadoop/hbase/client/RegionLocator.html" title="interface in org.apache.hadoop.hbase.client"><code>RegionLocator</code></a> of the table.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#reverseDNSCacheMap">reverseDNSCacheMap</a></span></code>
<div class="block">The reverse DNS lookup cache mapping: IPAddress => HostName</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../../../../org/apache/hadoop/hbase/client/Scan.html" title="class in org.apache.hadoop.hbase.client">Scan</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#scan">scan</a></span></code>
<div class="block">Holds the details for the internal scanner.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../../../../../org/apache/hadoop/hbase/client/Table.html" title="interface in org.apache.hadoop.hbase.client">Table</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#table">table</a></span></code>
<div class="block">The <a href="../../../../../org/apache/hadoop/hbase/client/Table.html" title="interface in org.apache.hadoop.hbase.client"><code>Table</code></a> to scan.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableRecordReader.html" title="class in org.apache.hadoop.hbase.mapreduce">TableRecordReader</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#tableRecordReader">tableRecordReader</a></span></code>
<div class="block">The reader scanning the table, can be a custom one.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== 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="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#TableInputFormatBase--">TableInputFormatBase</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="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><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;org.apache.hadoop.mapreduce.InputSplit&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#calculateAutoBalancedSplits-java.util.List-long-">calculateAutoBalancedSplits</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;org.apache.hadoop.mapreduce.InputSplit&gt;&nbsp;splits,
long&nbsp;maxAverageRegionSize)</code>
<div class="block">Calculates the number of MapReduce input splits for the map tasks.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#close-java.io.Closeable...-">close</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>...&nbsp;closables)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#closeTable--">closeTable</a></span>()</code>
<div class="block">Close the Table and related objects that were initialized via
<a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#initializeTable-org.apache.hadoop.hbase.client.Connection-org.apache.hadoop.hbase.TableName-"><code>initializeTable(Connection, TableName)</code></a>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected <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;org.apache.hadoop.mapreduce.InputSplit&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#createNInputSplitsUniform-org.apache.hadoop.mapreduce.InputSplit-int-">createNInputSplitsUniform</a></span>(org.apache.hadoop.mapreduce.InputSplit&nbsp;split,
int&nbsp;n)</code>
<div class="block">Create n splits for one InputSplit, For now only support uniform distribution</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>org.apache.hadoop.mapreduce.RecordReader&lt;<a href="../../../../../org/apache/hadoop/hbase/io/ImmutableBytesWritable.html" title="class in org.apache.hadoop.hbase.io">ImmutableBytesWritable</a>,<a href="../../../../../org/apache/hadoop/hbase/client/Result.html" title="class in org.apache.hadoop.hbase.client">Result</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#createRecordReader-org.apache.hadoop.mapreduce.InputSplit-org.apache.hadoop.mapreduce.TaskAttemptContext-">createRecordReader</a></span>(org.apache.hadoop.mapreduce.InputSplit&nbsp;split,
org.apache.hadoop.mapreduce.TaskAttemptContext&nbsp;context)</code>
<div class="block">Builds a <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableRecordReader.html" title="class in org.apache.hadoop.hbase.mapreduce"><code>TableRecordReader</code></a>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/hadoop/hbase/mapreduce/RegionSizeCalculator.html" title="class in org.apache.hadoop.hbase.mapreduce">RegionSizeCalculator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#createRegionSizeCalculator-org.apache.hadoop.hbase.client.RegionLocator-org.apache.hadoop.hbase.client.Admin-">createRegionSizeCalculator</a></span>(<a href="../../../../../org/apache/hadoop/hbase/client/RegionLocator.html" title="interface in org.apache.hadoop.hbase.client">RegionLocator</a>&nbsp;locator,
<a href="../../../../../org/apache/hadoop/hbase/client/Admin.html" title="interface in org.apache.hadoop.hbase.client">Admin</a>&nbsp;admin)</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/hadoop/hbase/client/Admin.html" title="interface in org.apache.hadoop.hbase.client">Admin</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#getAdmin--">getAdmin</a></span>()</code>
<div class="block">Allows subclasses to get the <a href="../../../../../org/apache/hadoop/hbase/client/Admin.html" title="interface in org.apache.hadoop.hbase.client"><code>Admin</code></a>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/hadoop/hbase/client/RegionLocator.html" title="interface in org.apache.hadoop.hbase.client">RegionLocator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#getRegionLocator--">getRegionLocator</a></span>()</code>
<div class="block">Allows subclasses to get the <a href="../../../../../org/apache/hadoop/hbase/client/RegionLocator.html" title="interface in org.apache.hadoop.hbase.client"><code>RegionLocator</code></a>.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/client/Scan.html" title="class in org.apache.hadoop.hbase.client">Scan</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#getScan--">getScan</a></span>()</code>
<div class="block">Gets the scan defining the actual details like columns etc.</div>
</td>
</tr>
<tr id="i9" 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;org.apache.hadoop.mapreduce.InputSplit&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#getSplits-org.apache.hadoop.mapreduce.JobContext-">getSplits</a></span>(org.apache.hadoop.mapreduce.JobContext&nbsp;context)</code>
<div class="block">Calculates the splits that will serve as input for the map tasks.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a>&lt;byte[][],byte[][]&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#getStartEndKeys--">getStartEndKeys</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/hadoop/hbase/client/Table.html" title="interface in org.apache.hadoop.hbase.client">Table</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#getTable--">getTable</a></span>()</code>
<div class="block">Allows subclasses to get the <a href="../../../../../org/apache/hadoop/hbase/client/Table.html" title="interface in org.apache.hadoop.hbase.client"><code>Table</code></a>.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#includeRegionInSplit-byte:A-byte:A-">includeRegionInSplit</a></span>(byte[]&nbsp;startKey,
byte[]&nbsp;endKey)</code>
<div class="block">Test if the given region is to be included in the InputSplit while splitting
the regions of a table.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#initialize-org.apache.hadoop.mapreduce.JobContext-">initialize</a></span>(org.apache.hadoop.mapreduce.JobContext&nbsp;context)</code>
<div class="block">Handle subclass specific set up.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#initializeTable-org.apache.hadoop.hbase.client.Connection-org.apache.hadoop.hbase.TableName-">initializeTable</a></span>(<a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client">Connection</a>&nbsp;connection,
<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)</code>
<div class="block">Allows subclasses to initialize the table information.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>private <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;org.apache.hadoop.mapreduce.InputSplit&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#oneInputSplitPerRegion--">oneInputSplitPerRegion</a></span>()</code>
<div class="block">Create one InputSplit per region</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>(package private) <a href="https://docs.oracle.com/javase/8/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="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#reverseDNS-java.net.InetAddress-">reverseDNS</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;ipAddress)</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#setScan-org.apache.hadoop.hbase.client.Scan-">setScan</a></span>(<a href="../../../../../org/apache/hadoop/hbase/client/Scan.html" title="class in org.apache.hadoop.hbase.client">Scan</a>&nbsp;scan)</code>
<div class="block">Sets the scan defining the actual details like columns etc.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#setTableRecordReader-org.apache.hadoop.hbase.mapreduce.TableRecordReader-">setTableRecordReader</a></span>(<a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableRecordReader.html" title="class in org.apache.hadoop.hbase.mapreduce">TableRecordReader</a>&nbsp;tableRecordReader)</code>
<div class="block">Allows subclasses to set the <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableRecordReader.html" title="class in org.apache.hadoop.hbase.mapreduce"><code>TableRecordReader</code></a>.</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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="LOG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LOG</h4>
<pre>private static final&nbsp;org.slf4j.Logger <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.110">LOG</a></pre>
</li>
</ul>
<a name="NOT_INITIALIZED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NOT_INITIALIZED</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.112">NOT_INITIALIZED</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.NOT_INITIALIZED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="INITIALIZATION_ERROR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INITIALIZATION_ERROR</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.115">INITIALIZATION_ERROR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.INITIALIZATION_ERROR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MAPREDUCE_INPUT_AUTOBALANCE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAPREDUCE_INPUT_AUTOBALANCE</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.120">MAPREDUCE_INPUT_AUTOBALANCE</a></pre>
<div class="block">Specify if we enable auto-balance to set number of mappers in M/R jobs.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.MAPREDUCE_INPUT_AUTOBALANCE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MAX_AVERAGE_REGION_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAX_AVERAGE_REGION_SIZE</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.122">MAX_AVERAGE_REGION_SIZE</a></pre>
<div class="block">In auto-balance, we split input by ave region size, if calculated region size is too big, we can set it.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.MAX_AVERAGE_REGION_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="NUM_MAPPERS_PER_REGION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NUM_MAPPERS_PER_REGION</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.125">NUM_MAPPERS_PER_REGION</a></pre>
<div class="block">Set the number of Mappers for each region, all regions have same number of Mappers</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.NUM_MAPPERS_PER_REGION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="scan">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scan</h4>
<pre>private&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/Scan.html" title="class in org.apache.hadoop.hbase.client">Scan</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.131">scan</a></pre>
<div class="block">Holds the details for the internal scanner.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/client/Scan.html" title="class in org.apache.hadoop.hbase.client"><code>Scan</code></a></dd>
</dl>
</li>
</ul>
<a name="admin">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>admin</h4>
<pre>private&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/Admin.html" title="interface in org.apache.hadoop.hbase.client">Admin</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.133">admin</a></pre>
<div class="block">The <a href="../../../../../org/apache/hadoop/hbase/client/Admin.html" title="interface in org.apache.hadoop.hbase.client"><code>Admin</code></a>.</div>
</li>
</ul>
<a name="table">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>table</h4>
<pre>private&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/Table.html" title="interface in org.apache.hadoop.hbase.client">Table</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.135">table</a></pre>
<div class="block">The <a href="../../../../../org/apache/hadoop/hbase/client/Table.html" title="interface in org.apache.hadoop.hbase.client"><code>Table</code></a> to scan.</div>
</li>
</ul>
<a name="regionLocator">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>regionLocator</h4>
<pre>private&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/RegionLocator.html" title="interface in org.apache.hadoop.hbase.client">RegionLocator</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.137">regionLocator</a></pre>
<div class="block">The <a href="../../../../../org/apache/hadoop/hbase/client/RegionLocator.html" title="interface in org.apache.hadoop.hbase.client"><code>RegionLocator</code></a> of the table.</div>
</li>
</ul>
<a name="tableRecordReader">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tableRecordReader</h4>
<pre>private&nbsp;<a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableRecordReader.html" title="class in org.apache.hadoop.hbase.mapreduce">TableRecordReader</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.139">tableRecordReader</a></pre>
<div class="block">The reader scanning the table, can be a custom one.</div>
</li>
</ul>
<a name="connection">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connection</h4>
<pre>private&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client">Connection</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.141">connection</a></pre>
<div class="block">The underlying <a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client"><code>Connection</code></a> of the table.</div>
</li>
</ul>
<a name="reverseDNSCacheMap">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>reverseDNSCacheMap</h4>
<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt; <a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.145">reverseDNSCacheMap</a></pre>
<div class="block">The reverse DNS lookup cache mapping: IPAddress => HostName</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="TableInputFormatBase--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TableInputFormatBase</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.107">TableInputFormatBase</a>()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="createRecordReader-org.apache.hadoop.mapreduce.InputSplit-org.apache.hadoop.mapreduce.TaskAttemptContext-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRecordReader</h4>
<pre>public&nbsp;org.apache.hadoop.mapreduce.RecordReader&lt;<a href="../../../../../org/apache/hadoop/hbase/io/ImmutableBytesWritable.html" title="class in org.apache.hadoop.hbase.io">ImmutableBytesWritable</a>,<a href="../../../../../org/apache/hadoop/hbase/client/Result.html" title="class in org.apache.hadoop.hbase.client">Result</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.161">createRecordReader</a>(org.apache.hadoop.mapreduce.InputSplit&nbsp;split,
org.apache.hadoop.mapreduce.TaskAttemptContext&nbsp;context)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Builds a <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableRecordReader.html" title="class in org.apache.hadoop.hbase.mapreduce"><code>TableRecordReader</code></a>. If no <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableRecordReader.html" title="class in org.apache.hadoop.hbase.mapreduce"><code>TableRecordReader</code></a> was provided, uses
the default.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>createRecordReader</code>&nbsp;in class&nbsp;<code>org.apache.hadoop.mapreduce.InputFormat&lt;<a href="../../../../../org/apache/hadoop/hbase/io/ImmutableBytesWritable.html" title="class in org.apache.hadoop.hbase.io">ImmutableBytesWritable</a>,<a href="../../../../../org/apache/hadoop/hbase/client/Result.html" title="class in org.apache.hadoop.hbase.client">Result</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>split</code> - The split to work with.</dd>
<dd><code>context</code> - The current context.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The newly created record reader.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - When creating the reader fails.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>InputFormat.createRecordReader(
org.apache.hadoop.mapreduce.InputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext)</code></dd>
</dl>
</li>
</ul>
<a name="getStartEndKeys--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStartEndKeys</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a>&lt;byte[][],byte[][]&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.222">getStartEndKeys</a>()
throws <a href="https://docs.oracle.com/javase/8/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/8/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="getSplits-org.apache.hadoop.mapreduce.JobContext-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSplits</h4>
<pre>public&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;org.apache.hadoop.mapreduce.InputSplit&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.235">getSplits</a>(org.apache.hadoop.mapreduce.JobContext&nbsp;context)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Calculates the splits that will serve as input for the map tasks.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>getSplits</code>&nbsp;in class&nbsp;<code>org.apache.hadoop.mapreduce.InputFormat&lt;<a href="../../../../../org/apache/hadoop/hbase/io/ImmutableBytesWritable.html" title="class in org.apache.hadoop.hbase.io">ImmutableBytesWritable</a>,<a href="../../../../../org/apache/hadoop/hbase/client/Result.html" title="class in org.apache.hadoop.hbase.client">Result</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - The current job context.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The list of input splits.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - When creating the list of splits fails.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>InputFormat.getSplits(
org.apache.hadoop.mapreduce.JobContext)</code></dd>
</dl>
</li>
</ul>
<a name="oneInputSplitPerRegion--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>oneInputSplitPerRegion</h4>
<pre>private&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;org.apache.hadoop.mapreduce.InputSplit&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.290">oneInputSplitPerRegion</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Create one InputSplit per region</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The list of InputSplit for all the regions</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - throws IOException</dd>
</dl>
</li>
</ul>
<a name="createNInputSplitsUniform-org.apache.hadoop.mapreduce.InputSplit-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createNInputSplitsUniform</h4>
<pre>protected&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;org.apache.hadoop.mapreduce.InputSplit&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.371">createNInputSplitsUniform</a>(org.apache.hadoop.mapreduce.InputSplit&nbsp;split,
int&nbsp;n)
throws <a href="../../../../../org/apache/hadoop/hbase/exceptions/IllegalArgumentIOException.html" title="class in org.apache.hadoop.hbase.exceptions">IllegalArgumentIOException</a></pre>
<div class="block">Create n splits for one InputSplit, For now only support uniform distribution</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>split</code> - A TableSplit corresponding to a range of rowkeys</dd>
<dd><code>n</code> - Number of ranges after splitting. Pass 1 means no split for the range
Pass 2 if you want to split the range in two;</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A list of TableSplit, the size of the list is n</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/hbase/exceptions/IllegalArgumentIOException.html" title="class in org.apache.hadoop.hbase.exceptions">IllegalArgumentIOException</a></code> - throws IllegalArgumentIOException</dd>
</dl>
</li>
</ul>
<a name="calculateAutoBalancedSplits-java.util.List-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calculateAutoBalancedSplits</h4>
<pre>public&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;org.apache.hadoop.mapreduce.InputSplit&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.439">calculateAutoBalancedSplits</a>(<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;org.apache.hadoop.mapreduce.InputSplit&gt;&nbsp;splits,
long&nbsp;maxAverageRegionSize)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Calculates the number of MapReduce input splits for the map tasks. The number of
MapReduce input splits depends on the average region size.
Make it 'public' for testing</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>splits</code> - The list of input splits before balance.</dd>
<dd><code>maxAverageRegionSize</code> - max Average region size for one mapper</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The list of input splits.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - When creating the list of splits fails.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>InputFormat.getSplits(
org.apache.hadoop.mapreduce.JobContext)</code></dd>
</dl>
</li>
</ul>
<a name="reverseDNS-java.net.InetAddress-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reverseDNS</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.509">reverseDNS</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;ipAddress)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/net/UnknownHostException.html?is-external=true" title="class or interface in java.net">UnknownHostException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/net/UnknownHostException.html?is-external=true" title="class or interface in java.net">UnknownHostException</a></code></dd>
</dl>
</li>
</ul>
<a name="includeRegionInSplit-byte:A-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>includeRegionInSplit</h4>
<pre>protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.550">includeRegionInSplit</a>(byte[]&nbsp;startKey,
byte[]&nbsp;endKey)</pre>
<div class="block">Test if the given region is to be included in the InputSplit while splitting
the regions of a table.
<p>
This optimization is effective when there is a specific reasoning to exclude an entire region from the M-R job,
(and hence, not contributing to the InputSplit), given the start and end keys of the same. <br>
Useful when we need to remember the last-processed top record and revisit the [last, current) interval for M-R processing,
continuously. In addition to reducing InputSplits, reduces the load on the region server as well, due to the ordering of the keys.
<br>
<br>
Note: It is possible that <code>endKey.length() == 0 </code> , for the last (recent) region.
<br>
Override this method, if you want to bulk exclude regions altogether from M-R. By default, no region is excluded( i.e. all regions are included).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>startKey</code> - Start key of the region</dd>
<dd><code>endKey</code> - End key of the region</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true, if this region needs to be included as part of the input (default).</dd>
</dl>
</li>
</ul>
<a name="getRegionLocator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRegionLocator</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/RegionLocator.html" title="interface in org.apache.hadoop.hbase.client">RegionLocator</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.557">getRegionLocator</a>()</pre>
<div class="block">Allows subclasses to get the <a href="../../../../../org/apache/hadoop/hbase/client/RegionLocator.html" title="interface in org.apache.hadoop.hbase.client"><code>RegionLocator</code></a>.</div>
</li>
</ul>
<a name="getTable--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTable</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/Table.html" title="interface in org.apache.hadoop.hbase.client">Table</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.567">getTable</a>()</pre>
<div class="block">Allows subclasses to get the <a href="../../../../../org/apache/hadoop/hbase/client/Table.html" title="interface in org.apache.hadoop.hbase.client"><code>Table</code></a>.</div>
</li>
</ul>
<a name="getAdmin--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAdmin</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/Admin.html" title="interface in org.apache.hadoop.hbase.client">Admin</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.577">getAdmin</a>()</pre>
<div class="block">Allows subclasses to get the <a href="../../../../../org/apache/hadoop/hbase/client/Admin.html" title="interface in org.apache.hadoop.hbase.client"><code>Admin</code></a>.</div>
</li>
</ul>
<a name="initializeTable-org.apache.hadoop.hbase.client.Connection-org.apache.hadoop.hbase.TableName-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initializeTable</h4>
<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.591">initializeTable</a>(<a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client">Connection</a>&nbsp;connection,
<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Allows subclasses to initialize the table information.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>connection</code> - The Connection to the HBase cluster. MUST be unmanaged. We will close.</dd>
<dd><code>tableName</code> - The <a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase"><code>TableName</code></a> of the table to process.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/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="createRegionSizeCalculator-org.apache.hadoop.hbase.client.RegionLocator-org.apache.hadoop.hbase.client.Admin-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRegionSizeCalculator</h4>
<pre>@InterfaceAudience.Private
protected&nbsp;<a href="../../../../../org/apache/hadoop/hbase/mapreduce/RegionSizeCalculator.html" title="class in org.apache.hadoop.hbase.mapreduce">RegionSizeCalculator</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.603">createRegionSizeCalculator</a>(<a href="../../../../../org/apache/hadoop/hbase/client/RegionLocator.html" title="interface in org.apache.hadoop.hbase.client">RegionLocator</a>&nbsp;locator,
<a href="../../../../../org/apache/hadoop/hbase/client/Admin.html" title="interface in org.apache.hadoop.hbase.client">Admin</a>&nbsp;admin)
throws <a href="https://docs.oracle.com/javase/8/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/8/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="getScan--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScan</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/Scan.html" title="class in org.apache.hadoop.hbase.client">Scan</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.613">getScan</a>()</pre>
<div class="block">Gets the scan defining the actual details like columns etc.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The internal scan instance.</dd>
</dl>
</li>
</ul>
<a name="setScan-org.apache.hadoop.hbase.client.Scan-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setScan</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.623">setScan</a>(<a href="../../../../../org/apache/hadoop/hbase/client/Scan.html" title="class in org.apache.hadoop.hbase.client">Scan</a>&nbsp;scan)</pre>
<div class="block">Sets the scan defining the actual details like columns etc.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scan</code> - The scan to set.</dd>
</dl>
</li>
</ul>
<a name="setTableRecordReader-org.apache.hadoop.hbase.mapreduce.TableRecordReader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTableRecordReader</h4>
<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.633">setTableRecordReader</a>(<a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableRecordReader.html" title="class in org.apache.hadoop.hbase.mapreduce">TableRecordReader</a>&nbsp;tableRecordReader)</pre>
<div class="block">Allows subclasses to set the <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableRecordReader.html" title="class in org.apache.hadoop.hbase.mapreduce"><code>TableRecordReader</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tableRecordReader</code> - A different <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableRecordReader.html" title="class in org.apache.hadoop.hbase.mapreduce"><code>TableRecordReader</code></a>
implementation.</dd>
</dl>
</li>
</ul>
<a name="initialize-org.apache.hadoop.mapreduce.JobContext-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initialize</h4>
<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.652">initialize</a>(org.apache.hadoop.mapreduce.JobContext&nbsp;context)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Handle subclass specific set up.
Each of the entry points used by the MapReduce framework,
<a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#createRecordReader-org.apache.hadoop.mapreduce.InputSplit-org.apache.hadoop.mapreduce.TaskAttemptContext-"><code>createRecordReader(InputSplit, TaskAttemptContext)</code></a> and <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#getSplits-org.apache.hadoop.mapreduce.JobContext-"><code>getSplits(JobContext)</code></a>,
will call <a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#initialize-org.apache.hadoop.mapreduce.JobContext-"><code>initialize(JobContext)</code></a> as a convenient centralized location to handle
retrieving the necessary configuration information and calling
<a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#initializeTable-org.apache.hadoop.hbase.client.Connection-org.apache.hadoop.hbase.TableName-"><code>initializeTable(Connection, TableName)</code></a>.
Subclasses should implement their initialize call such that it is safe to call multiple times.
The current TableInputFormatBase implementation relies on a non-null table reference to decide
if an initialize call is needed, but this behavior may change in the future. In particular,
it is critical that initializeTable not be called multiple times since this will leak
Connection instances.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/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="closeTable--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeTable</h4>
<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.661">closeTable</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Close the Table and related objects that were initialized via
<a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#initializeTable-org.apache.hadoop.hbase.client.Connection-org.apache.hadoop.hbase.TableName-"><code>initializeTable(Connection, TableName)</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/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="close-java.io.Closeable...-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>close</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html#line.669">close</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>...&nbsp;closables)
throws <a href="https://docs.oracle.com/javase/8/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/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></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="class-use/TableInputFormatBase.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/hadoop/hbase/mapreduce/TableInputFormat.html" title="class in org.apache.hadoop.hbase.mapreduce"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/hadoop/hbase/mapreduce/TableMapper.html" title="class in org.apache.hadoop.hbase.mapreduce"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.html" target="_top">Frames</a></li>
<li><a href="TableInputFormatBase.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><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="subNavList">
<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>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2007&#x2013;2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>