hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [11/41] hbase-site git commit: Published site at 82d554e3783372cc6b05489452c815b57c06f6cd.
Date Sat, 29 Apr 2017 14:58:48 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/6fbeb554/testapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.html
----------------------------------------------------------------------
diff --git a/testapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.html b/testapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.html
index 8bb0018..f19eb7e 100644
--- a/testapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.html
+++ b/testapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.html
@@ -99,11 +99,11 @@
 <span class="sourceLineNo">091</span>import org.apache.hadoop.hbase.master.RegionStates;<a name="line.91"></a>
 <span class="sourceLineNo">092</span>import org.apache.hadoop.hbase.master.ServerManager;<a name="line.92"></a>
 <span class="sourceLineNo">093</span>import org.apache.hadoop.hbase.regionserver.BloomType;<a name="line.93"></a>
-<span class="sourceLineNo">094</span>import org.apache.hadoop.hbase.regionserver.HRegion;<a name="line.94"></a>
-<span class="sourceLineNo">095</span>import org.apache.hadoop.hbase.regionserver.HRegionServer;<a name="line.95"></a>
-<span class="sourceLineNo">096</span>import org.apache.hadoop.hbase.regionserver.HStore;<a name="line.96"></a>
-<span class="sourceLineNo">097</span>import org.apache.hadoop.hbase.regionserver.InternalScanner;<a name="line.97"></a>
-<span class="sourceLineNo">098</span>import org.apache.hadoop.hbase.regionserver.ChunkCreator;<a name="line.98"></a>
+<span class="sourceLineNo">094</span>import org.apache.hadoop.hbase.regionserver.ChunkCreator;<a name="line.94"></a>
+<span class="sourceLineNo">095</span>import org.apache.hadoop.hbase.regionserver.HRegion;<a name="line.95"></a>
+<span class="sourceLineNo">096</span>import org.apache.hadoop.hbase.regionserver.HRegionServer;<a name="line.96"></a>
+<span class="sourceLineNo">097</span>import org.apache.hadoop.hbase.regionserver.HStore;<a name="line.97"></a>
+<span class="sourceLineNo">098</span>import org.apache.hadoop.hbase.regionserver.InternalScanner;<a name="line.98"></a>
 <span class="sourceLineNo">099</span>import org.apache.hadoop.hbase.regionserver.MemStoreLABImpl;<a name="line.99"></a>
 <span class="sourceLineNo">100</span>import org.apache.hadoop.hbase.regionserver.Region;<a name="line.100"></a>
 <span class="sourceLineNo">101</span>import org.apache.hadoop.hbase.regionserver.RegionScanner;<a name="line.101"></a>
@@ -731,3510 +731,3512 @@
 <span class="sourceLineNo">723</span>    conf.set("mapreduce.jobtracker.staging.root.dir",<a name="line.723"></a>
 <span class="sourceLineNo">724</span>      new Path(root, "mapreduce-jobtracker-staging-root-dir").toString());<a name="line.724"></a>
 <span class="sourceLineNo">725</span>    conf.set("mapreduce.job.working.dir", new Path(root, "mapred-working-dir").toString());<a name="line.725"></a>
-<span class="sourceLineNo">726</span>  }<a name="line.726"></a>
-<span class="sourceLineNo">727</span><a name="line.727"></a>
-<span class="sourceLineNo">728</span><a name="line.728"></a>
-<span class="sourceLineNo">729</span>  /**<a name="line.729"></a>
-<span class="sourceLineNo">730</span>   *  Get the HBase setting for dfs.client.read.shortcircuit from the conf or a system property.<a name="line.730"></a>
-<span class="sourceLineNo">731</span>   *  This allows to specify this parameter on the command line.<a name="line.731"></a>
-<span class="sourceLineNo">732</span>   *   If not set, default is true.<a name="line.732"></a>
-<span class="sourceLineNo">733</span>   */<a name="line.733"></a>
-<span class="sourceLineNo">734</span>  public boolean isReadShortCircuitOn(){<a name="line.734"></a>
-<span class="sourceLineNo">735</span>    final String propName = "hbase.tests.use.shortcircuit.reads";<a name="line.735"></a>
-<span class="sourceLineNo">736</span>    String readOnProp = System.getProperty(propName);<a name="line.736"></a>
-<span class="sourceLineNo">737</span>    if (readOnProp != null){<a name="line.737"></a>
-<span class="sourceLineNo">738</span>      return  Boolean.parseBoolean(readOnProp);<a name="line.738"></a>
-<span class="sourceLineNo">739</span>    } else {<a name="line.739"></a>
-<span class="sourceLineNo">740</span>      return conf.getBoolean(propName, false);<a name="line.740"></a>
-<span class="sourceLineNo">741</span>    }<a name="line.741"></a>
-<span class="sourceLineNo">742</span>  }<a name="line.742"></a>
-<span class="sourceLineNo">743</span><a name="line.743"></a>
-<span class="sourceLineNo">744</span>  /** Enable the short circuit read, unless configured differently.<a name="line.744"></a>
-<span class="sourceLineNo">745</span>   * Set both HBase and HDFS settings, including skipping the hdfs checksum checks.<a name="line.745"></a>
-<span class="sourceLineNo">746</span>   */<a name="line.746"></a>
-<span class="sourceLineNo">747</span>  private void enableShortCircuit() {<a name="line.747"></a>
-<span class="sourceLineNo">748</span>    if (isReadShortCircuitOn()) {<a name="line.748"></a>
-<span class="sourceLineNo">749</span>      String curUser = System.getProperty("user.name");<a name="line.749"></a>
-<span class="sourceLineNo">750</span>      LOG.info("read short circuit is ON for user " + curUser);<a name="line.750"></a>
-<span class="sourceLineNo">751</span>      // read short circuit, for hdfs<a name="line.751"></a>
-<span class="sourceLineNo">752</span>      conf.set("dfs.block.local-path-access.user", curUser);<a name="line.752"></a>
-<span class="sourceLineNo">753</span>      // read short circuit, for hbase<a name="line.753"></a>
-<span class="sourceLineNo">754</span>      conf.setBoolean("dfs.client.read.shortcircuit", true);<a name="line.754"></a>
-<span class="sourceLineNo">755</span>      // Skip checking checksum, for the hdfs client and the datanode<a name="line.755"></a>
-<span class="sourceLineNo">756</span>      conf.setBoolean("dfs.client.read.shortcircuit.skip.checksum", true);<a name="line.756"></a>
-<span class="sourceLineNo">757</span>    } else {<a name="line.757"></a>
-<span class="sourceLineNo">758</span>      LOG.info("read short circuit is OFF");<a name="line.758"></a>
-<span class="sourceLineNo">759</span>    }<a name="line.759"></a>
-<span class="sourceLineNo">760</span>  }<a name="line.760"></a>
-<span class="sourceLineNo">761</span><a name="line.761"></a>
-<span class="sourceLineNo">762</span>  private String createDirAndSetProperty(final String relPath, String property) {<a name="line.762"></a>
-<span class="sourceLineNo">763</span>    String path = getDataTestDir(relPath).toString();<a name="line.763"></a>
-<span class="sourceLineNo">764</span>    System.setProperty(property, path);<a name="line.764"></a>
-<span class="sourceLineNo">765</span>    conf.set(property, path);<a name="line.765"></a>
-<span class="sourceLineNo">766</span>    new File(path).mkdirs();<a name="line.766"></a>
-<span class="sourceLineNo">767</span>    LOG.info("Setting " + property + " to " + path + " in system properties and HBase conf");<a name="line.767"></a>
-<span class="sourceLineNo">768</span>    return path;<a name="line.768"></a>
-<span class="sourceLineNo">769</span>  }<a name="line.769"></a>
-<span class="sourceLineNo">770</span><a name="line.770"></a>
-<span class="sourceLineNo">771</span>  /**<a name="line.771"></a>
-<span class="sourceLineNo">772</span>   * Shuts down instance created by call to {@link #startMiniDFSCluster(int)}<a name="line.772"></a>
-<span class="sourceLineNo">773</span>   * or does nothing.<a name="line.773"></a>
-<span class="sourceLineNo">774</span>   * @throws IOException<a name="line.774"></a>
-<span class="sourceLineNo">775</span>   */<a name="line.775"></a>
-<span class="sourceLineNo">776</span>  public void shutdownMiniDFSCluster() throws IOException {<a name="line.776"></a>
-<span class="sourceLineNo">777</span>    if (this.dfsCluster != null) {<a name="line.777"></a>
-<span class="sourceLineNo">778</span>      // The below throws an exception per dn, AsynchronousCloseException.<a name="line.778"></a>
-<span class="sourceLineNo">779</span>      this.dfsCluster.shutdown();<a name="line.779"></a>
-<span class="sourceLineNo">780</span>      dfsCluster = null;<a name="line.780"></a>
-<span class="sourceLineNo">781</span>      dataTestDirOnTestFS = null;<a name="line.781"></a>
-<span class="sourceLineNo">782</span>      FSUtils.setFsDefault(this.conf, new Path("file:///"));<a name="line.782"></a>
-<span class="sourceLineNo">783</span>    }<a name="line.783"></a>
-<span class="sourceLineNo">784</span>  }<a name="line.784"></a>
-<span class="sourceLineNo">785</span><a name="line.785"></a>
-<span class="sourceLineNo">786</span>  /**<a name="line.786"></a>
-<span class="sourceLineNo">787</span>   * Call this if you only want a zk cluster.<a name="line.787"></a>
-<span class="sourceLineNo">788</span>   * @see #startMiniZKCluster() if you want zk + dfs + hbase mini cluster.<a name="line.788"></a>
-<span class="sourceLineNo">789</span>   * @throws Exception<a name="line.789"></a>
-<span class="sourceLineNo">790</span>   * @see #shutdownMiniZKCluster()<a name="line.790"></a>
-<span class="sourceLineNo">791</span>   * @return zk cluster started.<a name="line.791"></a>
-<span class="sourceLineNo">792</span>   */<a name="line.792"></a>
-<span class="sourceLineNo">793</span>  public MiniZooKeeperCluster startMiniZKCluster() throws Exception {<a name="line.793"></a>
-<span class="sourceLineNo">794</span>    return startMiniZKCluster(1);<a name="line.794"></a>
-<span class="sourceLineNo">795</span>  }<a name="line.795"></a>
-<span class="sourceLineNo">796</span><a name="line.796"></a>
-<span class="sourceLineNo">797</span>  /**<a name="line.797"></a>
-<span class="sourceLineNo">798</span>   * Call this if you only want a zk cluster.<a name="line.798"></a>
-<span class="sourceLineNo">799</span>   * @param zooKeeperServerNum<a name="line.799"></a>
-<span class="sourceLineNo">800</span>   * @see #startMiniZKCluster() if you want zk + dfs + hbase mini cluster.<a name="line.800"></a>
-<span class="sourceLineNo">801</span>   * @throws Exception<a name="line.801"></a>
-<span class="sourceLineNo">802</span>   * @see #shutdownMiniZKCluster()<a name="line.802"></a>
-<span class="sourceLineNo">803</span>   * @return zk cluster started.<a name="line.803"></a>
-<span class="sourceLineNo">804</span>   */<a name="line.804"></a>
-<span class="sourceLineNo">805</span>  public MiniZooKeeperCluster startMiniZKCluster(<a name="line.805"></a>
-<span class="sourceLineNo">806</span>      final int zooKeeperServerNum,<a name="line.806"></a>
-<span class="sourceLineNo">807</span>      final int ... clientPortList)<a name="line.807"></a>
-<span class="sourceLineNo">808</span>      throws Exception {<a name="line.808"></a>
-<span class="sourceLineNo">809</span>    setupClusterTestDir();<a name="line.809"></a>
-<span class="sourceLineNo">810</span>    return startMiniZKCluster(clusterTestDir, zooKeeperServerNum, clientPortList);<a name="line.810"></a>
-<span class="sourceLineNo">811</span>  }<a name="line.811"></a>
-<span class="sourceLineNo">812</span><a name="line.812"></a>
-<span class="sourceLineNo">813</span>  private MiniZooKeeperCluster startMiniZKCluster(final File dir)<a name="line.813"></a>
-<span class="sourceLineNo">814</span>    throws Exception {<a name="line.814"></a>
-<span class="sourceLineNo">815</span>    return startMiniZKCluster(dir, 1, null);<a name="line.815"></a>
-<span class="sourceLineNo">816</span>  }<a name="line.816"></a>
-<span class="sourceLineNo">817</span><a name="line.817"></a>
-<span class="sourceLineNo">818</span>  /**<a name="line.818"></a>
-<span class="sourceLineNo">819</span>   * Start a mini ZK cluster. If the property "test.hbase.zookeeper.property.clientPort" is set<a name="line.819"></a>
-<span class="sourceLineNo">820</span>   *  the port mentionned is used as the default port for ZooKeeper.<a name="line.820"></a>
-<span class="sourceLineNo">821</span>   */<a name="line.821"></a>
-<span class="sourceLineNo">822</span>  private MiniZooKeeperCluster startMiniZKCluster(final File dir,<a name="line.822"></a>
-<span class="sourceLineNo">823</span>      final int zooKeeperServerNum,<a name="line.823"></a>
-<span class="sourceLineNo">824</span>      final int [] clientPortList)<a name="line.824"></a>
-<span class="sourceLineNo">825</span>  throws Exception {<a name="line.825"></a>
-<span class="sourceLineNo">826</span>    if (this.zkCluster != null) {<a name="line.826"></a>
-<span class="sourceLineNo">827</span>      throw new IOException("Cluster already running at " + dir);<a name="line.827"></a>
-<span class="sourceLineNo">828</span>    }<a name="line.828"></a>
-<span class="sourceLineNo">829</span>    this.passedZkCluster = false;<a name="line.829"></a>
-<span class="sourceLineNo">830</span>    this.zkCluster = new MiniZooKeeperCluster(this.getConfiguration());<a name="line.830"></a>
-<span class="sourceLineNo">831</span>    final int defPort = this.conf.getInt("test.hbase.zookeeper.property.clientPort", 0);<a name="line.831"></a>
-<span class="sourceLineNo">832</span>    if (defPort &gt; 0){<a name="line.832"></a>
-<span class="sourceLineNo">833</span>      // If there is a port in the config file, we use it.<a name="line.833"></a>
-<span class="sourceLineNo">834</span>      this.zkCluster.setDefaultClientPort(defPort);<a name="line.834"></a>
-<span class="sourceLineNo">835</span>    }<a name="line.835"></a>
-<span class="sourceLineNo">836</span><a name="line.836"></a>
-<span class="sourceLineNo">837</span>    if (clientPortList != null) {<a name="line.837"></a>
-<span class="sourceLineNo">838</span>      // Ignore extra client ports<a name="line.838"></a>
-<span class="sourceLineNo">839</span>      int clientPortListSize = (clientPortList.length &lt;= zooKeeperServerNum) ?<a name="line.839"></a>
-<span class="sourceLineNo">840</span>          clientPortList.length : zooKeeperServerNum;<a name="line.840"></a>
-<span class="sourceLineNo">841</span>      for (int i=0; i &lt; clientPortListSize; i++) {<a name="line.841"></a>
-<span class="sourceLineNo">842</span>        this.zkCluster.addClientPort(clientPortList[i]);<a name="line.842"></a>
-<span class="sourceLineNo">843</span>      }<a name="line.843"></a>
-<span class="sourceLineNo">844</span>    }<a name="line.844"></a>
-<span class="sourceLineNo">845</span>    int clientPort =   this.zkCluster.startup(dir,zooKeeperServerNum);<a name="line.845"></a>
-<span class="sourceLineNo">846</span>    this.conf.set(HConstants.ZOOKEEPER_CLIENT_PORT,<a name="line.846"></a>
-<span class="sourceLineNo">847</span>      Integer.toString(clientPort));<a name="line.847"></a>
-<span class="sourceLineNo">848</span>    return this.zkCluster;<a name="line.848"></a>
-<span class="sourceLineNo">849</span>  }<a name="line.849"></a>
-<span class="sourceLineNo">850</span><a name="line.850"></a>
-<span class="sourceLineNo">851</span>  /**<a name="line.851"></a>
-<span class="sourceLineNo">852</span>   * Shuts down zk cluster created by call to {@link #startMiniZKCluster(File)}<a name="line.852"></a>
-<span class="sourceLineNo">853</span>   * or does nothing.<a name="line.853"></a>
-<span class="sourceLineNo">854</span>   * @throws IOException<a name="line.854"></a>
-<span class="sourceLineNo">855</span>   * @see #startMiniZKCluster()<a name="line.855"></a>
-<span class="sourceLineNo">856</span>   */<a name="line.856"></a>
-<span class="sourceLineNo">857</span>  public void shutdownMiniZKCluster() throws IOException {<a name="line.857"></a>
-<span class="sourceLineNo">858</span>    if (this.zkCluster != null) {<a name="line.858"></a>
-<span class="sourceLineNo">859</span>      this.zkCluster.shutdown();<a name="line.859"></a>
-<span class="sourceLineNo">860</span>      this.zkCluster = null;<a name="line.860"></a>
-<span class="sourceLineNo">861</span>    }<a name="line.861"></a>
-<span class="sourceLineNo">862</span>  }<a name="line.862"></a>
-<span class="sourceLineNo">863</span><a name="line.863"></a>
-<span class="sourceLineNo">864</span>  /**<a name="line.864"></a>
-<span class="sourceLineNo">865</span>   * Start up a minicluster of hbase, dfs, and zookeeper.<a name="line.865"></a>
-<span class="sourceLineNo">866</span>   * @throws Exception<a name="line.866"></a>
-<span class="sourceLineNo">867</span>   * @return Mini hbase cluster instance created.<a name="line.867"></a>
-<span class="sourceLineNo">868</span>   * @see {@link #shutdownMiniDFSCluster()}<a name="line.868"></a>
-<span class="sourceLineNo">869</span>   */<a name="line.869"></a>
-<span class="sourceLineNo">870</span>  public MiniHBaseCluster startMiniCluster() throws Exception {<a name="line.870"></a>
-<span class="sourceLineNo">871</span>    return startMiniCluster(1, 1);<a name="line.871"></a>
-<span class="sourceLineNo">872</span>  }<a name="line.872"></a>
-<span class="sourceLineNo">873</span><a name="line.873"></a>
-<span class="sourceLineNo">874</span>  /**<a name="line.874"></a>
-<span class="sourceLineNo">875</span>   * Start up a minicluster of hbase, dfs, and zookeeper where WAL's walDir is created separately.<a name="line.875"></a>
-<span class="sourceLineNo">876</span>   * @throws Exception<a name="line.876"></a>
-<span class="sourceLineNo">877</span>   * @return Mini hbase cluster instance created.<a name="line.877"></a>
-<span class="sourceLineNo">878</span>   * @see {@link #shutdownMiniDFSCluster()}<a name="line.878"></a>
-<span class="sourceLineNo">879</span>   */<a name="line.879"></a>
-<span class="sourceLineNo">880</span>  public MiniHBaseCluster startMiniCluster(boolean withWALDir) throws Exception {<a name="line.880"></a>
-<span class="sourceLineNo">881</span>    return startMiniCluster(1, 1, 1, null, null, null, false, withWALDir);<a name="line.881"></a>
-<span class="sourceLineNo">882</span>  }<a name="line.882"></a>
-<span class="sourceLineNo">883</span><a name="line.883"></a>
-<span class="sourceLineNo">884</span>  /**<a name="line.884"></a>
-<span class="sourceLineNo">885</span>   * Start up a minicluster of hbase, dfs, and zookeeper.<a name="line.885"></a>
-<span class="sourceLineNo">886</span>   * Set the &lt;code&gt;create&lt;/code&gt; flag to create root or data directory path or not<a name="line.886"></a>
-<span class="sourceLineNo">887</span>   * (will overwrite if dir already exists)<a name="line.887"></a>
-<span class="sourceLineNo">888</span>   * @throws Exception<a name="line.888"></a>
-<span class="sourceLineNo">889</span>   * @return Mini hbase cluster instance created.<a name="line.889"></a>
-<span class="sourceLineNo">890</span>   * @see {@link #shutdownMiniDFSCluster()}<a name="line.890"></a>
-<span class="sourceLineNo">891</span>   */<a name="line.891"></a>
-<span class="sourceLineNo">892</span>  public MiniHBaseCluster startMiniCluster(final int numSlaves, boolean create)<a name="line.892"></a>
-<span class="sourceLineNo">893</span>  throws Exception {<a name="line.893"></a>
-<span class="sourceLineNo">894</span>    return startMiniCluster(1, numSlaves, create);<a name="line.894"></a>
-<span class="sourceLineNo">895</span>  }<a name="line.895"></a>
-<span class="sourceLineNo">896</span><a name="line.896"></a>
-<span class="sourceLineNo">897</span>  /**<a name="line.897"></a>
-<span class="sourceLineNo">898</span>   * Start up a minicluster of hbase, optionally dfs, and zookeeper.<a name="line.898"></a>
-<span class="sourceLineNo">899</span>   * Modifies Configuration.  Homes the cluster data directory under a random<a name="line.899"></a>
-<span class="sourceLineNo">900</span>   * subdirectory in a directory under System property test.build.data.<a name="line.900"></a>
-<span class="sourceLineNo">901</span>   * Directory is cleaned up on exit.<a name="line.901"></a>
-<span class="sourceLineNo">902</span>   * @param numSlaves Number of slaves to start up.  We'll start this many<a name="line.902"></a>
-<span class="sourceLineNo">903</span>   * datanodes and regionservers.  If numSlaves is &gt; 1, then make sure<a name="line.903"></a>
-<span class="sourceLineNo">904</span>   * hbase.regionserver.info.port is -1 (i.e. no ui per regionserver) otherwise<a name="line.904"></a>
-<span class="sourceLineNo">905</span>   * bind errors.<a name="line.905"></a>
-<span class="sourceLineNo">906</span>   * @throws Exception<a name="line.906"></a>
-<span class="sourceLineNo">907</span>   * @see {@link #shutdownMiniCluster()}<a name="line.907"></a>
-<span class="sourceLineNo">908</span>   * @return Mini hbase cluster instance created.<a name="line.908"></a>
-<span class="sourceLineNo">909</span>   */<a name="line.909"></a>
-<span class="sourceLineNo">910</span>  public MiniHBaseCluster startMiniCluster(final int numSlaves)<a name="line.910"></a>
-<span class="sourceLineNo">911</span>  throws Exception {<a name="line.911"></a>
-<span class="sourceLineNo">912</span>    return startMiniCluster(1, numSlaves, false);<a name="line.912"></a>
-<span class="sourceLineNo">913</span>  }<a name="line.913"></a>
-<span class="sourceLineNo">914</span><a name="line.914"></a>
-<span class="sourceLineNo">915</span>  public MiniHBaseCluster startMiniCluster(final int numSlaves, boolean create, boolean withWALDir)<a name="line.915"></a>
-<span class="sourceLineNo">916</span>          throws Exception {<a name="line.916"></a>
-<span class="sourceLineNo">917</span>    return startMiniCluster(1, numSlaves, numSlaves, null, null, null, create, withWALDir);<a name="line.917"></a>
-<span class="sourceLineNo">918</span>  }<a name="line.918"></a>
-<span class="sourceLineNo">919</span><a name="line.919"></a>
-<span class="sourceLineNo">920</span>  /**<a name="line.920"></a>
-<span class="sourceLineNo">921</span>   * Start minicluster. Whether to create a new root or data dir path even if such a path<a name="line.921"></a>
-<span class="sourceLineNo">922</span>   * has been created earlier is decided based on flag &lt;code&gt;create&lt;/code&gt;<a name="line.922"></a>
-<span class="sourceLineNo">923</span>   * @throws Exception<a name="line.923"></a>
-<span class="sourceLineNo">924</span>   * @see {@link #shutdownMiniCluster()}<a name="line.924"></a>
-<span class="sourceLineNo">925</span>   * @return Mini hbase cluster instance created.<a name="line.925"></a>
-<span class="sourceLineNo">926</span>   */<a name="line.926"></a>
-<span class="sourceLineNo">927</span>  public MiniHBaseCluster startMiniCluster(final int numMasters,<a name="line.927"></a>
-<span class="sourceLineNo">928</span>      final int numSlaves, boolean create)<a name="line.928"></a>
-<span class="sourceLineNo">929</span>    throws Exception {<a name="line.929"></a>
-<span class="sourceLineNo">930</span>      return startMiniCluster(numMasters, numSlaves, null, create);<a name="line.930"></a>
-<span class="sourceLineNo">931</span>  }<a name="line.931"></a>
-<span class="sourceLineNo">932</span><a name="line.932"></a>
-<span class="sourceLineNo">933</span>  /**<a name="line.933"></a>
-<span class="sourceLineNo">934</span>   * start minicluster<a name="line.934"></a>
-<span class="sourceLineNo">935</span>   * @throws Exception<a name="line.935"></a>
-<span class="sourceLineNo">936</span>   * @see {@link #shutdownMiniCluster()}<a name="line.936"></a>
-<span class="sourceLineNo">937</span>   * @return Mini hbase cluster instance created.<a name="line.937"></a>
-<span class="sourceLineNo">938</span>   */<a name="line.938"></a>
-<span class="sourceLineNo">939</span>  public MiniHBaseCluster startMiniCluster(final int numMasters,<a name="line.939"></a>
-<span class="sourceLineNo">940</span>    final int numSlaves)<a name="line.940"></a>
-<span class="sourceLineNo">941</span>  throws Exception {<a name="line.941"></a>
-<span class="sourceLineNo">942</span>    return startMiniCluster(numMasters, numSlaves, null, false);<a name="line.942"></a>
-<span class="sourceLineNo">943</span>  }<a name="line.943"></a>
-<span class="sourceLineNo">944</span><a name="line.944"></a>
-<span class="sourceLineNo">945</span>  public MiniHBaseCluster startMiniCluster(final int numMasters,<a name="line.945"></a>
-<span class="sourceLineNo">946</span>      final int numSlaves, final String[] dataNodeHosts, boolean create)<a name="line.946"></a>
-<span class="sourceLineNo">947</span>      throws Exception {<a name="line.947"></a>
-<span class="sourceLineNo">948</span>    return startMiniCluster(numMasters, numSlaves, numSlaves, dataNodeHosts,<a name="line.948"></a>
-<span class="sourceLineNo">949</span>        null, null, create, false);<a name="line.949"></a>
-<span class="sourceLineNo">950</span>  }<a name="line.950"></a>
-<span class="sourceLineNo">951</span><a name="line.951"></a>
-<span class="sourceLineNo">952</span>  /**<a name="line.952"></a>
-<span class="sourceLineNo">953</span>   * Start up a minicluster of hbase, optionally dfs, and zookeeper.<a name="line.953"></a>
-<span class="sourceLineNo">954</span>   * Modifies Configuration.  Homes the cluster data directory under a random<a name="line.954"></a>
-<span class="sourceLineNo">955</span>   * subdirectory in a directory under System property test.build.data.<a name="line.955"></a>
-<span class="sourceLineNo">956</span>   * Directory is cleaned up on exit.<a name="line.956"></a>
-<span class="sourceLineNo">957</span>   * @param numMasters Number of masters to start up.  We'll start this many<a name="line.957"></a>
-<span class="sourceLineNo">958</span>   * hbase masters.  If numMasters &gt; 1, you can find the active/primary master<a name="line.958"></a>
-<span class="sourceLineNo">959</span>   * with {@link MiniHBaseCluster#getMaster()}.<a name="line.959"></a>
-<span class="sourceLineNo">960</span>   * @param numSlaves Number of slaves to start up.  We'll start this many<a name="line.960"></a>
-<span class="sourceLineNo">961</span>   * regionservers. If dataNodeHosts == null, this also indicates the number of<a name="line.961"></a>
-<span class="sourceLineNo">962</span>   * datanodes to start. If dataNodeHosts != null, the number of datanodes is<a name="line.962"></a>
-<span class="sourceLineNo">963</span>   * based on dataNodeHosts.length.<a name="line.963"></a>
-<span class="sourceLineNo">964</span>   * If numSlaves is &gt; 1, then make sure<a name="line.964"></a>
-<span class="sourceLineNo">965</span>   * hbase.regionserver.info.port is -1 (i.e. no ui per regionserver) otherwise<a name="line.965"></a>
-<span class="sourceLineNo">966</span>   * bind errors.<a name="line.966"></a>
-<span class="sourceLineNo">967</span>   * @param dataNodeHosts hostnames DNs to run on.<a name="line.967"></a>
-<span class="sourceLineNo">968</span>   * This is useful if you want to run datanode on distinct hosts for things<a name="line.968"></a>
-<span class="sourceLineNo">969</span>   * like HDFS block location verification.<a name="line.969"></a>
-<span class="sourceLineNo">970</span>   * If you start MiniDFSCluster without host names,<a name="line.970"></a>
-<span class="sourceLineNo">971</span>   * all instances of the datanodes will have the same host name.<a name="line.971"></a>
-<span class="sourceLineNo">972</span>   * @throws Exception<a name="line.972"></a>
-<span class="sourceLineNo">973</span>   * @see {@link #shutdownMiniCluster()}<a name="line.973"></a>
-<span class="sourceLineNo">974</span>   * @return Mini hbase cluster instance created.<a name="line.974"></a>
-<span class="sourceLineNo">975</span>   */<a name="line.975"></a>
-<span class="sourceLineNo">976</span>  public MiniHBaseCluster startMiniCluster(final int numMasters,<a name="line.976"></a>
-<span class="sourceLineNo">977</span>      final int numSlaves, final String[] dataNodeHosts) throws Exception {<a name="line.977"></a>
-<span class="sourceLineNo">978</span>    return startMiniCluster(numMasters, numSlaves, numSlaves, dataNodeHosts,<a name="line.978"></a>
-<span class="sourceLineNo">979</span>        null, null);<a name="line.979"></a>
-<span class="sourceLineNo">980</span>  }<a name="line.980"></a>
-<span class="sourceLineNo">981</span><a name="line.981"></a>
-<span class="sourceLineNo">982</span>  /**<a name="line.982"></a>
-<span class="sourceLineNo">983</span>   * Same as {@link #startMiniCluster(int, int)}, but with custom number of datanodes.<a name="line.983"></a>
-<span class="sourceLineNo">984</span>   * @param numDataNodes Number of data nodes.<a name="line.984"></a>
-<span class="sourceLineNo">985</span>   */<a name="line.985"></a>
-<span class="sourceLineNo">986</span>  public MiniHBaseCluster startMiniCluster(final int numMasters,<a name="line.986"></a>
-<span class="sourceLineNo">987</span>      final int numSlaves, final int numDataNodes) throws Exception {<a name="line.987"></a>
-<span class="sourceLineNo">988</span>    return startMiniCluster(numMasters, numSlaves, numDataNodes, null, null, null);<a name="line.988"></a>
-<span class="sourceLineNo">989</span>  }<a name="line.989"></a>
-<span class="sourceLineNo">990</span><a name="line.990"></a>
-<span class="sourceLineNo">991</span>  /**<a name="line.991"></a>
-<span class="sourceLineNo">992</span>   * Start up a minicluster of hbase, optionally dfs, and zookeeper.<a name="line.992"></a>
-<span class="sourceLineNo">993</span>   * Modifies Configuration.  Homes the cluster data directory under a random<a name="line.993"></a>
-<span class="sourceLineNo">994</span>   * subdirectory in a directory under System property test.build.data.<a name="line.994"></a>
-<span class="sourceLineNo">995</span>   * Directory is cleaned up on exit.<a name="line.995"></a>
-<span class="sourceLineNo">996</span>   * @param numMasters Number of masters to start up.  We'll start this many<a name="line.996"></a>
-<span class="sourceLineNo">997</span>   * hbase masters.  If numMasters &gt; 1, you can find the active/primary master<a name="line.997"></a>
-<span class="sourceLineNo">998</span>   * with {@link MiniHBaseCluster#getMaster()}.<a name="line.998"></a>
-<span class="sourceLineNo">999</span>   * @param numSlaves Number of slaves to start up.  We'll start this many<a name="line.999"></a>
-<span class="sourceLineNo">1000</span>   * regionservers. If dataNodeHosts == null, this also indicates the number of<a name="line.1000"></a>
-<span class="sourceLineNo">1001</span>   * datanodes to start. If dataNodeHosts != null, the number of datanodes is<a name="line.1001"></a>
-<span class="sourceLineNo">1002</span>   * based on dataNodeHosts.length.<a name="line.1002"></a>
-<span class="sourceLineNo">1003</span>   * If numSlaves is &gt; 1, then make sure<a name="line.1003"></a>
-<span class="sourceLineNo">1004</span>   * hbase.regionserver.info.port is -1 (i.e. no ui per regionserver) otherwise<a name="line.1004"></a>
-<span class="sourceLineNo">1005</span>   * bind errors.<a name="line.1005"></a>
-<span class="sourceLineNo">1006</span>   * @param dataNodeHosts hostnames DNs to run on.<a name="line.1006"></a>
-<span class="sourceLineNo">1007</span>   * This is useful if you want to run datanode on distinct hosts for things<a name="line.1007"></a>
-<span class="sourceLineNo">1008</span>   * like HDFS block location verification.<a name="line.1008"></a>
-<span class="sourceLineNo">1009</span>   * If you start MiniDFSCluster without host names,<a name="line.1009"></a>
-<span class="sourceLineNo">1010</span>   * all instances of the datanodes will have the same host name.<a name="line.1010"></a>
-<span class="sourceLineNo">1011</span>   * @param masterClass The class to use as HMaster, or null for default<a name="line.1011"></a>
-<span class="sourceLineNo">1012</span>   * @param regionserverClass The class to use as HRegionServer, or null for<a name="line.1012"></a>
-<span class="sourceLineNo">1013</span>   * default<a name="line.1013"></a>
-<span class="sourceLineNo">1014</span>   * @throws Exception<a name="line.1014"></a>
-<span class="sourceLineNo">1015</span>   * @see {@link #shutdownMiniCluster()}<a name="line.1015"></a>
-<span class="sourceLineNo">1016</span>   * @return Mini hbase cluster instance created.<a name="line.1016"></a>
-<span class="sourceLineNo">1017</span>   */<a name="line.1017"></a>
-<span class="sourceLineNo">1018</span>  public MiniHBaseCluster startMiniCluster(final int numMasters,<a name="line.1018"></a>
-<span class="sourceLineNo">1019</span>      final int numSlaves, final String[] dataNodeHosts, Class&lt;? extends HMaster&gt; masterClass,<a name="line.1019"></a>
-<span class="sourceLineNo">1020</span>      Class&lt;? extends MiniHBaseCluster.MiniHBaseClusterRegionServer&gt; regionserverClass)<a name="line.1020"></a>
-<span class="sourceLineNo">1021</span>          throws Exception {<a name="line.1021"></a>
-<span class="sourceLineNo">1022</span>    return startMiniCluster(<a name="line.1022"></a>
-<span class="sourceLineNo">1023</span>        numMasters, numSlaves, numSlaves, dataNodeHosts, masterClass, regionserverClass);<a name="line.1023"></a>
-<span class="sourceLineNo">1024</span>  }<a name="line.1024"></a>
-<span class="sourceLineNo">1025</span><a name="line.1025"></a>
-<span class="sourceLineNo">1026</span>  public MiniHBaseCluster startMiniCluster(final int numMasters,<a name="line.1026"></a>
-<span class="sourceLineNo">1027</span>      final int numSlaves, int numDataNodes, final String[] dataNodeHosts,<a name="line.1027"></a>
-<span class="sourceLineNo">1028</span>      Class&lt;? extends HMaster&gt; masterClass,<a name="line.1028"></a>
-<span class="sourceLineNo">1029</span>      Class&lt;? extends MiniHBaseCluster.MiniHBaseClusterRegionServer&gt; regionserverClass)<a name="line.1029"></a>
-<span class="sourceLineNo">1030</span>    throws Exception {<a name="line.1030"></a>
-<span class="sourceLineNo">1031</span>    return startMiniCluster(numMasters, numSlaves, numDataNodes, dataNodeHosts,<a name="line.1031"></a>
-<span class="sourceLineNo">1032</span>        masterClass, regionserverClass, false, false);<a name="line.1032"></a>
-<span class="sourceLineNo">1033</span>  }<a name="line.1033"></a>
-<span class="sourceLineNo">1034</span><a name="line.1034"></a>
-<span class="sourceLineNo">1035</span>  /**<a name="line.1035"></a>
-<span class="sourceLineNo">1036</span>   * Same as {@link #startMiniCluster(int, int, String[], Class, Class)}, but with custom<a name="line.1036"></a>
-<span class="sourceLineNo">1037</span>   * number of datanodes.<a name="line.1037"></a>
-<span class="sourceLineNo">1038</span>   * @param numDataNodes Number of data nodes.<a name="line.1038"></a>
-<span class="sourceLineNo">1039</span>   * @param create Set this flag to create a new<a name="line.1039"></a>
-<span class="sourceLineNo">1040</span>   * root or data directory path or not (will overwrite if exists already).<a name="line.1040"></a>
-<span class="sourceLineNo">1041</span>   */<a name="line.1041"></a>
-<span class="sourceLineNo">1042</span>  public MiniHBaseCluster startMiniCluster(final int numMasters,<a name="line.1042"></a>
-<span class="sourceLineNo">1043</span>    final int numSlaves, int numDataNodes, final String[] dataNodeHosts,<a name="line.1043"></a>
-<span class="sourceLineNo">1044</span>    Class&lt;? extends HMaster&gt; masterClass,<a name="line.1044"></a>
-<span class="sourceLineNo">1045</span>    Class&lt;? extends MiniHBaseCluster.MiniHBaseClusterRegionServer&gt; regionserverClass,<a name="line.1045"></a>
-<span class="sourceLineNo">1046</span>    boolean create, boolean withWALDir)<a name="line.1046"></a>
-<span class="sourceLineNo">1047</span>  throws Exception {<a name="line.1047"></a>
-<span class="sourceLineNo">1048</span>    if (dataNodeHosts != null &amp;&amp; dataNodeHosts.length != 0) {<a name="line.1048"></a>
-<span class="sourceLineNo">1049</span>      numDataNodes = dataNodeHosts.length;<a name="line.1049"></a>
-<span class="sourceLineNo">1050</span>    }<a name="line.1050"></a>
-<span class="sourceLineNo">1051</span><a name="line.1051"></a>
-<span class="sourceLineNo">1052</span>    LOG.info("Starting up minicluster with " + numMasters + " master(s) and " +<a name="line.1052"></a>
-<span class="sourceLineNo">1053</span>        numSlaves + " regionserver(s) and " + numDataNodes + " datanode(s)");<a name="line.1053"></a>
-<span class="sourceLineNo">1054</span><a name="line.1054"></a>
-<span class="sourceLineNo">1055</span>    // If we already put up a cluster, fail.<a name="line.1055"></a>
-<span class="sourceLineNo">1056</span>    if (miniClusterRunning) {<a name="line.1056"></a>
-<span class="sourceLineNo">1057</span>      throw new IllegalStateException("A mini-cluster is already running");<a name="line.1057"></a>
-<span class="sourceLineNo">1058</span>    }<a name="line.1058"></a>
-<span class="sourceLineNo">1059</span>    miniClusterRunning = true;<a name="line.1059"></a>
-<span class="sourceLineNo">1060</span><a name="line.1060"></a>
-<span class="sourceLineNo">1061</span>    setupClusterTestDir();<a name="line.1061"></a>
-<span class="sourceLineNo">1062</span>    System.setProperty(TEST_DIRECTORY_KEY, this.clusterTestDir.getPath());<a name="line.1062"></a>
-<span class="sourceLineNo">1063</span><a name="line.1063"></a>
-<span class="sourceLineNo">1064</span>    // Bring up mini dfs cluster. This spews a bunch of warnings about missing<a name="line.1064"></a>
-<span class="sourceLineNo">1065</span>    // scheme. Complaints are 'Scheme is undefined for build/test/data/dfs/name1'.<a name="line.1065"></a>
-<span class="sourceLineNo">1066</span>    if(this.dfsCluster == null &amp;&amp; !localMode) {<a name="line.1066"></a>
-<span class="sourceLineNo">1067</span>      LOG.info("STARTING DFS");<a name="line.1067"></a>
-<span class="sourceLineNo">1068</span>      dfsCluster = startMiniDFSCluster(numDataNodes, dataNodeHosts);<a name="line.1068"></a>
-<span class="sourceLineNo">1069</span>    } else LOG.info("NOT STARTING DFS");<a name="line.1069"></a>
-<span class="sourceLineNo">1070</span><a name="line.1070"></a>
-<span class="sourceLineNo">1071</span>    // Start up a zk cluster.<a name="line.1071"></a>
-<span class="sourceLineNo">1072</span>    if (this.zkCluster == null) {<a name="line.1072"></a>
-<span class="sourceLineNo">1073</span>      startMiniZKCluster(clusterTestDir);<a name="line.1073"></a>
-<span class="sourceLineNo">1074</span>    }<a name="line.1074"></a>
-<span class="sourceLineNo">1075</span><a name="line.1075"></a>
-<span class="sourceLineNo">1076</span>    // Start the MiniHBaseCluster<a name="line.1076"></a>
-<span class="sourceLineNo">1077</span>    return startMiniHBaseCluster(numMasters, numSlaves, masterClass,<a name="line.1077"></a>
-<span class="sourceLineNo">1078</span>      regionserverClass, create, withWALDir);<a name="line.1078"></a>
-<span class="sourceLineNo">1079</span>  }<a name="line.1079"></a>
-<span class="sourceLineNo">1080</span><a name="line.1080"></a>
-<span class="sourceLineNo">1081</span>  public MiniHBaseCluster startMiniHBaseCluster(final int numMasters, final int numSlaves)<a name="line.1081"></a>
-<span class="sourceLineNo">1082</span>      throws IOException, InterruptedException{<a name="line.1082"></a>
-<span class="sourceLineNo">1083</span>    return startMiniHBaseCluster(numMasters, numSlaves, null, null, false, false);<a name="line.1083"></a>
-<span class="sourceLineNo">1084</span>  }<a name="line.1084"></a>
-<span class="sourceLineNo">1085</span><a name="line.1085"></a>
-<span class="sourceLineNo">1086</span>  /**<a name="line.1086"></a>
-<span class="sourceLineNo">1087</span>   * Starts up mini hbase cluster.  Usually used after call to<a name="line.1087"></a>
-<span class="sourceLineNo">1088</span>   * {@link #startMiniCluster(int, int)} when doing stepped startup of clusters.<a name="line.1088"></a>
-<span class="sourceLineNo">1089</span>   * Usually you won't want this.  You'll usually want {@link #startMiniCluster()}.<a name="line.1089"></a>
-<span class="sourceLineNo">1090</span>   * @param numMasters<a name="line.1090"></a>
-<span class="sourceLineNo">1091</span>   * @param numSlaves<a name="line.1091"></a>
-<span class="sourceLineNo">1092</span>   * @param create Whether to create a<a name="line.1092"></a>
-<span class="sourceLineNo">1093</span>   * root or data directory path or not; will overwrite if exists already.<a name="line.1093"></a>
-<span class="sourceLineNo">1094</span>   * @return Reference to the hbase mini hbase cluster.<a name="line.1094"></a>
-<span class="sourceLineNo">1095</span>   * @throws IOException<a name="line.1095"></a>
-<span class="sourceLineNo">1096</span>   * @throws InterruptedException<a name="line.1096"></a>
-<span class="sourceLineNo">1097</span>   * @see {@link #startMiniCluster()}<a name="line.1097"></a>
-<span class="sourceLineNo">1098</span>   */<a name="line.1098"></a>
-<span class="sourceLineNo">1099</span>  public MiniHBaseCluster startMiniHBaseCluster(final int numMasters,<a name="line.1099"></a>
-<span class="sourceLineNo">1100</span>        final int numSlaves, Class&lt;? extends HMaster&gt; masterClass,<a name="line.1100"></a>
-<span class="sourceLineNo">1101</span>        Class&lt;? extends MiniHBaseCluster.MiniHBaseClusterRegionServer&gt; regionserverClass,<a name="line.1101"></a>
-<span class="sourceLineNo">1102</span>        boolean create, boolean withWALDir)<a name="line.1102"></a>
-<span class="sourceLineNo">1103</span>  throws IOException, InterruptedException {<a name="line.1103"></a>
-<span class="sourceLineNo">1104</span>    // Now do the mini hbase cluster.  Set the hbase.rootdir in config.<a name="line.1104"></a>
-<span class="sourceLineNo">1105</span>    createRootDir(create);<a name="line.1105"></a>
-<span class="sourceLineNo">1106</span>    if (withWALDir) {<a name="line.1106"></a>
-<span class="sourceLineNo">1107</span>      createWALRootDir();<a name="line.1107"></a>
-<span class="sourceLineNo">1108</span>    }<a name="line.1108"></a>
-<span class="sourceLineNo">1109</span>    // Set the hbase.fs.tmp.dir config to make sure that we have some default value. This is<a name="line.1109"></a>
-<span class="sourceLineNo">1110</span>    // for tests that do not read hbase-defaults.xml<a name="line.1110"></a>
-<span class="sourceLineNo">1111</span>    setHBaseFsTmpDir();<a name="line.1111"></a>
-<span class="sourceLineNo">1112</span><a name="line.1112"></a>
-<span class="sourceLineNo">1113</span>    // These settings will make the server waits until this exact number of<a name="line.1113"></a>
-<span class="sourceLineNo">1114</span>    // regions servers are connected.<a name="line.1114"></a>
-<span class="sourceLineNo">1115</span>    if (conf.getInt(ServerManager.WAIT_ON_REGIONSERVERS_MINTOSTART, -1) == -1) {<a name="line.1115"></a>
-<span class="sourceLineNo">1116</span>      conf.setInt(ServerManager.WAIT_ON_REGIONSERVERS_MINTOSTART, numSlaves);<a name="line.1116"></a>
-<span class="sourceLineNo">1117</span>    }<a name="line.1117"></a>
-<span class="sourceLineNo">1118</span>    if (conf.getInt(ServerManager.WAIT_ON_REGIONSERVERS_MAXTOSTART, -1) == -1) {<a name="line.1118"></a>
-<span class="sourceLineNo">1119</span>      conf.setInt(ServerManager.WAIT_ON_REGIONSERVERS_MAXTOSTART, numSlaves);<a name="line.1119"></a>
-<span class="sourceLineNo">1120</span>    }<a name="line.1120"></a>
-<span class="sourceLineNo">1121</span><a name="line.1121"></a>
-<span class="sourceLineNo">1122</span>    Configuration c = new Configuration(this.conf);<a name="line.1122"></a>
-<span class="sourceLineNo">1123</span>    this.hbaseCluster =<a name="line.1123"></a>
-<span class="sourceLineNo">1124</span>        new MiniHBaseCluster(c, numMasters, numSlaves, masterClass, regionserverClass);<a name="line.1124"></a>
-<span class="sourceLineNo">1125</span>    // Don't leave here till we've done a successful scan of the hbase:meta<a name="line.1125"></a>
-<span class="sourceLineNo">1126</span>    Table t = getConnection().getTable(TableName.META_TABLE_NAME);<a name="line.1126"></a>
-<span class="sourceLineNo">1127</span>    ResultScanner s = t.getScanner(new Scan());<a name="line.1127"></a>
-<span class="sourceLineNo">1128</span>    while (s.next() != null) {<a name="line.1128"></a>
-<span class="sourceLineNo">1129</span>      continue;<a name="line.1129"></a>
-<span class="sourceLineNo">1130</span>    }<a name="line.1130"></a>
-<span class="sourceLineNo">1131</span>    s.close();<a name="line.1131"></a>
-<span class="sourceLineNo">1132</span>    t.close();<a name="line.1132"></a>
-<span class="sourceLineNo">1133</span><a name="line.1133"></a>
-<span class="sourceLineNo">1134</span>    getAdmin(); // create immediately the hbaseAdmin<a name="line.1134"></a>
-<span class="sourceLineNo">1135</span>    LOG.info("Minicluster is up");<a name="line.1135"></a>
-<span class="sourceLineNo">1136</span><a name="line.1136"></a>
-<span class="sourceLineNo">1137</span>    return (MiniHBaseCluster)this.hbaseCluster;<a name="line.1137"></a>
-<span class="sourceLineNo">1138</span>  }<a name="line.1138"></a>
-<span class="sourceLineNo">1139</span><a name="line.1139"></a>
-<span class="sourceLineNo">1140</span>  /**<a name="line.1140"></a>
-<span class="sourceLineNo">1141</span>   * Starts the hbase cluster up again after shutting it down previously in a<a name="line.1141"></a>
-<span class="sourceLineNo">1142</span>   * test.  Use this if you want to keep dfs/zk up and just stop/start hbase.<a name="line.1142"></a>
-<span class="sourceLineNo">1143</span>   * @param servers number of region servers<a name="line.1143"></a>
-<span class="sourceLineNo">1144</span>   * @throws IOException<a name="line.1144"></a>
-<span class="sourceLineNo">1145</span>   */<a name="line.1145"></a>
-<span class="sourceLineNo">1146</span>  public void restartHBaseCluster(int servers) throws IOException, InterruptedException {<a name="line.1146"></a>
-<span class="sourceLineNo">1147</span>    if(connection != null){<a name="line.1147"></a>
-<span class="sourceLineNo">1148</span>      connection.close();<a name="line.1148"></a>
-<span class="sourceLineNo">1149</span>      connection = null;<a name="line.1149"></a>
-<span class="sourceLineNo">1150</span>    }<a name="line.1150"></a>
-<span class="sourceLineNo">1151</span>    this.hbaseCluster = new MiniHBaseCluster(this.conf, servers);<a name="line.1151"></a>
-<span class="sourceLineNo">1152</span>    // Don't leave here till we've done a successful scan of the hbase:meta<a name="line.1152"></a>
-<span class="sourceLineNo">1153</span>    Connection conn = ConnectionFactory.createConnection(this.conf);<a name="line.1153"></a>
-<span class="sourceLineNo">1154</span>    Table t = conn.getTable(TableName.META_TABLE_NAME);<a name="line.1154"></a>
-<span class="sourceLineNo">1155</span>    ResultScanner s = t.getScanner(new Scan());<a name="line.1155"></a>
-<span class="sourceLineNo">1156</span>    while (s.next() != null) {<a name="line.1156"></a>
-<span class="sourceLineNo">1157</span>      // do nothing<a name="line.1157"></a>
-<span class="sourceLineNo">1158</span>    }<a name="line.1158"></a>
-<span class="sourceLineNo">1159</span>    LOG.info("HBase has been restarted");<a name="line.1159"></a>
-<span class="sourceLineNo">1160</span>    s.close();<a name="line.1160"></a>
-<span class="sourceLineNo">1161</span>    t.close();<a name="line.1161"></a>
-<span class="sourceLineNo">1162</span>    conn.close();<a name="line.1162"></a>
-<span class="sourceLineNo">1163</span>  }<a name="line.1163"></a>
-<span class="sourceLineNo">1164</span><a name="line.1164"></a>
-<span class="sourceLineNo">1165</span>  /**<a name="line.1165"></a>
-<span class="sourceLineNo">1166</span>   * @return Current mini hbase cluster. Only has something in it after a call<a name="line.1166"></a>
-<span class="sourceLineNo">1167</span>   * to {@link #startMiniCluster()}.<a name="line.1167"></a>
-<span class="sourceLineNo">1168</span>   * @see #startMiniCluster()<a name="line.1168"></a>
-<span class="sourceLineNo">1169</span>   */<a name="line.1169"></a>
-<span class="sourceLineNo">1170</span>  public MiniHBaseCluster getMiniHBaseCluster() {<a name="line.1170"></a>
-<span class="sourceLineNo">1171</span>    if (this.hbaseCluster == null || this.hbaseCluster instanceof MiniHBaseCluster) {<a name="line.1171"></a>
-<span class="sourceLineNo">1172</span>      return (MiniHBaseCluster)this.hbaseCluster;<a name="line.1172"></a>
-<span class="sourceLineNo">1173</span>    }<a name="line.1173"></a>
-<span class="sourceLineNo">1174</span>    throw new RuntimeException(hbaseCluster + " not an instance of " +<a name="line.1174"></a>
-<span class="sourceLineNo">1175</span>                               MiniHBaseCluster.class.getName());<a name="line.1175"></a>
-<span class="sourceLineNo">1176</span>  }<a name="line.1176"></a>
-<span class="sourceLineNo">1177</span><a name="line.1177"></a>
-<span class="sourceLineNo">1178</span>  /**<a name="line.1178"></a>
-<span class="sourceLineNo">1179</span>   * Stops mini hbase, zk, and hdfs clusters.<a name="line.1179"></a>
-<span class="sourceLineNo">1180</span>   * @throws IOException<a name="line.1180"></a>
-<span class="sourceLineNo">1181</span>   * @see {@link #startMiniCluster(int)}<a name="line.1181"></a>
-<span class="sourceLineNo">1182</span>   */<a name="line.1182"></a>
-<span class="sourceLineNo">1183</span>  public void shutdownMiniCluster() throws Exception {<a name="line.1183"></a>
-<span class="sourceLineNo">1184</span>    LOG.info("Shutting down minicluster");<a name="line.1184"></a>
-<span class="sourceLineNo">1185</span>    if (this.connection != null &amp;&amp; !this.connection.isClosed()) {<a name="line.1185"></a>
-<span class="sourceLineNo">1186</span>      this.connection.close();<a name="line.1186"></a>
-<span class="sourceLineNo">1187</span>      this.connection = null;<a name="line.1187"></a>
-<span class="sourceLineNo">1188</span>    }<a name="line.1188"></a>
-<span class="sourceLineNo">1189</span>    shutdownMiniHBaseCluster();<a name="line.1189"></a>
-<span class="sourceLineNo">1190</span>    if (!this.passedZkCluster){<a name="line.1190"></a>
-<span class="sourceLineNo">1191</span>      shutdownMiniZKCluster();<a name="line.1191"></a>
-<span class="sourceLineNo">1192</span>    }<a name="line.1192"></a>
-<span class="sourceLineNo">1193</span>    shutdownMiniDFSCluster();<a name="line.1193"></a>
-<span class="sourceLineNo">1194</span><a name="line.1194"></a>
-<span class="sourceLineNo">1195</span>    cleanupTestDir();<a name="line.1195"></a>
-<span class="sourceLineNo">1196</span>    miniClusterRunning = false;<a name="line.1196"></a>
-<span class="sourceLineNo">1197</span>    LOG.info("Minicluster is down");<a name="line.1197"></a>
-<span class="sourceLineNo">1198</span>  }<a name="line.1198"></a>
-<span class="sourceLineNo">1199</span><a name="line.1199"></a>
-<span class="sourceLineNo">1200</span>  /**<a name="line.1200"></a>
-<span class="sourceLineNo">1201</span>   * @return True if we removed the test dirs<a name="line.1201"></a>
-<span class="sourceLineNo">1202</span>   * @throws IOException<a name="line.1202"></a>
-<span class="sourceLineNo">1203</span>   */<a name="line.1203"></a>
-<span class="sourceLineNo">1204</span>  @Override<a name="line.1204"></a>
-<span class="sourceLineNo">1205</span>  public boolean cleanupTestDir() throws IOException {<a name="line.1205"></a>
-<span class="sourceLineNo">1206</span>    boolean ret = super.cleanupTestDir();<a name="line.1206"></a>
-<span class="sourceLineNo">1207</span>    if (deleteDir(this.clusterTestDir)) {<a name="line.1207"></a>
-<span class="sourceLineNo">1208</span>      this.clusterTestDir = null;<a name="line.1208"></a>
-<span class="sourceLineNo">1209</span>      return ret &amp; true;<a name="line.1209"></a>
-<span class="sourceLineNo">1210</span>    }<a name="line.1210"></a>
-<span class="sourceLineNo">1211</span>    return false;<a name="line.1211"></a>
-<span class="sourceLineNo">1212</span>  }<a name="line.1212"></a>
-<span class="sourceLineNo">1213</span><a name="line.1213"></a>
-<span class="sourceLineNo">1214</span>  /**<a name="line.1214"></a>
-<span class="sourceLineNo">1215</span>   * Shutdown HBase mini cluster.  Does not shutdown zk or dfs if running.<a name="line.1215"></a>
-<span class="sourceLineNo">1216</span>   * @throws IOException<a name="line.1216"></a>
-<span class="sourceLineNo">1217</span>   */<a name="line.1217"></a>
-<span class="sourceLineNo">1218</span>  public void shutdownMiniHBaseCluster() throws IOException {<a name="line.1218"></a>
-<span class="sourceLineNo">1219</span>    if (hbaseAdmin != null) {<a name="line.1219"></a>
-<span class="sourceLineNo">1220</span>      hbaseAdmin.close();<a name="line.1220"></a>
-<span class="sourceLineNo">1221</span>      hbaseAdmin = null;<a name="line.1221"></a>
-<span class="sourceLineNo">1222</span>    }<a name="line.1222"></a>
-<span class="sourceLineNo">1223</span><a name="line.1223"></a>
-<span class="sourceLineNo">1224</span>    // unset the configuration for MIN and MAX RS to start<a name="line.1224"></a>
-<span class="sourceLineNo">1225</span>    conf.setInt(ServerManager.WAIT_ON_REGIONSERVERS_MINTOSTART, -1);<a name="line.1225"></a>
-<span class="sourceLineNo">1226</span>    conf.setInt(ServerManager.WAIT_ON_REGIONSERVERS_MAXTOSTART, -1);<a name="line.1226"></a>
-<span class="sourceLineNo">1227</span>    if (this.hbaseCluster != null) {<a name="line.1227"></a>
-<span class="sourceLineNo">1228</span>      this.hbaseCluster.shutdown();<a name="line.1228"></a>
-<span class="sourceLineNo">1229</span>      // Wait till hbase is down before going on to shutdown zk.<a name="line.1229"></a>
-<span class="sourceLineNo">1230</span>      this.hbaseCluster.waitUntilShutDown();<a name="line.1230"></a>
-<span class="sourceLineNo">1231</span>      this.hbaseCluster = null;<a name="line.1231"></a>
-<span class="sourceLineNo">1232</span>    }<a name="line.1232"></a>
-<span class="sourceLineNo">1233</span><a name="line.1233"></a>
-<span class="sourceLineNo">1234</span>    if (zooKeeperWatcher != null) {<a name="line.1234"></a>
-<span class="sourceLineNo">1235</span>      zooKeeperWatcher.close();<a name="line.1235"></a>
-<span class="sourceLineNo">1236</span>      zooKeeperWatcher = null;<a name="line.1236"></a>
-<span class="sourceLineNo">1237</span>    }<a name="line.1237"></a>
-<span class="sourceLineNo">1238</span>  }<a name="line.1238"></a>
-<span class="sourceLineNo">1239</span><a name="line.1239"></a>
-<span class="sourceLineNo">1240</span>  /**<a name="line.1240"></a>
-<span class="sourceLineNo">1241</span>   * Returns the path to the default root dir the minicluster uses. If &lt;code&gt;create&lt;/code&gt;<a name="line.1241"></a>
-<span class="sourceLineNo">1242</span>   * is true, a new root directory path is fetched irrespective of whether it has been fetched<a name="line.1242"></a>
-<span class="sourceLineNo">1243</span>   * before or not. If false, previous path is used.<a name="line.1243"></a>
-<span class="sourceLineNo">1244</span>   * Note: this does not cause the root dir to be created.<a name="line.1244"></a>
-<span class="sourceLineNo">1245</span>   * @return Fully qualified path for the default hbase root dir<a name="line.1245"></a>
-<span class="sourceLineNo">1246</span>   * @throws IOException<a name="line.1246"></a>
-<span class="sourceLineNo">1247</span>   */<a name="line.1247"></a>
-<span class="sourceLineNo">1248</span>  public Path getDefaultRootDirPath(boolean create) throws IOException {<a name="line.1248"></a>
-<span class="sourceLineNo">1249</span>    if (!create) {<a name="line.1249"></a>
-<span class="sourceLineNo">1250</span>      return getDataTestDirOnTestFS();<a name="line.1250"></a>
-<span class="sourceLineNo">1251</span>    } else {<a name="line.1251"></a>
-<span class="sourceLineNo">1252</span>      return getNewDataTestDirOnTestFS();<a name="line.1252"></a>
-<span class="sourceLineNo">1253</span>    }<a name="line.1253"></a>
-<span class="sourceLineNo">1254</span>  }<a name="line.1254"></a>
-<span class="sourceLineNo">1255</span><a name="line.1255"></a>
-<span class="sourceLineNo">1256</span>  /**<a name="line.1256"></a>
-<span class="sourceLineNo">1257</span>   * Same as {{@link HBaseTestingUtility#getDefaultRootDirPath(boolean create)}<a name="line.1257"></a>
-<span class="sourceLineNo">1258</span>   * except that &lt;code&gt;create&lt;/code&gt; flag is false.<a name="line.1258"></a>
-<span class="sourceLineNo">1259</span>   * Note: this does not cause the root dir to be created.<a name="line.1259"></a>
-<span class="sourceLineNo">1260</span>   * @return Fully qualified path for the default hbase root dir<a name="line.1260"></a>
-<span class="sourceLineNo">1261</span>   * @throws IOException<a name="line.1261"></a>
-<span class="sourceLineNo">1262</span>   */<a name="line.1262"></a>
-<span class="sourceLineNo">1263</span>  public Path getDefaultRootDirPath() throws IOException {<a name="line.1263"></a>
-<span class="sourceLineNo">1264</span>    return getDefaultRootDirPath(false);<a name="line.1264"></a>
-<span class="sourceLineNo">1265</span>  }<a name="line.1265"></a>
-<span class="sourceLineNo">1266</span><a name="line.1266"></a>
-<span class="sourceLineNo">1267</span>  /**<a name="line.1267"></a>
-<span class="sourceLineNo">1268</span>   * Creates an hbase rootdir in user home directory.  Also creates hbase<a name="line.1268"></a>
-<span class="sourceLineNo">1269</span>   * version file.  Normally you won't make use of this method.  Root hbasedir<a name="line.1269"></a>
-<span class="sourceLineNo">1270</span>   * is created for you as part of mini cluster startup.  You'd only use this<a name="line.1270"></a>
-<span class="sourceLineNo">1271</span>   * method if you were doing manual operation.<a name="line.1271"></a>
-<span class="sourceLineNo">1272</span>   * @param create This flag decides whether to get a new<a name="line.1272"></a>
-<span class="sourceLineNo">1273</span>   * root or data directory path or not, if it has been fetched already.<a name="line.1273"></a>
-<span class="sourceLineNo">1274</span>   * Note : Directory will be made irrespective of whether path has been fetched or not.<a name="line.1274"></a>
-<span class="sourceLineNo">1275</span>   * If directory already exists, it will be overwritten<a name="line.1275"></a>
-<span class="sourceLineNo">1276</span>   * @return Fully qualified path to hbase root dir<a name="line.1276"></a>
-<span class="sourceLineNo">1277</span>   * @throws IOException<a name="line.1277"></a>
-<span class="sourceLineNo">1278</span>   */<a name="line.1278"></a>
-<span class="sourceLineNo">1279</span>  public Path createRootDir(boolean create) throws IOException {<a name="line.1279"></a>
-<span class="sourceLineNo">1280</span>    FileSystem fs = FileSystem.get(this.conf);<a name="line.1280"></a>
-<span class="sourceLineNo">1281</span>    Path hbaseRootdir = getDefaultRootDirPath(create);<a name="line.1281"></a>
-<span class="sourceLineNo">1282</span>    FSUtils.setRootDir(this.conf, hbaseRootdir);<a name="line.1282"></a>
-<span class="sourceLineNo">1283</span>    fs.mkdirs(hbaseRootdir);<a name="line.1283"></a>
-<span class="sourceLineNo">1284</span>    FSUtils.setVersion(fs, hbaseRootdir);<a name="line.1284"></a>
-<span class="sourceLineNo">1285</span>    return hbaseRootdir;<a name="line.1285"></a>
-<span class="sourceLineNo">1286</span>  }<a name="line.1286"></a>
-<span class="sourceLineNo">1287</span><a name="line.1287"></a>
-<span class="sourceLineNo">1288</span>  /**<a name="line.1288"></a>
-<span class="sourceLineNo">1289</span>   * Same as {@link HBaseTestingUtility#createRootDir(boolean create)}<a name="line.1289"></a>
-<span class="sourceLineNo">1290</span>   * except that &lt;code&gt;create&lt;/code&gt; flag is false.<a name="line.1290"></a>
-<span class="sourceLineNo">1291</span>   * @return Fully qualified path to hbase root dir<a name="line.1291"></a>
-<span class="sourceLineNo">1292</span>   * @throws IOException<a name="line.1292"></a>
-<span class="sourceLineNo">1293</span>   */<a name="line.1293"></a>
-<span class="sourceLineNo">1294</span>  public Path createRootDir() throws IOException {<a name="line.1294"></a>
-<span class="sourceLineNo">1295</span>    return createRootDir(false);<a name="line.1295"></a>
-<span class="sourceLineNo">1296</span>  }<a name="line.1296"></a>
-<span class="sourceLineNo">1297</span><a name="line.1297"></a>
-<span class="sourceLineNo">1298</span>  /**<a name="line.1298"></a>
-<span class="sourceLineNo">1299</span>   * Creates a hbase walDir in the user's home directory.<a name="line.1299"></a>
-<span class="sourceLineNo">1300</span>   * Normally you won't make use of this method. Root hbaseWALDir<a name="line.1300"></a>
-<span class="sourceLineNo">1301</span>   * is created for you as part of mini cluster startup. You'd only use this<a name="line.1301"></a>
-<span class="sourceLineNo">1302</span>   * method if you were doing manual operation.<a name="line.1302"></a>
-<span class="sourceLineNo">1303</span>   *<a name="line.1303"></a>
-<span class="sourceLineNo">1304</span>   * @return Fully qualified path to hbase root dir<a name="line.1304"></a>
-<span class="sourceLineNo">1305</span>   * @throws IOException<a name="line.1305"></a>
-<span class="sourceLineNo">1306</span>  */<a name="line.1306"></a>
-<span class="sourceLineNo">1307</span>  public Path createWALRootDir() throws IOException {<a name="line.1307"></a>
-<span class="sourceLineNo">1308</span>    FileSystem fs = FileSystem.get(this.conf);<a name="line.1308"></a>
-<span class="sourceLineNo">1309</span>    Path walDir = getNewDataTestDirOnTestFS();<a name="line.1309"></a>
-<span class="sourceLineNo">1310</span>    FSUtils.setWALRootDir(this.conf, walDir);<a name="line.1310"></a>
-<span class="sourceLineNo">1311</span>    fs.mkdirs(walDir);<a name="line.1311"></a>
-<span class="sourceLineNo">1312</span>    return walDir;<a name="line.1312"></a>
-<span class="sourceLineNo">1313</span>  }<a name="line.1313"></a>
-<span class="sourceLineNo">1314</span><a name="line.1314"></a>
-<span class="sourceLineNo">1315</span>  private void setHBaseFsTmpDir() throws IOException {<a name="line.1315"></a>
-<span class="sourceLineNo">1316</span>    String hbaseFsTmpDirInString = this.conf.get("hbase.fs.tmp.dir");<a name="line.1316"></a>
-<span class="sourceLineNo">1317</span>    if (hbaseFsTmpDirInString == null) {<a name="line.1317"></a>
-<span class="sourceLineNo">1318</span>      this.conf.set("hbase.fs.tmp.dir",  getDataTestDirOnTestFS("hbase-staging").toString());<a name="line.1318"></a>
-<span class="sourceLineNo">1319</span>      LOG.info("Setting hbase.fs.tmp.dir to " + this.conf.get("hbase.fs.tmp.dir"));<a name="line.1319"></a>
-<span class="sourceLineNo">1320</span>    } else {<a name="line.1320"></a>
-<span class="sourceLineNo">1321</span>      LOG.info("The hbase.fs.tmp.dir is set to " + hbaseFsTmpDirInString);<a name="line.1321"></a>
-<span class="sourceLineNo">1322</span>    }<a name="line.1322"></a>
-<span class="sourceLineNo">1323</span>  }<a name="line.1323"></a>
-<span class="sourceLineNo">1324</span><a name="line.1324"></a>
-<span class="sourceLineNo">1325</span>  /**<a name="line.1325"></a>
-<span class="sourceLineNo">1326</span>   * Flushes all caches in the mini hbase cluster<a name="line.1326"></a>
-<span class="sourceLineNo">1327</span>   * @throws IOException<a name="line.1327"></a>
-<span class="sourceLineNo">1328</span>   */<a name="line.1328"></a>
-<span class="sourceLineNo">1329</span>  public void flush() throws IOException {<a name="line.1329"></a>
-<span class="sourceLineNo">1330</span>    getMiniHBaseCluster().flushcache();<a name="line.1330"></a>
-<span class="sourceLineNo">1331</span>  }<a name="line.1331"></a>
-<span class="sourceLineNo">1332</span><a name="line.1332"></a>
-<span class="sourceLineNo">1333</span>  /**<a name="line.1333"></a>
-<span class="sourceLineNo">1334</span>   * Flushes all caches in the mini hbase cluster<a name="line.1334"></a>
-<span class="sourceLineNo">1335</span>   * @throws IOException<a name="line.1335"></a>
-<span class="sourceLineNo">1336</span>   */<a name="line.1336"></a>
-<span class="sourceLineNo">1337</span>  public void flush(TableName tableName) throws IOException {<a name="line.1337"></a>
-<span class="sourceLineNo">1338</span>    getMiniHBaseCluster().flushcache(tableName);<a name="line.1338"></a>
-<span class="sourceLineNo">1339</span>  }<a name="line.1339"></a>
-<span class="sourceLineNo">1340</span><a name="line.1340"></a>
-<span class="sourceLineNo">1341</span>  /**<a name="line.1341"></a>
-<span class="sourceLineNo">1342</span>   * Compact all regions in the mini hbase cluster<a name="line.1342"></a>
-<span class="sourceLineNo">1343</span>   * @throws IOException<a name="line.1343"></a>
-<span class="sourceLineNo">1344</span>   */<a name="line.1344"></a>
-<span class="sourceLineNo">1345</span>  public void compact(boolean major) throws IOException {<a name="line.1345"></a>
-<span class="sourceLineNo">1346</span>    getMiniHBaseCluster().compact(major);<a name="line.1346"></a>
-<span class="sourceLineNo">1347</span>  }<a name="line.1347"></a>
-<span class="sourceLineNo">1348</span><a name="line.1348"></a>
-<span class="sourceLineNo">1349</span>  /**<a name="line.1349"></a>
-<span class="sourceLineNo">1350</span>   * Compact all of a table's reagion in the mini hbase cluster<a name="line.1350"></a>
-<span class="sourceLineNo">1351</span>   * @throws IOException<a name="line.1351"></a>
-<span class="sourceLineNo">1352</span>   */<a name="line.1352"></a>
-<span class="sourceLineNo">1353</span>  public void compact(TableName tableName, boolean major) throws IOException {<a name="line.1353"></a>
-<span class="sourceLineNo">1354</span>    getMiniHBaseCluster().compact(tableName, major);<a name="line.1354"></a>
-<span class="sourceLineNo">1355</span>  }<a name="line.1355"></a>
-<span class="sourceLineNo">1356</span><a name="line.1356"></a>
-<span class="sourceLineNo">1357</span>  /**<a name="line.1357"></a>
-<span class="sourceLineNo">1358</span>   * Create a table.<a name="line.1358"></a>
-<span class="sourceLineNo">1359</span>   * @param tableName<a name="line.1359"></a>
-<span class="sourceLineNo">1360</span>   * @param family<a name="line.1360"></a>
-<span class="sourceLineNo">1361</span>   * @return An HTable instance for the created table.<a name="line.1361"></a>
-<span class="sourceLineNo">1362</span>   * @throws IOException<a name="line.1362"></a>
-<span class="sourceLineNo">1363</span>   */<a name="line.1363"></a>
-<span class="sourceLineNo">1364</span>  public Table createTable(TableName tableName, String family)<a name="line.1364"></a>
-<span class="sourceLineNo">1365</span>  throws IOException{<a name="line.1365"></a>
-<span class="sourceLineNo">1366</span>    return createTable(tableName, new String[]{family});<a name="line.1366"></a>
-<span class="sourceLineNo">1367</span>  }<a name="line.1367"></a>
-<span class="sourceLineNo">1368</span><a name="line.1368"></a>
-<span class="sourceLineNo">1369</span>  /**<a name="line.1369"></a>
-<span class="sourceLineNo">1370</span>   * Create a table.<a name="line.1370"></a>
-<span class="sourceLineNo">1371</span>   * @param tableName<a name="line.1371"></a>
-<span class="sourceLineNo">1372</span>   * @param families<a name="line.1372"></a>
-<span class="sourceLineNo">1373</span>   * @return An HTable instance for the created table.<a name="line.1373"></a>
-<span class="sourceLineNo">1374</span>   * @throws IOException<a name="line.1374"></a>
-<span class="sourceLineNo">1375</span>   */<a name="line.1375"></a>
-<span class="sourceLineNo">1376</span>  public Table createTable(TableName tableName, String[] families)<a name="line.1376"></a>
-<span class="sourceLineNo">1377</span>  throws IOException {<a name="line.1377"></a>
-<span class="sourceLineNo">1378</span>    List&lt;byte[]&gt; fams = new ArrayList&lt;&gt;(families.length);<a name="line.1378"></a>
-<span class="sourceLineNo">1379</span>    for (String family : families) {<a name="line.1379"></a>
-<span class="sourceLineNo">1380</span>      fams.add(Bytes.toBytes(family));<a name="line.1380"></a>
-<span class="sourceLineNo">1381</span>    }<a name="line.1381"></a>
-<span class="sourceLineNo">1382</span>    return createTable(tableName, fams.toArray(new byte[0][]));<a name="line.1382"></a>
-<span class="sourceLineNo">1383</span>  }<a name="line.1383"></a>
-<span class="sourceLineNo">1384</span><a name="line.1384"></a>
-<span class="sourceLineNo">1385</span>  /**<a name="line.1385"></a>
-<span class="sourceLineNo">1386</span>   * Create a table.<a name="line.1386"></a>
-<span class="sourceLineNo">1387</span>   * @param tableName<a name="line.1387"></a>
-<span class="sourceLineNo">1388</span>   * @param family<a name="line.1388"></a>
-<span class="sourceLineNo">1389</span>   * @return An HTable instance for the created table.<a name="line.1389"></a>
-<span class="sourceLineNo">1390</span>   * @throws IOException<a name="line.1390"></a>
-<span class="sourceLineNo">1391</span>   */<a name="line.1391"></a>
-<span class="sourceLineNo">1392</span>  public Table createTable(TableName tableName, byte[] family)<a name="line.1392"></a>
-<span class="sourceLineNo">1393</span>  throws IOException{<a name="line.1393"></a>
-<span class="sourceLineNo">1394</span>    return createTable(tableName, new byte[][]{family});<a name="line.1394"></a>
-<span class="sourceLineNo">1395</span>  }<a name="line.1395"></a>
-<span class="sourceLineNo">1396</span><a name="line.1396"></a>
-<span class="sourceLineNo">1397</span>  /**<a name="line.1397"></a>
-<span class="sourceLineNo">1398</span>   * Create a table with multiple regions.<a name="line.1398"></a>
-<span class="sourceLineNo">1399</span>   * @param tableName<a name="line.1399"></a>
-<span class="sourceLineNo">1400</span>   * @param family<a name="line.1400"></a>
-<span class="sourceLineNo">1401</span>   * @param numRegions<a name="line.1401"></a>
-<span class="sourceLineNo">1402</span>   * @return An HTable instance for the created table.<a name="line.1402"></a>
-<span class="sourceLineNo">1403</span>   * @throws IOException<a name="line.1403"></a>
-<span class="sourceLineNo">1404</span>   */<a name="line.1404"></a>
-<span class="sourceLineNo">1405</span>  public Table createMultiRegionTable(TableName tableName, byte[] family, int numRegions)<a name="line.1405"></a>
-<span class="sourceLineNo">1406</span>      throws IOException {<a name="line.1406"></a>
-<span class="sourceLineNo">1407</span>    if (numRegions &lt; 3) throw new IOException("Must create at least 3 regions");<a name="line.1407"></a>
-<span class="sourceLineNo">1408</span>    byte[] startKey = Bytes.toBytes("aaaaa");<a name="line.1408"></a>
-<span class="sourceLineNo">1409</span>    byte[] endKey = Bytes.toBytes("zzzzz");<a name="line.1409"></a>
-<span class="sourceLineNo">1410</span>    byte[][] splitKeys = Bytes.split(startKey, endKey, numRegions - 3);<a name="line.1410"></a>
-<span class="sourceLineNo">1411</span><a name="line.1411"></a>
-<span class="sourceLineNo">1412</span>    return createTable(tableName, new byte[][] { family }, splitKeys);<a name="line.1412"></a>
-<span class="sourceLineNo">1413</span>  }<a name="line.1413"></a>
-<span class="sourceLineNo">1414</span><a name="line.1414"></a>
-<span class="sourceLineNo">1415</span>  /**<a name="line.1415"></a>
-<span class="sourceLineNo">1416</span>   * Create a table.<a name="line.1416"></a>
-<span class="sourceLineNo">1417</span>   * @param tableName<a name="line.1417"></a>
-<span class="sourceLineNo">1418</span>   * @param families<a name="line.1418"></a>
-<span class="sourceLineNo">1419</span>   * @return An HTable instance for the created table.<a name="line.1419"></a>
-<span class="sourceLineNo">1420</span>   * @throws IOException<a name="line.1420"></a>
-<span class="sourceLineNo">1421</span>   */<a name="line.1421"></a>
-<span class="sourceLineNo">1422</span>  public Table createTable(TableName tableName, byte[][] families)<a name="line.1422"></a>
-<span class="sourceLineNo">1423</span>  throws IOException {<a name="line.1423"></a>
-<span class="sourceLineNo">1424</span>    return createTable(tableName, families, (byte[][]) null);<a name="line.1424"></a>
-<span class="sourceLineNo">1425</span>  }<a name="line.1425"></a>
-<span class="sourceLineNo">1426</span><a name="line.1426"></a>
-<span class="sourceLineNo">1427</span>  /**<a name="line.1427"></a>
-<span class="sourceLineNo">1428</span>   * Create a table with multiple regions.<a name="line.1428"></a>
-<span class="sourceLineNo">1429</span>   * @param tableName<a name="line.1429"></a>
-<span class="sourceLineNo">1430</span>   * @param families<a name="line.1430"></a>
-<span class="sourceLineNo">1431</span>   * @return An HTable instance for the created table.<a name="line.1431"></a>
-<span class="sourceLineNo">1432</span>   * @throws IOException<a name="line.1432"></a>
-<span class="sourceLineNo">1433</span>   */<a name="line.1433"></a>
-<span class="sourceLineNo">1434</span>  public Table createMultiRegionTable(TableName tableName, byte[][] families) throws IOException {<a name="line.1434"></a>
-<span class="sourceLineNo">1435</span>    return createTable(tableName, families, KEYS_FOR_HBA_CREATE_TABLE);<a name="line.1435"></a>
-<span class="sourceLineNo">1436</span>  }<a name="line.1436"></a>
-<span class="sourceLineNo">1437</span><a name="line.1437"></a>
-<span class="sourceLineNo">1438</span>  /**<a name="line.1438"></a>
-<span class="sourceLineNo">1439</span>   * Create a table.<a name="line.1439"></a>
-<span class="sourceLineNo">1440</span>   * @param tableName<a name="line.1440"></a>
-<span class="sourceLineNo">1441</span>   * @param families<a name="line.1441"></a>
-<span class="sourceLineNo">1442</span>   * @param splitKeys<a name="line.1442"></a>
-<span class="sourceLineNo">1443</span>   * @return An HTable instance for the created table.<a name="line.1443"></a>
-<span class="sourceLineNo">1444</span>   * @throws IOException<a name="line.1444"></a>
-<span class="sourceLineNo">1445</span>   */<a name="line.1445"></a>
-<span class="sourceLineNo">1446</span>  public Table createTable(TableName tableName, byte[][] families, byte[][] splitKeys)<a name="line.1446"></a>
-<span class="sourceLineNo">1447</span>      throws IOException {<a name="line.1447"></a>
-<span class="sourceLineNo">1448</span>    return createTable(tableName, families, splitKeys, new Configuration(getConfiguration()));<a name="line.1448"></a>
-<span class="sourceLineNo">1449</span>  }<a name="line.1449"></a>
-<span class="sourceLineNo">1450</span><a name="line.1450"></a>
-<span class="sourceLineNo">1451</span>  public Table createTable(TableName tableName, byte[][] families,<a name="line.1451"></a>
-<span class="sourceLineNo">1452</span>      int numVersions, byte[] startKey, byte[] endKey, int numRegions)<a name="line.1452"></a>
-<span class="sourceLineNo">1453</span>  throws IOException{<a name="line.1453"></a>
-<span class="sourceLineNo">1454</span>    HTableDescriptor desc = createTableDescriptor(tableName, families, numVersions);<a name="line.1454"></a>
-<span class="sourceLineNo">1455</span><a name="line.1455"></a>
-<span class="sourceLineNo">1456</span>    getAdmin().createTable(desc, startKey, endKey, numRegions);<a name="line.1456"></a>
-<span class="sourceLineNo">1457</span>    // HBaseAdmin only waits for regions to appear in hbase:meta we<a name="line.1457"></a>
-<span class="sourceLineNo">1458</span>    // should wait until they are assigned<a name="line.1458"></a>
-<span class="sourceLineNo">1459</span>    waitUntilAllRegionsAssigned(tableName);<a name="line.1459"></a>
-<span class="sourceLineNo">1460</span>    return getConnection().getTable(tableName);<a name="line.1460"></a>
-<span class="sourceLineNo">1461</span>  }<a name="line.1461"></a>
-<span class="sourceLineNo">1462</span><a name="line.1462"></a>
-<span class="sourceLineNo">1463</span>  /**<a name="line.1463"></a>
-<span class="sourceLineNo">1464</span>   * Create a table.<a name="line.1464"></a>
-<span class="sourceLineNo">1465</span>   * @param htd<a name="line.1465"></a>
-<span class="sourceLineNo">1466</span>   * @param families<a name="line.1466"></a>
-<span class="sourceLineNo">1467</span>   * @param c Configuration to use<a name="line.1467"></a>
-<span class="sourceLineNo">1468</span>   * @return An HTable instance for the created table.<a name="line.1468"></a>
-<span class="sourceLineNo">1469</span>   * @throws IOException<a name="line.1469"></a>
-<span class="sourceLineNo">1470</span>   */<a name="line.1470"></a>
-<span class="sourceLineNo">1471</span>  public Table createTable(HTableDescriptor htd, byte[][] families, Configuration c)<a name="line.1471"></a>
-<span class="sourceLineNo">1472</span>  throws IOException {<a name="line.1472"></a>
-<span class="sourceLineNo">1473</span>    return createTable(htd, families, null, c);<a name="line.1473"></a>
-<span class="sourceLineNo">1474</span>  }<a name="line.1474"></a>
-<span class="sourceLineNo">1475</span><a name="line.1475"></a>
-<span class="sourceLineNo">1476</span>  /**<a name="line.1476"></a>
-<span class="sourceLineNo">1477</span>   * Create a table.<a name="line.1477"></a>
-<span class="sourceLineNo">1478</span>   * @param htd<a name="line.1478"></a>
-<span class="sourceLineNo">1479</span>   * @param families<a name="line.1479"></a>
-<span class="sourceLineNo">1480</span>   * @param splitKeys<a name="line.1480"></a>
-<span class="sourceLineNo">1481</span>   * @param c Configuration to use<a name="line.1481"></a>
-<span class="sourceLineNo">1482</span>   * @return An HTable instance for the created table.<a name="line.1482"></a>
-<span class="sourceLineNo">1483</span>   * @throws IOException<a name="line.1483"></a>
-<span class="sourceLineNo">1484</span>   */<a name="line.1484"></a>
-<span class="sourceLineNo">1485</span>  public Table createTable(HTableDescriptor htd, byte[][] families, byte[][] splitKeys,<a name="line.1485"></a>
-<span class="sourceLineNo">1486</span>      Configuration c) throws IOException {<a name="line.1486"></a>
-<span class="sourceLineNo">1487</span>    for (byte[] family : families) {<a name="line.1487"></a>
-<span class="sourceLineNo">1488</span>      HColumnDescriptor hcd = new HColumnDescriptor(family);<a name="line.1488"></a>
-<span class="sourceLineNo">1489</span>      // Disable blooms (they are on by default as of 0.95) but we disable them here because<a name="line.1489"></a>
-<span class="sourceLineNo">1490</span>      // tests have hard coded counts of what to expect in block cache, etc., and blooms being<a name="line.1490"></a>
-<span class="sourceLineNo">1491</span>      // on is interfering.<a name="line.1491"></a>
-<span class="sourceLineNo">1492</span>      hcd.setBloomFilterType(BloomType.NONE);<a name="line.1492"></a>
-<span class="sourceLineNo">1493</span>      htd.addFamily(hcd);<a name="line.1493"></a>
-<span class="sourceLineNo">1494</span>    }<a name="line.1494"></a>
-<span class="sourceLineNo">1495</span>    getAdmin().createTable(htd, splitKeys);<a name="line.1495"></a>
-<span class="sourceLineNo">1496</span>    // HBaseAdmin only waits for regions to appear in hbase:meta<a name="line.1496"></a>
-<span class="sourceLineNo">1497</span>    // we should wait until they are assigned<a name="line.1497"></a>
-<span class="sourceLineNo">1498</span>    waitUntilAllRegionsAssigned(htd.getTableName());<a name="line.1498"></a>
-<span class="sourceLineNo">1499</span>    return getConnection().getTable(htd.getTableName());<a name="line.1499"></a>
-<span class="sourceLineNo">1500</span>  }<a name="line.1500"></a>
-<span class="sourceLineNo">1501</span><a name="line.1501"></a>
-<span class="sourceLineNo">1502</span>  /**<a name="line.1502"></a>
-<span class="sourceLineNo">1503</span>   * Create a table.<a name="line.1503"></a>
-<span class="sourceLineNo">1504</span>   * @param htd<a name="line.1504"></a>
-<span class="sourceLineNo">1505</span>   * @param splitRows<a name="line.1505"></a>
-<span class="sourceLineNo">1506</span>   * @return An HTable instance for the created table.<a name="line.1506"></a>
-<span class="sourceLineNo">1507</span>   * @throws IOException<a name="line.1507"></a>
-<span class="sourceLineNo">1508</span>   */<a name="line.1508"></a>
-<span class="sourceLineNo">1509</span>  public Table createTable(HTableDescriptor htd, byte[][] splitRows)<a name="line.1509"></a>
-<span class="sourceLineNo">1510</span>      throws IOException {<a name="line.1510"></a>
-<span class="sourceLineNo">1511</span>    getAdmin().createTable(htd, splitRows);<a name="line.1511"></a>
-<span class="sourceLineNo">1512</span>    // HBaseAdmin only waits for regions to appear in hbase:meta<a name="line.1512"></a>
-<span class="sourceLineNo">1513</span>    // we should wait until they are assigned<a name="line.1513"></a>
-<span class="sourceLineNo">1514</span>    waitUntilAllRegionsAssigned(htd.getTableName());<a name="line.1514"></a>
-<span class="sourceLineNo">1515</span>    return getConnection().getTable(htd.getTableName());<a name="line.1515"></a>
-<span class="sourceLineNo">1516</span>  }<a name="line.1516"></a>
-<span class="sourceLineNo">1517</span><a name="line.1517"></a>
-<span class="sourceLineNo">1518</span>  /**<a name="line.1518"></a>
-<span class="sourceLineNo">1519</span>   * Create a table.<a name="line.1519"></a>
-<span class="sourceLineNo">1520</span>   * @param tableName<a name="line.1520"></a>
-<span class="sourceLineNo">1521</span>   * @param families<a name="line.1521"></a>
-<span class="sourceLineNo">1522</span>   * @param splitKeys<a name="line.1522"></a>
-<span class="sourceLineNo">1523</span>   * @param c Configuration to use<a name="line.1523"></a>
-<span class="sourceLineNo">1524</span>   * @return An HTable instance for the created table.<a name="line.1524"></a>
-<span class="sourceLineNo">1525</span>   * @throws IOException<a name="line.1525"></a>
-<span class="sourceLineNo">1526</span>   */<a name="line.1526"></a>
-<span class="sourceLineNo">1527</span>  public Table createTable(TableName tableName, byte[][] families, byte[][] splitKeys,<a name="line.1527"></a>
-<span class="sourceLineNo">1528</span>      final Configuration c) throws IOException {<a name="line.1528"></a>
-<span class="sourceLineNo">1529</span>    return createTable(new HTableDescriptor(tableName), families, splitKeys, c);<a name="line.1529"></a>
-<span class="sourceLineNo">1530</span>  }<a name="line.1530"></a>
-<span class="sourceLineNo">1531</span><a name="line.1531"></a>
-<span class="sourceLineNo">1532</span>  /**<a name="line.1532"></a>
-<span class="sourceLineNo">1533</span>   * Create a table.<a name="line.1533"></a>
-<span class="sourceLineNo">1534</span>   * @param tableName<a name="line.1534"></a>
-<span class="sourceLineNo">1535</span>   * @param family<a name="line.1535"></a>
-<span class="sourceLineNo">1536</span>   * @param numVersions<a name="line.1536"></a>
-<span class="sourceLineNo">1537</span>   * @return An HTable instance for the created table.<a name="line.1537"></a>
-<span class="sourceLineNo">1538</span>   * @throws IOException<a name="line.1538"></a>
-<span class="sourceLineNo">1539</span>   */<a name="line.1539"></a>
-<span class="sourceLineNo">1540</span>  public Table createTable(TableName tableName, byte[] family, int numVersions)<a name="line.1540"></a>
-<span class="sourceLineNo">1541</span>  throws IOException {<a name="line.1541"></a>
-<span class="sourceLineNo">1542</span>    return createTable(tableName, new byte[][]{family}, numVersions);<a name="line.1542"></a>
-<span class="sourceLineNo">1543</span>  }<a name="line.1543"></a>
-<span class="sourceLineNo">1544</span><a name="line.1544"></a>
-<span class="sourceLineNo">1545</span>  /**<a name="line.1545"></a>
-<span class="sourceLineNo">1546</span>   * Create a table.<a name="line.1546"></a>
-<span class="sourceLineNo">1547</span>   * @param tableName<a name="line.1547"></a>
-<span class="sourceLineNo">1548</span>   * @param families<a name="line.1548"></a>
-<span class="sourceLineNo">1549</span>   * @param numVersions<a name="line.1549"></a>
-<span class="sourceLineNo">1550</span>   * @return An HTable instance for the created table.<a name="line.1550"></a>
-<span class="sourceLineNo">1551</span>   * @throws IOException<a name="line.1551"></a>
-<span class="sourceLineNo">1552</span>   */<a name="line.1552"></a>
-<span class="sourceLineNo">1553</span>  public Table createTable(TableName tableName, byte[][] families, int numVersions)<a name="line.1553"></a>
-<span class="sourceLineNo">1554</span>      throws IOException {<a name="line.1554"></a>
-<span class="sourceLineNo">1555</span>    return createTable(tableName, families, numVersions, (byte[][]) null);<a name="line.1555"></a>
-<span class="sourceLineNo">1556</span>  }<a name="line.1556"></a>
-<span class="sourceLineNo">1557</span><a name="line.1557"></a>
-<span class="sourceLineNo">1558</span>  /**<a name="line.1558"></a>
-<span class="sourceLineNo">1559</span>   * Create a table.<a name="line.1559"></a>
-<span class="sourceLineNo">1560</span>   * @param tableName<a name="line.1560"></a>
-<span class="sourceLineNo">1561</span>   * @param families<a name="line.1561"></a>
-<span class="sourceLineNo">1562</span>   * @param numVersions<a name="line.1562"></a>
-<span class="sourceLineNo">1563</span>   * @param splitKeys<a name="line.1563"></a>
-<span class="sourceLineNo">1564</span>   * @return An HTable instance for the created table.<a name="line.1564"></a>
-<span class="sourceLineNo">1565</span>   * @throws IOException<a name="line.1565"></a>
-<span class="sourceLineNo">1566</span>   */<a name="line.1566"></a>
-<span class="sourceLineNo">1567</span>  public Table createTable(TableName tableName, byte[][] families, int numVersions,<a name="line.1567"></a>
-<span class="sourceLineNo">1568</span>      byte[][] splitKeys) throws IOException {<a name="line.1568"></a>
-<span class="sourceLineNo">1569</span>    HTableDescriptor desc = new HTableDescriptor(tableName);<a name="line.1569"></a>
-<span class="sourceLineNo">1570</span>    for (byte[] family : families) {<a name="line.1570"></a>
-<span class="sourceLineNo">1571</span>      HColumnDescriptor hcd = new HColumnDescriptor(family).setMaxVersions(numVersions);<a name="line.1571"></a>
-<span class="sourceLineNo">1572</span>      desc.addFamily(hcd);<a name="line.1572"></a>
-<span class="sourceLineNo">1573</span>    }<a name="line.1573"></a>
-<span class="sourceLineNo">1574</span>    getAdmin().createTable(desc, splitKeys);<a name="line.1574"></a>
-<span class="sourceLineNo">1575</span>    // HBaseAdmin only waits for regions to appear in hbase:meta we should wait until they are<a name="line.1575"></a>
-<span class="sourceLineNo">1576</span>    // assigned<a name="line.1576"></a>
-<span class="sourceLineNo">1577</span>    waitUntilAllRegionsAssigned(tableName);<a name="line.1577"></a>
-<span class="sourceLineNo">1578</span>    return getConnection().getTable(tableName);<a name="line.1578"></a>
-<span class="sourceLineNo">1579</span>  }<a name="line.1579"></a>
-<span class="sourceLineNo">1580</span><a name="line.1580"></a>
-<span class="sourceLineNo">1581</span>  /**<a name="line.1581"></a>
-<span class="sourceLineNo">1582</span>   * Create a table with multiple regions.<a name="line.1582"></a>
-<span class="sourceLineNo">1583</span>   * @param tableName<a name="line.1583"></a>
-<span class="sourceLineNo">1584</span>   * @param families<a name="line.1584"></a>
-<span class="sourceLineNo">1585</span>   * @param numVersions<a name="line.1585"></a>
-<span class="sourceLineNo">1586</span>   * @return An HTable instance for the created table.<a name="line.1586"></a>
-<span class="sourceLineNo">1587</span>   * @throws IOException<a name="line.1587"></a>
-<span class="sourceLineNo">1588</span>   */<a name="line.1588"></a>
-<span class="sourceLineNo">1589</span>  public Table createMultiRegionTable(TableName tableName, byte[][] families, int numVersions)<a name="line.1589"></a>
-<span class="sourceLineNo">1590</span>      throws IOException {<a name="line.1590"></a>
-<span class="sourceLineNo">1591</span>    return createTable(tableName, families, numVersions, KEYS_FOR_HBA_CREATE_TABLE);<a name="line.1591"></a>
-<span class="sourceLineNo">1592</span>  }<a name="line.1592"></a>
-<span class="sourceLineNo">1593</span><a name="line.1593"></a>
-<span class="sourceLineNo">1594</span>  /**<a name="line.1594"></a>
-<span class="sourceLineNo">1595</span>   * Create a table.<a name="line.1595"></a>
-<span class="sourceLineNo">1596</span>   * @param tableName<a name="line.1596"></a>
-<span class="sourceLineNo">1597</span>   * @param families<a name="line.1597"></a>
-<span class="sourceLineNo">1598</span>   * @param numVersions<a name="line.1598"></a>
-<span class="sourceLineNo">1599</span>   * @param blockSize<a name="line.1599"></a>
-<span class="sourceLineNo">1600</span>   * @return An HTable instance for the created table.<a name="line.1600"></a>
-<span class="sourceLineNo">1601</span>   * @throws IOException<a name="line.1601"></a>
-<span class="sourceLineNo">1602</span>   */<a name="line.1602"></a>
-<span class="sourceLineNo">1603</span>  public Table createTable(TableName tableName, byte[][] families,<a name="line.1603"></a>
-<span class="sourceLineNo">1604</span>    int numVersions, int blockSize) throws IOException {<a name="line.1604"></a>
-<span class="sourceLineNo">1605</span>    HTableDescriptor desc = new HTableDescriptor(tableName);<a name="line.1605"></a>
-<span class="sourceLineNo">1606</span>    for (byte[] family : families) {<a name="

<TRUNCATED>

Mime
View raw message