| <!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>RegionSplitter (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="RegionSplitter (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/RegionSplitter.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/util/RegionSplitCalculator.html" title="class in org.apache.hadoop.hbase.util"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.DecimalStringSplit.html" title="class in org.apache.hadoop.hbase.util"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/hbase/util/RegionSplitter.html" target="_top">Frames</a></li> |
| <li><a href="RegionSplitter.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </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="subNavList"> |
| <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> |
| <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.util</div> |
| <h2 title="Class RegionSplitter" class="title">Class RegionSplitter</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.hbase.util.RegionSplitter</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Private |
| public class <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.141">RegionSplitter</a> |
| extends <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></pre> |
| <div class="block">The <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html" title="class in org.apache.hadoop.hbase.util"><code>RegionSplitter</code></a> class provides several utilities to help in the |
| administration lifecycle for developers who choose to manually split regions |
| instead of having HBase handle that automatically. The most useful utilities |
| are: |
| <p> |
| <ul> |
| <li>Create a table with a specified number of pre-split regions |
| <li>Execute a rolling split of all regions on an existing table |
| </ul> |
| <p> |
| Both operations can be safely done on a live server. |
| <p> |
| <b>Question:</b> How do I turn off automatic splitting? <br> |
| <b>Answer:</b> Automatic splitting is determined by the configuration value |
| <i>HConstants.HREGION_MAX_FILESIZE</i>. It is not recommended that you set this |
| to Long.MAX_VALUE in case you forget about manual splits. A suggested setting |
| is 100GB, which would result in > 1hr major compactions if reached. |
| <p> |
| <b>Question:</b> Why did the original authors decide to manually split? <br> |
| <b>Answer:</b> Specific workload characteristics of our use case allowed us |
| to benefit from a manual split system. |
| <p> |
| <ul> |
| <li>Data (~1k) that would grow instead of being replaced |
| <li>Data growth was roughly uniform across all regions |
| <li>OLTP workload. Data loss is a big deal. |
| </ul> |
| <p> |
| <b>Question:</b> Why is manual splitting good for this workload? <br> |
| <b>Answer:</b> Although automated splitting is not a bad option, there are |
| benefits to manual splitting. |
| <p> |
| <ul> |
| <li>With growing amounts of data, splits will continually be needed. Since |
| you always know exactly what regions you have, long-term debugging and |
| profiling is much easier with manual splits. It is hard to trace the logs to |
| understand region level problems if it keeps splitting and getting renamed. |
| <li>Data offlining bugs + unknown number of split regions == oh crap! If an |
| WAL or StoreFile was mistakenly unprocessed by HBase due to a weird bug and |
| you notice it a day or so later, you can be assured that the regions |
| specified in these files are the same as the current regions and you have |
| less headaches trying to restore/replay your data. |
| <li>You can finely tune your compaction algorithm. With roughly uniform data |
| growth, it's easy to cause split / compaction storms as the regions all |
| roughly hit the same data size at the same time. With manual splits, you can |
| let staggered, time-based major compactions spread out your network IO load. |
| </ul> |
| <p> |
| <b>Question:</b> What's the optimal number of pre-split regions to create? <br> |
| <b>Answer:</b> Mileage will vary depending upon your application. |
| <p> |
| The short answer for our application is that we started with 10 pre-split |
| regions / server and watched our data growth over time. It's better to err on |
| the side of too little regions and rolling split later. |
| <p> |
| The more complicated answer is that this depends upon the largest storefile |
| in your region. With a growing data size, this will get larger over time. You |
| want the largest region to be just big enough that the |
| <a href="../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver"><code>HStore</code></a> compact |
| selection algorithm only compacts it due to a timed major. If you don't, your |
| cluster can be prone to compaction storms as the algorithm decides to run |
| major compactions on a large series of regions all at once. Note that |
| compaction storms are due to the uniform data growth, not the manual split |
| decision. |
| <p> |
| If you pre-split your regions too thin, you can increase the major compaction |
| interval by configuring HConstants.MAJOR_COMPACTION_PERIOD. If your data size |
| grows too large, use this script to perform a network IO safe rolling split |
| of all regions.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Class and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.DecimalStringSplit.html" title="class in org.apache.hadoop.hbase.util">RegionSplitter.DecimalStringSplit</a></span></code> |
| <div class="block">The format of a DecimalStringSplit region boundary is the ASCII representation of |
| reversed sequential number, or any other uniformly distributed decimal value.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.HexStringSplit.html" title="class in org.apache.hadoop.hbase.util">RegionSplitter.HexStringSplit</a></span></code> |
| <div class="block">HexStringSplit is a well-known <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util"><code>RegionSplitter.SplitAlgorithm</code></a> for choosing region |
| boundaries.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.NumberStringSplit.html" title="class in org.apache.hadoop.hbase.util">RegionSplitter.NumberStringSplit</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a></span></code> |
| <div class="block">A generic interface for the RegionSplitter code to use for all it's |
| functionality.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.UniformSplit.html" title="class in org.apache.hadoop.hbase.util">RegionSplitter.UniformSplit</a></span></code> |
| <div class="block">A SplitAlgorithm that divides the space of possible keys evenly.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- =========== 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"> </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 static org.slf4j.Logger</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html#LOG">LOG</a></span></code> </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"> </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/util/RegionSplitter.html#RegionSplitter--">RegionSplitter</a></span>()</code> </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"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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>(package private) static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html#createPresplitTable-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm-java.lang.String:A-org.apache.hadoop.conf.Configuration-">createPresplitTable</a></span>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> tableName, |
| <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a> splitAlgo, |
| <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>[] columnFamilies, |
| org.apache.hadoop.conf.Configuration conf)</code> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>private static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html#getRegionServerCount-org.apache.hadoop.hbase.client.Connection-">getRegionServerCount</a></span>(<a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client">Connection</a> connection)</code> |
| <div class="block">Alternative getCurrentNrHRS which is no longer available.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>(package private) static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util">LinkedList</a><<a href="../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a><byte[],byte[]>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html#getSplits-org.apache.hadoop.hbase.client.Connection-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm-">getSplits</a></span>(<a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client">Connection</a> connection, |
| <a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> tableName, |
| <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a> splitAlgo)</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>private static <a href="../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a><org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html#getTableDirAndSplitFile-org.apache.hadoop.conf.Configuration-org.apache.hadoop.hbase.TableName-">getTableDirAndSplitFile</a></span>(org.apache.hadoop.conf.Configuration conf, |
| <a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> tableName)</code> </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html#main-java.lang.String:A-">main</a></span>(<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>[] args)</code> |
| <div class="block">The main function for the RegionSplitter application.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html#newSplitAlgoInstance-org.apache.hadoop.conf.Configuration-java.lang.String-">newSplitAlgoInstance</a></span>(org.apache.hadoop.conf.Configuration conf, |
| <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> splitClassName)</code> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>private static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html#readFile-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">readFile</a></span>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path path)</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>(package private) static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html#rollingSplit-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm-org.apache.hadoop.conf.Configuration-">rollingSplit</a></span>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> tableName, |
| <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a> splitAlgo, |
| org.apache.hadoop.conf.Configuration conf)</code> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>(package private) static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util">LinkedList</a><<a href="../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a><byte[],byte[]>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.html#splitScan-java.util.LinkedList-org.apache.hadoop.hbase.client.Connection-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm-">splitScan</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util">LinkedList</a><<a href="../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a><byte[],byte[]>> regionList, |
| <a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client">Connection</a> connection, |
| <a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> tableName, |
| <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a> splitAlgo)</code> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class 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="blockListLast"> |
| <li class="blockList"> |
| <h4>LOG</h4> |
| <pre>private static final org.slf4j.Logger <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.142">LOG</a></pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="RegionSplitter--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>RegionSplitter</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.141">RegionSplitter</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="main-java.lang.String:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>main</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.303">main</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>[] args) |
| 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>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>, |
| org.apache.hbase.thirdparty.org.apache.commons.cli.ParseException</pre> |
| <div class="block">The main function for the RegionSplitter application. Common uses: |
| <p> |
| <ul> |
| <li>create a table named 'myTable' with 60 pre-split regions containing 2 |
| column families 'test' & 'rs', assuming the keys are hex-encoded ASCII: |
| <ul> |
| <li>bin/hbase org.apache.hadoop.hbase.util.RegionSplitter -c 60 -f test:rs |
| myTable HexStringSplit |
| </ul> |
| <li>create a table named 'myTable' with 50 pre-split regions, |
| assuming the keys are decimal-encoded ASCII: |
| <ul> |
| <li>bin/hbase org.apache.hadoop.hbase.util.RegionSplitter -c 50 |
| myTable DecimalStringSplit |
| </ul> |
| <li>perform a rolling split of 'myTable' (i.e. 60 => 120 regions), # 2 |
| outstanding splits at a time, assuming keys are uniformly distributed |
| bytes: |
| <ul> |
| <li>bin/hbase org.apache.hadoop.hbase.util.RegionSplitter -r -o 2 myTable |
| UniformSplit |
| </ul> |
| </ul> |
| |
| There are three SplitAlgorithms built into RegionSplitter, HexStringSplit, |
| DecimalStringSplit, and UniformSplit. These are different strategies for |
| choosing region boundaries. See their source code for details.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>args</code> - Usage: RegionSplitter <TABLE> <SPLITALGORITHM> |
| <-c <# regions> -f <family:family:...> | -r |
| [-o <# outstanding splits>]> |
| [-D <conf.param=value>]</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> - HBase IO problem</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code> - user requested exit</dd> |
| <dd><code>org.apache.hbase.thirdparty.org.apache.commons.cli.ParseException</code> - problem parsing user input</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createPresplitTable-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm-java.lang.String:A-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createPresplitTable</h4> |
| <pre>static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.387">createPresplitTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> tableName, |
| <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a> splitAlgo, |
| <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>[] columnFamilies, |
| org.apache.hadoop.conf.Configuration conf) |
| 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>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</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> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getRegionServerCount-org.apache.hadoop.hbase.client.Connection-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRegionServerCount</h4> |
| <pre>private static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.435">getRegionServerCount</a>(<a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client">Connection</a> connection) |
| 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">Alternative getCurrentNrHRS which is no longer available.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>connection</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Rough count of regionservers out on cluster.</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> - if a remote or network exception occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="readFile-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readFile</h4> |
| <pre>private static byte[] <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.442">readFile</a>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path path) |
| 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="rollingSplit-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rollingSplit</h4> |
| <pre>static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.453">rollingSplit</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> tableName, |
| <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a> splitAlgo, |
| org.apache.hadoop.conf.Configuration conf) |
| 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>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</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> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newSplitAlgoInstance-org.apache.hadoop.conf.Configuration-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newSplitAlgoInstance</h4> |
| <pre>public static <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.657">newSplitAlgoInstance</a>(org.apache.hadoop.conf.Configuration conf, |
| <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> splitClassName) |
| 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> - if the specified SplitAlgorithm class couldn't be |
| instantiated</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="splitScan-java.util.LinkedList-org.apache.hadoop.hbase.client.Connection-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>splitScan</h4> |
| <pre>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util">LinkedList</a><<a href="../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a><byte[],byte[]>> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.690">splitScan</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util">LinkedList</a><<a href="../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a><byte[],byte[]>> regionList, |
| <a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client">Connection</a> connection, |
| <a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> tableName, |
| <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a> splitAlgo) |
| 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>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</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> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getTableDirAndSplitFile-org.apache.hadoop.conf.Configuration-org.apache.hadoop.hbase.TableName-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTableDirAndSplitFile</h4> |
| <pre>private static <a href="../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a><org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.784">getTableDirAndSplitFile</a>(org.apache.hadoop.conf.Configuration conf, |
| <a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> 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> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>conf</code> - </dd> |
| <dd><code>tableName</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A Pair where first item is table dir and second is the split file.</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> - if a remote or network exception occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSplits-org.apache.hadoop.hbase.client.Connection-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getSplits</h4> |
| <pre>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util">LinkedList</a><<a href="../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a><byte[],byte[]>> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/RegionSplitter.html#line.792">getSplits</a>(<a href="../../../../../org/apache/hadoop/hbase/client/Connection.html" title="interface in org.apache.hadoop.hbase.client">Connection</a> connection, |
| <a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> tableName, |
| <a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.SplitAlgorithm.html" title="interface in org.apache.hadoop.hbase.util">RegionSplitter.SplitAlgorithm</a> splitAlgo) |
| 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/RegionSplitter.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/util/RegionSplitCalculator.html" title="class in org.apache.hadoop.hbase.util"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/hadoop/hbase/util/RegionSplitter.DecimalStringSplit.html" title="class in org.apache.hadoop.hbase.util"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/hbase/util/RegionSplitter.html" target="_top">Frames</a></li> |
| <li><a href="RegionSplitter.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </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="subNavList"> |
| <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> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2007–2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |