| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>RegionLocations (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, class: RegionLocations"> |
| <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/RegionLocations.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: </li> |
| <li>Nested | </li> |
| <li><a href="#field-summary">Field</a> | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li><a href="#field-detail">Field</a> | </li> |
| <li><a href="#constructor-detail">Constr</a> | </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> <a href="package-summary.html">org.apache.hadoop.hbase</a></div> |
| <h1 title="Class RegionLocations" class="title">Class RegionLocations</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.hbase.RegionLocations</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a><<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="annotations">@Private |
| </span><span class="modifiers">public class </span><span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-33">RegionLocations</a></span> |
| <span class="extends-implements">extends <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> |
| implements <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a><<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>></span></div> |
| <div class="block">Container for holding a list of <a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase"><code>HRegionLocation</code></a>'s that correspond to the same range. The |
| list is indexed by the replicaId. This is an immutable list, however mutation operations are |
| provided which returns a new List via copy-on-write (assuming small number of locations)</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>private final <a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>[]</code></div> |
| <div class="col-second even-row-color"><code><a href="#locations" class="member-name-link">locations</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>private final int</code></div> |
| <div class="col-second odd-row-color"><code><a href="#numNonNullElements" class="member-name-link">numNonNullElements</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| </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(java.util.Collection)" class="member-name-link">RegionLocations</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>> locations)</code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.hadoop.hbase.HRegionLocation...)" class="member-name-link">RegionLocations</a><wbr>(<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>... locations)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Constructs the region location list.</div> |
| </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-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" aria-labelledby="method-summary-table-tab0"> |
| <div class="summary-table three-column-summary"> |
| <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><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDefaultRegionLocation()" class="member-name-link">getDefaultRegionLocation</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRegionLocation()" class="member-name-link">getRegionLocation</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the first not-null region location in the list</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRegionLocation(int)" class="member-name-link">getRegionLocation</a><wbr>(int replicaId)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRegionLocationByRegionName(byte%5B%5D)" class="member-name-link">getRegionLocationByRegionName</a><wbr>(byte[] regionName)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the region location from the list for matching regionName, which can be regionName or |
| encodedRegionName</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>[]</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRegionLocations()" class="member-name-link">getRegionLocations</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isEmpty()" class="member-name-link">isEmpty</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns whether there are non-null elements in the list</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isGreaterThan(long,long,boolean)" class="member-name-link">isGreaterThan</a><wbr>(long a, |
| long b, |
| boolean checkForEquals)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </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/Iterator.html" title="class or interface in java.util" class="external-link">Iterator</a><<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#iterator()" class="member-name-link">iterator</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#mergeLocations(org.apache.hadoop.hbase.RegionLocations)" class="member-name-link">mergeLocations</a><wbr>(<a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a> other)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Merges this RegionLocations list with the given list assuming same range, and keeping the most |
| up to date version of the HRegionLocation entries from either list according to seqNum.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#numNonNullElements()" class="member-name-link">numNonNullElements</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the size of not-null locations</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#remove(int)" class="member-name-link">remove</a><wbr>(int replicaId)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Removes location of the given replicaId from the list</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#remove(org.apache.hadoop.hbase.HRegionLocation)" class="member-name-link">remove</a><wbr>(<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a> location)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Removes the given location from the list</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeByServer(org.apache.hadoop.hbase.ServerName)" class="member-name-link">removeByServer</a><wbr>(<a href="ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a> serverName)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a new RegionLocations with the locations removed (set to null) which have the |
| destination server as given.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeElementsWithNullLocation()" class="member-name-link">removeElementsWithNullLocation</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Set the element to null if its getServerName method returns null.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private <a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#selectRegionLocation(org.apache.hadoop.hbase.HRegionLocation,org.apache.hadoop.hbase.HRegionLocation,boolean,boolean)" class="member-name-link">selectRegionLocation</a><wbr>(<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a> oldLocation, |
| <a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a> location, |
| boolean checkForEquals, |
| boolean force)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#size()" class="member-name-link">size</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the size of the list even if some of the elements might be null.</div> |
| </div> |
| <div class="col-first even-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/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#updateLocation(org.apache.hadoop.hbase.HRegionLocation,boolean,boolean)" class="member-name-link">updateLocation</a><wbr>(<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a> location, |
| boolean checkForEquals, |
| boolean force)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Updates the location with new only if the new location has a higher seqNum than the old one or |
| force is true.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class 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#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> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Iterable">Methods inherited from interface java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html#forEach(java.util.function.Consumer)" title="class or interface in java.lang" class="external-link">forEach</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html#spliterator()" title="class or interface in java.lang" class="external-link">spliterator</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="numNonNullElements"> |
| <h3>numNonNullElements</h3> |
| <div class="member-signature"><span class="modifiers">private final</span> <span class="return-type">int</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-36">numNonNullElements</a></span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="locations"> |
| <h3>locations</h3> |
| <div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>[]</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-42">locations</a></span></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="<init>(org.apache.hadoop.hbase.HRegionLocation...)"> |
| <h3>RegionLocations</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-50">RegionLocations</a></span><wbr><span class="parameters">(<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>... locations)</span></div> |
| <div class="block">Constructs the region location list. The locations array should contain all the locations for |
| known replicas for the region, and should be sorted in replicaId ascending order, although it |
| can contain nulls indicating replicaIds that the locations of which are not known.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>locations</code> - an array of HRegionLocations for the same region range</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(java.util.Collection)"> |
| <h3>RegionLocations</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-85">RegionLocations</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>> locations)</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="size()"> |
| <h3>size</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-93">size</a></span>()</div> |
| <div class="block">Returns the size of the list even if some of the elements might be null.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the size of the list (corresponding to the max replicaId)</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="numNonNullElements()"> |
| <h3>numNonNullElements</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-101">numNonNullElements</a></span>()</div> |
| <div class="block">Returns the size of not-null locations</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the size of not-null locations</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isEmpty()"> |
| <h3>isEmpty</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-109">isEmpty</a></span>()</div> |
| <div class="block">Returns whether there are non-null elements in the list</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>whether there are non-null elements in the list</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="removeByServer(org.apache.hadoop.hbase.ServerName)"> |
| <h3>removeByServer</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-120">removeByServer</a></span><wbr><span class="parameters">(<a href="ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a> serverName)</span></div> |
| <div class="block">Returns a new RegionLocations with the locations removed (set to null) which have the |
| destination server as given.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>serverName</code> - the serverName to remove locations of</dd> |
| <dt>Returns:</dt> |
| <dd>an RegionLocations object with removed locations or the same object if nothing is |
| removed</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="remove(org.apache.hadoop.hbase.HRegionLocation)"> |
| <h3>remove</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-143">remove</a></span><wbr><span class="parameters">(<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a> location)</span></div> |
| <div class="block">Removes the given location from the list</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>location</code> - the location to remove</dd> |
| <dt>Returns:</dt> |
| <dd>an RegionLocations object with removed locations or the same object if nothing is |
| removed</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="remove(int)"> |
| <h3>remove</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-173">remove</a></span><wbr><span class="parameters">(int replicaId)</span></div> |
| <div class="block">Removes location of the given replicaId from the list</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>replicaId</code> - the replicaId of the location to remove</dd> |
| <dt>Returns:</dt> |
| <dd>an RegionLocations object with removed locations or the same object if nothing is |
| removed</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="removeElementsWithNullLocation()"> |
| <h3>removeElementsWithNullLocation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-192">removeElementsWithNullLocation</a></span>()</div> |
| <div class="block">Set the element to null if its getServerName method returns null. Returns null if all the |
| elements are removed.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="mergeLocations(org.apache.hadoop.hbase.RegionLocations)"> |
| <h3>mergeLocations</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-211">mergeLocations</a></span><wbr><span class="parameters">(<a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a> other)</span></div> |
| <div class="block">Merges this RegionLocations list with the given list assuming same range, and keeping the most |
| up to date version of the HRegionLocation entries from either list according to seqNum. If |
| seqNums are equal, the location from the argument (other) is taken.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>other</code> - the locations to merge with</dd> |
| <dt>Returns:</dt> |
| <dd>an RegionLocations object with merged locations or the same object if nothing is merged</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="selectRegionLocation(org.apache.hadoop.hbase.HRegionLocation,org.apache.hadoop.hbase.HRegionLocation,boolean,boolean)"> |
| <h3>selectRegionLocation</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type"><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-258">selectRegionLocation</a></span><wbr><span class="parameters">(<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a> oldLocation, |
| <a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a> location, |
| boolean checkForEquals, |
| boolean force)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="updateLocation(org.apache.hadoop.hbase.HRegionLocation,boolean,boolean)"> |
| <h3>updateLocation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="RegionLocations.html" title="class in org.apache.hadoop.hbase">RegionLocations</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-284">updateLocation</a></span><wbr><span class="parameters">(<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a> location, |
| boolean checkForEquals, |
| boolean force)</span></div> |
| <div class="block">Updates the location with new only if the new location has a higher seqNum than the old one or |
| force is true.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>location</code> - the location to add or update</dd> |
| <dd><code>checkForEquals</code> - whether to update the location if seqNums for the HRegionLocations for |
| the old and new location are the same</dd> |
| <dd><code>force</code> - whether to force update</dd> |
| <dt>Returns:</dt> |
| <dd>an RegionLocations object with updated locations or the same object if nothing is |
| updated</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isGreaterThan(long,long,boolean)"> |
| <h3>isGreaterThan</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-314">isGreaterThan</a></span><wbr><span class="parameters">(long a, |
| long b, |
| boolean checkForEquals)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getRegionLocation(int)"> |
| <h3>getRegionLocation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-318">getRegionLocation</a></span><wbr><span class="parameters">(int replicaId)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getRegionLocationByRegionName(byte[])"> |
| <h3>getRegionLocationByRegionName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-331">getRegionLocationByRegionName</a></span><wbr><span class="parameters">(byte[] regionName)</span></div> |
| <div class="block">Returns the region location from the list for matching regionName, which can be regionName or |
| encodedRegionName</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>regionName</code> - regionName or encodedRegionName</dd> |
| <dt>Returns:</dt> |
| <dd>HRegionLocation found or null</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getRegionLocations()"> |
| <h3>getRegionLocations</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>[]</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-345">getRegionLocations</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDefaultRegionLocation()"> |
| <h3>getDefaultRegionLocation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-349">getDefaultRegionLocation</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getRegionLocation()"> |
| <h3>getRegionLocation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-356">getRegionLocation</a></span>()</div> |
| <div class="block">Returns the first not-null region location in the list</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="iterator()"> |
| <h3>iterator</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Iterator.html" title="class or interface in java.util" class="external-link">Iterator</a><<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-365">iterator</a></span>()</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html#iterator()" title="class or interface in java.lang" class="external-link">iterator</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a><<a href="HRegionLocation.html" title="class in org.apache.hadoop.hbase">HRegionLocation</a>></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toString()"> |
| <h3>toString</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <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> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/RegionLocations.html#line-370">toString</a></span>()</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><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></code> in class <code><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></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 © 2007–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |