You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by gi...@apache.org on 2017/12/17 15:18:07 UTC
[28/28] hbase-site git commit: Published site at .
Published site at .
Project: http://git-wip-us.apache.org/repos/asf/hbase-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase-site/commit/48bd3915
Tree: http://git-wip-us.apache.org/repos/asf/hbase-site/tree/48bd3915
Diff: http://git-wip-us.apache.org/repos/asf/hbase-site/diff/48bd3915
Branch: refs/heads/asf-site
Commit: 48bd3915f7f5a0b35d1cb09d88f5148636801653
Parents: 3d2ba2b
Author: jenkins <bu...@apache.org>
Authored: Sun Dec 17 15:17:20 2017 +0000
Committer: jenkins <bu...@apache.org>
Committed: Sun Dec 17 15:17:20 2017 +0000
----------------------------------------------------------------------
acid-semantics.html | 4 +-
apache_hbase_reference_guide.pdf | 4 +-
apidocs/index-all.html | 2 +-
.../hbase/zookeeper/MiniZooKeeperCluster.html | 30 +-
.../hbase/zookeeper/MiniZooKeeperCluster.html | 577 +-
book.html | 2 +-
bulk-loads.html | 4 +-
checkstyle-aggregate.html | 49354 ++++++++---------
checkstyle.rss | 42 +-
coc.html | 4 +-
cygwin.html | 4 +-
dependencies.html | 4 +-
dependency-convergence.html | 4 +-
dependency-info.html | 4 +-
dependency-management.html | 4 +-
devapidocs/constant-values.html | 6 +-
devapidocs/index-all.html | 34 +-
.../NotAllMetaRegionsOnlineException.html | 16 +-
.../hadoop/hbase/class-use/ServerName.html | 11 +-
.../client/class-use/ClusterConnection.html | 4 +-
.../hbase/client/class-use/RegionInfo.html | 12 +-
.../master/class-use/RegionState.State.html | 3 +-
.../cleaner/LogCleaner.CleanerContext.html | 20 +-
.../hadoop/hbase/util/class-use/Pair.html | 4 +-
.../hbase/zookeeper/ClusterStatusTracker.html | 23 +-
.../hadoop/hbase/zookeeper/EmptyWatcher.html | 2 +-
.../hadoop/hbase/zookeeper/HQuorumPeer.html | 18 +-
.../hbase/zookeeper/LoadBalancerTracker.html | 22 +-
.../hbase/zookeeper/MasterAddressTracker.html | 38 +-
.../hbase/zookeeper/MetaTableLocator.html | 200 +-
.../hbase/zookeeper/MiniZooKeeperCluster.html | 38 +-
.../hbase/zookeeper/RecoverableZooKeeper.html | 56 +-
.../zookeeper/RegionNormalizerTracker.html | 8 +-
.../hadoop/hbase/zookeeper/ZKClusterId.html | 2 +-
.../hadoop/hbase/zookeeper/ZKMainServer.html | 6 +-
.../hadoop/hbase/zookeeper/ZKNodeTracker.html | 35 +-
.../hadoop/hbase/zookeeper/ZKServerTool.html | 14 +-
.../hadoop/hbase/zookeeper/ZKSplitLog.html | 42 +-
.../zookeeper/ZKUtil.JaasConfiguration.html | 30 +-
.../hbase/zookeeper/ZKUtil.NodeAndData.html | 16 +-
.../ZKUtil.ZKUtilOp.CreateAndFailSilent.html | 12 +-
.../ZKUtil.ZKUtilOp.DeleteNodeFailSilent.html | 8 +-
.../zookeeper/ZKUtil.ZKUtilOp.SetData.html | 12 +-
.../hadoop/hbase/zookeeper/ZKUtil.ZKUtilOp.html | 14 +-
.../apache/hadoop/hbase/zookeeper/ZKUtil.html | 191 +-
.../hadoop/hbase/zookeeper/ZKWatcher.html | 68 +-
.../hbase/zookeeper/class-use/ZKWatcher.html | 27 +-
.../hadoop/hbase/zookeeper/package-summary.html | 3 +-
.../org/apache/hadoop/hbase/Version.html | 6 +-
.../cleaner/LogCleaner.CleanerContext.html | 120 +-
.../hadoop/hbase/master/cleaner/LogCleaner.html | 120 +-
.../hbase/zookeeper/ClusterStatusTracker.html | 156 +-
.../hadoop/hbase/zookeeper/EmptyWatcher.html | 2 +-
.../hadoop/hbase/zookeeper/HQuorumPeer.html | 225 +-
.../hbase/zookeeper/LoadBalancerTracker.html | 145 +-
.../hbase/zookeeper/MasterAddressTracker.html | 314 +-
.../hbase/zookeeper/MetaTableLocator.html | 1070 +-
.../hbase/zookeeper/MiniZooKeeperCluster.html | 577 +-
.../hbase/zookeeper/RecoverableZooKeeper.html | 1420 +-
.../zookeeper/RegionNormalizerTracker.html | 34 +-
.../hadoop/hbase/zookeeper/ZKAclReset.html | 6 +-
.../hadoop/hbase/zookeeper/ZKClusterId.html | 6 +-
.../hadoop/hbase/zookeeper/ZKLeaderManager.html | 4 +-
...HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain.html | 82 +-
.../hadoop/hbase/zookeeper/ZKMainServer.html | 82 +-
.../hadoop/hbase/zookeeper/ZKNodeTracker.html | 396 +-
.../hadoop/hbase/zookeeper/ZKServerTool.html | 79 +-
.../hadoop/hbase/zookeeper/ZKSplitLog.html | 182 +-
.../zookeeper/ZKUtil.JaasConfiguration.html | 4042 +-
.../hbase/zookeeper/ZKUtil.NodeAndData.html | 4042 +-
.../ZKUtil.ZKUtilOp.CreateAndFailSilent.html | 4042 +-
.../ZKUtil.ZKUtilOp.DeleteNodeFailSilent.html | 4042 +-
.../zookeeper/ZKUtil.ZKUtilOp.SetData.html | 4042 +-
.../hadoop/hbase/zookeeper/ZKUtil.ZKUtilOp.html | 4042 +-
.../apache/hadoop/hbase/zookeeper/ZKUtil.html | 4042 +-
.../hadoop/hbase/zookeeper/ZKWatcher.html | 708 +-
export_control.html | 4 +-
hbase-annotations/checkstyle.html | 4 +-
hbase-annotations/dependencies.html | 4 +-
hbase-annotations/dependency-convergence.html | 4 +-
hbase-annotations/dependency-info.html | 4 +-
hbase-annotations/dependency-management.html | 4 +-
hbase-annotations/index.html | 4 +-
hbase-annotations/integration.html | 4 +-
hbase-annotations/issue-tracking.html | 4 +-
hbase-annotations/license.html | 4 +-
hbase-annotations/mail-lists.html | 4 +-
hbase-annotations/plugin-management.html | 4 +-
hbase-annotations/plugins.html | 4 +-
hbase-annotations/project-info.html | 4 +-
hbase-annotations/project-reports.html | 4 +-
hbase-annotations/project-summary.html | 4 +-
hbase-annotations/source-repository.html | 4 +-
hbase-annotations/team-list.html | 4 +-
hbase-build-configuration/dependencies.html | 4 +-
.../dependency-convergence.html | 4 +-
hbase-build-configuration/dependency-info.html | 4 +-
.../dependency-management.html | 4 +-
.../hbase-archetypes/dependencies.html | 4 +-
.../dependency-convergence.html | 4 +-
.../hbase-archetypes/dependency-info.html | 4 +-
.../hbase-archetypes/dependency-management.html | 4 +-
.../hbase-archetype-builder/dependencies.html | 4 +-
.../dependency-convergence.html | 4 +-
.../dependency-info.html | 4 +-
.../dependency-management.html | 4 +-
.../hbase-archetype-builder/index.html | 4 +-
.../hbase-archetype-builder/integration.html | 4 +-
.../hbase-archetype-builder/issue-tracking.html | 4 +-
.../hbase-archetype-builder/license.html | 4 +-
.../hbase-archetype-builder/mail-lists.html | 4 +-
.../plugin-management.html | 4 +-
.../hbase-archetype-builder/plugins.html | 4 +-
.../hbase-archetype-builder/project-info.html | 4 +-
.../project-summary.html | 4 +-
.../source-repository.html | 4 +-
.../hbase-archetype-builder/team-list.html | 4 +-
.../hbase-client-project/checkstyle.html | 4 +-
.../hbase-client-project/dependencies.html | 4 +-
.../dependency-convergence.html | 4 +-
.../hbase-client-project/dependency-info.html | 4 +-
.../dependency-management.html | 4 +-
.../hbase-client-project/index.html | 4 +-
.../hbase-client-project/integration.html | 4 +-
.../hbase-client-project/issue-tracking.html | 4 +-
.../hbase-client-project/license.html | 4 +-
.../hbase-client-project/mail-lists.html | 4 +-
.../hbase-client-project/plugin-management.html | 4 +-
.../hbase-client-project/plugins.html | 4 +-
.../hbase-client-project/project-info.html | 4 +-
.../hbase-client-project/project-reports.html | 4 +-
.../hbase-client-project/project-summary.html | 4 +-
.../hbase-client-project/source-repository.html | 4 +-
.../hbase-client-project/team-list.html | 4 +-
.../hbase-shaded-client-project/checkstyle.html | 4 +-
.../dependencies.html | 4 +-
.../dependency-convergence.html | 4 +-
.../dependency-info.html | 4 +-
.../dependency-management.html | 4 +-
.../hbase-shaded-client-project/index.html | 4 +-
.../integration.html | 4 +-
.../issue-tracking.html | 4 +-
.../hbase-shaded-client-project/license.html | 4 +-
.../hbase-shaded-client-project/mail-lists.html | 4 +-
.../plugin-management.html | 4 +-
.../hbase-shaded-client-project/plugins.html | 4 +-
.../project-info.html | 4 +-
.../project-reports.html | 4 +-
.../project-summary.html | 4 +-
.../source-repository.html | 4 +-
.../hbase-shaded-client-project/team-list.html | 4 +-
.../hbase-archetypes/index.html | 4 +-
.../hbase-archetypes/integration.html | 4 +-
.../hbase-archetypes/issue-tracking.html | 4 +-
.../hbase-archetypes/license.html | 4 +-
.../hbase-archetypes/mail-lists.html | 4 +-
.../hbase-archetypes/plugin-management.html | 4 +-
.../hbase-archetypes/plugins.html | 4 +-
.../hbase-archetypes/project-info.html | 4 +-
.../hbase-archetypes/project-summary.html | 4 +-
.../hbase-archetypes/source-repository.html | 4 +-
.../hbase-archetypes/team-list.html | 4 +-
.../hbase-spark/checkstyle.html | 4 +-
.../hbase-spark/dependencies.html | 4 +-
.../hbase-spark/dependency-convergence.html | 4 +-
.../hbase-spark/dependency-info.html | 4 +-
.../hbase-spark/dependency-management.html | 4 +-
.../hbase-spark/index.html | 4 +-
.../hbase-spark/integration.html | 4 +-
.../hbase-spark/issue-tracking.html | 4 +-
.../hbase-spark/license.html | 4 +-
.../hbase-spark/mail-lists.html | 4 +-
.../hbase-spark/plugin-management.html | 4 +-
.../hbase-spark/plugins.html | 4 +-
.../hbase-spark/project-info.html | 4 +-
.../hbase-spark/project-reports.html | 4 +-
.../hbase-spark/project-summary.html | 4 +-
.../hbase-spark/source-repository.html | 4 +-
.../hbase-spark/team-list.html | 4 +-
hbase-build-configuration/index.html | 4 +-
hbase-build-configuration/integration.html | 4 +-
hbase-build-configuration/issue-tracking.html | 4 +-
hbase-build-configuration/license.html | 4 +-
hbase-build-configuration/mail-lists.html | 4 +-
.../plugin-management.html | 4 +-
hbase-build-configuration/plugins.html | 4 +-
hbase-build-configuration/project-info.html | 4 +-
hbase-build-configuration/project-summary.html | 4 +-
.../source-repository.html | 4 +-
hbase-build-configuration/team-list.html | 4 +-
hbase-shaded-check-invariants/checkstyle.html | 4 +-
hbase-shaded-check-invariants/dependencies.html | 4 +-
.../dependency-convergence.html | 4 +-
.../dependency-info.html | 4 +-
.../dependency-management.html | 4 +-
hbase-shaded-check-invariants/index.html | 4 +-
hbase-shaded-check-invariants/integration.html | 4 +-
.../issue-tracking.html | 4 +-
hbase-shaded-check-invariants/license.html | 4 +-
hbase-shaded-check-invariants/mail-lists.html | 4 +-
.../plugin-management.html | 4 +-
hbase-shaded-check-invariants/plugins.html | 4 +-
hbase-shaded-check-invariants/project-info.html | 4 +-
.../project-reports.html | 4 +-
.../project-summary.html | 4 +-
.../source-repository.html | 4 +-
hbase-shaded-check-invariants/team-list.html | 4 +-
index.html | 4 +-
integration.html | 4 +-
issue-tracking.html | 4 +-
license.html | 4 +-
mail-lists.html | 4 +-
metrics.html | 4 +-
old_news.html | 4 +-
plugin-management.html | 4 +-
plugins.html | 4 +-
poweredbyhbase.html | 4 +-
project-info.html | 4 +-
project-reports.html | 4 +-
project-summary.html | 4 +-
pseudo-distributed.html | 4 +-
replication.html | 4 +-
resources.html | 4 +-
source-repository.html | 4 +-
sponsors.html | 4 +-
supportingprojects.html | 4 +-
team-list.html | 4 +-
testdevapidocs/index-all.html | 85 +-
.../hbase/testclassification/ClientTests.html | 19 +
.../testclassification/CoprocessorTests.html | 20 +-
.../hbase/testclassification/FilterTests.html | 20 +-
.../hbase/testclassification/FlakeyTests.html | 18 +
.../hbase/testclassification/IOTests.html | 19 +
.../testclassification/IntegrationTests.html | 5 +-
.../hbase/testclassification/LargeTests.html | 12 +-
.../testclassification/MapReduceTests.html | 18 +
.../hbase/testclassification/MasterTests.html | 18 +
.../hbase/testclassification/MediumTests.html | 12 +-
.../hbase/testclassification/MetricsTests.html | 1 +
.../hbase/testclassification/MiscTests.html | 18 +
.../hbase/testclassification/RPCTests.html | 18 +
.../testclassification/RegionServerTests.html | 20 +-
.../testclassification/ReplicationTests.html | 18 +
.../hbase/testclassification/RestTests.html | 20 +-
.../hbase/testclassification/SecurityTests.html | 20 +-
.../hbase/testclassification/SmallTests.html | 10 +-
.../VerySlowMapReduceTests.html | 21 +-
.../VerySlowRegionServerTests.html | 21 +-
.../hbase/testclassification/ZKTests.html | 4 +-
.../testclassification/package-summary.html | 85 +-
.../hadoop/hbase/client/TestShellNoCluster.html | 25 +-
.../hbase/testclassification/ClientTests.html | 76 +-
.../testclassification/CoprocessorTests.html | 79 +-
.../hbase/testclassification/FilterTests.html | 79 +-
.../hbase/testclassification/FlakeyTests.html | 74 +-
.../hbase/testclassification/IOTests.html | 76 +-
.../testclassification/IntegrationTests.html | 37 +-
.../hbase/testclassification/LargeTests.html | 75 +-
.../testclassification/MapReduceTests.html | 74 +-
.../hbase/testclassification/MasterTests.html | 74 +-
.../hbase/testclassification/MediumTests.html | 73 +-
.../hbase/testclassification/MetricsTests.html | 10 +-
.../hbase/testclassification/MiscTests.html | 74 +-
.../hbase/testclassification/RPCTests.html | 74 +-
.../testclassification/RegionServerTests.html | 79 +-
.../testclassification/ReplicationTests.html | 74 +-
.../hbase/testclassification/RestTests.html | 79 +-
.../hbase/testclassification/SecurityTests.html | 80 +-
.../hbase/testclassification/SmallTests.html | 67 +-
.../VerySlowMapReduceTests.html | 81 +-
.../VerySlowRegionServerTests.html | 73 +-
.../hbase/testclassification/ZKTests.html | 19 +-
272 files changed, 43326 insertions(+), 44298 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/48bd3915/acid-semantics.html
----------------------------------------------------------------------
diff --git a/acid-semantics.html b/acid-semantics.html
index cd0c32f..daf0780 100644
--- a/acid-semantics.html
+++ b/acid-semantics.html
@@ -7,7 +7,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20171216" />
+ <meta name="Date-Revision-yyyymmdd" content="20171217" />
<meta http-equiv="Content-Language" content="en" />
<title>Apache HBase –
Apache HBase (TM) ACID Properties
@@ -606,7 +606,7 @@ under the License. -->
<a href="https://www.apache.org/">The Apache Software Foundation</a>.
All rights reserved.
- <li id="publishDate" class="pull-right">Last Published: 2017-12-16</li>
+ <li id="publishDate" class="pull-right">Last Published: 2017-12-17</li>
</p>
</div>
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/48bd3915/apache_hbase_reference_guide.pdf
----------------------------------------------------------------------
diff --git a/apache_hbase_reference_guide.pdf b/apache_hbase_reference_guide.pdf
index b36d03a..aec7aa8 100644
--- a/apache_hbase_reference_guide.pdf
+++ b/apache_hbase_reference_guide.pdf
@@ -5,8 +5,8 @@
/Author (Apache HBase Team)
/Creator (Asciidoctor PDF 1.5.0.alpha.15, based on Prawn 2.2.2)
/Producer (Apache HBase Team)
-/ModDate (D:20171216144716+00'00')
-/CreationDate (D:20171216144716+00'00')
+/ModDate (D:20171217144715+00'00')
+/CreationDate (D:20171217144715+00'00')
>>
endobj
2 0 obj
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/48bd3915/apidocs/index-all.html
----------------------------------------------------------------------
diff --git a/apidocs/index-all.html b/apidocs/index-all.html
index 23a24e7..b73f99e 100644
--- a/apidocs/index-all.html
+++ b/apidocs/index-all.html
@@ -10594,7 +10594,7 @@
<dd> </dd>
<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html#killOneBackupZooKeeperServer--">killOneBackupZooKeeperServer()</a></span> - Method in class org.apache.hadoop.hbase.zookeeper.<a href="org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html" title="class in org.apache.hadoop.hbase.zookeeper">MiniZooKeeperCluster</a></dt>
<dd>
-<div class="block">Kill one back up ZK servers</div>
+<div class="block">Kill one back up ZK servers.</div>
</dd>
<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/mapreduce/TsvImporterMapper.html#kvCreator">kvCreator</a></span> - Variable in class org.apache.hadoop.hbase.mapreduce.<a href="org/apache/hadoop/hbase/mapreduce/TsvImporterMapper.html" title="class in org.apache.hadoop.hbase.mapreduce">TsvImporterMapper</a></dt>
<dd> </dd>
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/48bd3915/apidocs/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html
----------------------------------------------------------------------
diff --git a/apidocs/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html b/apidocs/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html
index 5eff509..9b4a44f 100644
--- a/apidocs/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html
+++ b/apidocs/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html
@@ -184,7 +184,7 @@ extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html#killOneBackupZooKeeperServer--">killOneBackupZooKeeperServer</a></span>()</code>
-<div class="block">Kill one back up ZK servers</div>
+<div class="block">Kill one back up ZK servers.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
@@ -348,14 +348,14 @@ extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?
<a href="http://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="paramLabel">Parameters:</span></dt>
-<dd><code>baseDir</code> - </dd>
-<dd><code>numZooKeeperServers</code> - </dd>
+<dd><code>baseDir</code> - the base directory to use</dd>
+<dd><code>numZooKeeperServers</code> - the number of ZooKeeper servers</dd>
<dt><span class="returnLabel">Returns:</span></dt>
-<dd>ClientPort server bound to, -1 if there was a
- binding problem and we couldn't pick another port.</dd>
+<dd>ClientPort server bound to, -1 if there was a binding problem and we couldn't pick
+ another port.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
-<dd><code><a href="http://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="http://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>
+<dd><code><a href="http://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 an operation fails during the startup</dd>
+<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code> - if the startup fails</dd>
</dl>
</li>
</ul>
@@ -365,11 +365,11 @@ extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?
<ul class="blockList">
<li class="blockList">
<h4>shutdown</h4>
-<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html#line.295">shutdown</a>()
+<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html#line.299">shutdown</a>()
throws <a href="http://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="http://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="http://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 waiting for the shutdown of a server fails</dd>
</dl>
</li>
</ul>
@@ -379,7 +379,7 @@ extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?
<ul class="blockList">
<li class="blockList">
<h4>killCurrentActiveZooKeeperServer</h4>
-<pre>public int <a href="../../../../../src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html#line.329">killCurrentActiveZooKeeperServer</a>()
+<pre>public int <a href="../../../../../src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html#line.333">killCurrentActiveZooKeeperServer</a>()
throws <a href="http://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="http://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>
@@ -387,7 +387,7 @@ extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?
<dd>clientPort return clientPort if there is another ZK backup can run
when killing the current active; return -1, if there is no backups.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
-<dd><code><a href="http://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="http://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 waiting for the shutdown of a server fails</dd>
<dd><code><a href="http://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>
@@ -398,13 +398,13 @@ extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?
<ul class="blockList">
<li class="blockList">
<h4>killOneBackupZooKeeperServer</h4>
-<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html#line.370">killOneBackupZooKeeperServer</a>()
+<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html#line.373">killOneBackupZooKeeperServer</a>()
throws <a href="http://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="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre>
-<div class="block">Kill one back up ZK servers</div>
+<div class="block">Kill one back up ZK servers.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
-<dd><code><a href="http://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="http://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 waiting for the shutdown of a server fails</dd>
<dd><code><a href="http://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>
@@ -415,7 +415,7 @@ extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?
<ul class="blockListLast">
<li class="blockList">
<h4>getClientPort</h4>
-<pre>public int <a href="../../../../../src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html#line.468">getClientPort</a>()</pre>
+<pre>public int <a href="../../../../../src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html#line.469">getClientPort</a>()</pre>
</li>
</ul>
</li>
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/48bd3915/apidocs/src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html b/apidocs/src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html
index 5db3c04..313bb69 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.html
@@ -28,9 +28,9 @@
<span class="sourceLineNo">020</span><a name="line.20"></a>
<span class="sourceLineNo">021</span>import java.io.BufferedReader;<a name="line.21"></a>
<span class="sourceLineNo">022</span>import java.io.File;<a name="line.22"></a>
-<span class="sourceLineNo">023</span>import java.io.InterruptedIOException;<a name="line.23"></a>
-<span class="sourceLineNo">024</span>import java.io.IOException;<a name="line.24"></a>
-<span class="sourceLineNo">025</span>import java.io.InputStreamReader;<a name="line.25"></a>
+<span class="sourceLineNo">023</span>import java.io.IOException;<a name="line.23"></a>
+<span class="sourceLineNo">024</span>import java.io.InputStreamReader;<a name="line.24"></a>
+<span class="sourceLineNo">025</span>import java.io.InterruptedIOException;<a name="line.25"></a>
<span class="sourceLineNo">026</span>import java.io.OutputStream;<a name="line.26"></a>
<span class="sourceLineNo">027</span>import java.io.Reader;<a name="line.27"></a>
<span class="sourceLineNo">028</span>import java.net.BindException;<a name="line.28"></a>
@@ -42,9 +42,9 @@
<span class="sourceLineNo">034</span><a name="line.34"></a>
<span class="sourceLineNo">035</span>import org.apache.commons.logging.Log;<a name="line.35"></a>
<span class="sourceLineNo">036</span>import org.apache.commons.logging.LogFactory;<a name="line.36"></a>
-<span class="sourceLineNo">037</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.37"></a>
-<span class="sourceLineNo">038</span>import org.apache.hadoop.conf.Configuration;<a name="line.38"></a>
-<span class="sourceLineNo">039</span>import org.apache.hadoop.hbase.HConstants;<a name="line.39"></a>
+<span class="sourceLineNo">037</span>import org.apache.hadoop.conf.Configuration;<a name="line.37"></a>
+<span class="sourceLineNo">038</span>import org.apache.hadoop.hbase.HConstants;<a name="line.38"></a>
+<span class="sourceLineNo">039</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.39"></a>
<span class="sourceLineNo">040</span>import org.apache.zookeeper.server.NIOServerCnxnFactory;<a name="line.40"></a>
<span class="sourceLineNo">041</span>import org.apache.zookeeper.server.ZooKeeperServer;<a name="line.41"></a>
<span class="sourceLineNo">042</span>import org.apache.zookeeper.server.persistence.FileTxnLog;<a name="line.42"></a>
@@ -195,293 +195,294 @@
<span class="sourceLineNo">187</span> }<a name="line.187"></a>
<span class="sourceLineNo">188</span><a name="line.188"></a>
<span class="sourceLineNo">189</span> /**<a name="line.189"></a>
-<span class="sourceLineNo">190</span> * @param baseDir<a name="line.190"></a>
-<span class="sourceLineNo">191</span> * @param numZooKeeperServers<a name="line.191"></a>
-<span class="sourceLineNo">192</span> * @return ClientPort server bound to, -1 if there was a<a name="line.192"></a>
-<span class="sourceLineNo">193</span> * binding problem and we couldn't pick another port.<a name="line.193"></a>
-<span class="sourceLineNo">194</span> * @throws IOException<a name="line.194"></a>
-<span class="sourceLineNo">195</span> * @throws InterruptedException<a name="line.195"></a>
+<span class="sourceLineNo">190</span> * @param baseDir the base directory to use<a name="line.190"></a>
+<span class="sourceLineNo">191</span> * @param numZooKeeperServers the number of ZooKeeper servers<a name="line.191"></a>
+<span class="sourceLineNo">192</span> * @return ClientPort server bound to, -1 if there was a binding problem and we couldn't pick<a name="line.192"></a>
+<span class="sourceLineNo">193</span> * another port.<a name="line.193"></a>
+<span class="sourceLineNo">194</span> * @throws IOException if an operation fails during the startup<a name="line.194"></a>
+<span class="sourceLineNo">195</span> * @throws InterruptedException if the startup fails<a name="line.195"></a>
<span class="sourceLineNo">196</span> */<a name="line.196"></a>
<span class="sourceLineNo">197</span> public int startup(File baseDir, int numZooKeeperServers) throws IOException,<a name="line.197"></a>
-<span class="sourceLineNo">198</span> InterruptedException {<a name="line.198"></a>
-<span class="sourceLineNo">199</span> if (numZooKeeperServers <= 0)<a name="line.199"></a>
+<span class="sourceLineNo">198</span> InterruptedException {<a name="line.198"></a>
+<span class="sourceLineNo">199</span> if (numZooKeeperServers <= 0) {<a name="line.199"></a>
<span class="sourceLineNo">200</span> return -1;<a name="line.200"></a>
-<span class="sourceLineNo">201</span><a name="line.201"></a>
-<span class="sourceLineNo">202</span> setupTestEnv();<a name="line.202"></a>
-<span class="sourceLineNo">203</span> shutdown();<a name="line.203"></a>
-<span class="sourceLineNo">204</span><a name="line.204"></a>
-<span class="sourceLineNo">205</span> int tentativePort = -1; // the seed port<a name="line.205"></a>
-<span class="sourceLineNo">206</span> int currentClientPort;<a name="line.206"></a>
-<span class="sourceLineNo">207</span><a name="line.207"></a>
-<span class="sourceLineNo">208</span> // running all the ZK servers<a name="line.208"></a>
-<span class="sourceLineNo">209</span> for (int i = 0; i < numZooKeeperServers; i++) {<a name="line.209"></a>
-<span class="sourceLineNo">210</span> File dir = new File(baseDir, "zookeeper_"+i).getAbsoluteFile();<a name="line.210"></a>
-<span class="sourceLineNo">211</span> createDir(dir);<a name="line.211"></a>
-<span class="sourceLineNo">212</span> int tickTimeToUse;<a name="line.212"></a>
-<span class="sourceLineNo">213</span> if (this.tickTime > 0) {<a name="line.213"></a>
-<span class="sourceLineNo">214</span> tickTimeToUse = this.tickTime;<a name="line.214"></a>
-<span class="sourceLineNo">215</span> } else {<a name="line.215"></a>
-<span class="sourceLineNo">216</span> tickTimeToUse = TICK_TIME;<a name="line.216"></a>
-<span class="sourceLineNo">217</span> }<a name="line.217"></a>
-<span class="sourceLineNo">218</span><a name="line.218"></a>
-<span class="sourceLineNo">219</span> // Set up client port - if we have already had a list of valid ports, use it.<a name="line.219"></a>
-<span class="sourceLineNo">220</span> if (hasValidClientPortInList(i)) {<a name="line.220"></a>
-<span class="sourceLineNo">221</span> currentClientPort = clientPortList.get(i);<a name="line.221"></a>
-<span class="sourceLineNo">222</span> } else {<a name="line.222"></a>
-<span class="sourceLineNo">223</span> tentativePort = selectClientPort(tentativePort); // update the seed<a name="line.223"></a>
-<span class="sourceLineNo">224</span> currentClientPort = tentativePort;<a name="line.224"></a>
-<span class="sourceLineNo">225</span> }<a name="line.225"></a>
-<span class="sourceLineNo">226</span><a name="line.226"></a>
-<span class="sourceLineNo">227</span> ZooKeeperServer server = new ZooKeeperServer(dir, dir, tickTimeToUse);<a name="line.227"></a>
-<span class="sourceLineNo">228</span> // Setting {min,max}SessionTimeout defaults to be the same as in Zookeeper<a name="line.228"></a>
-<span class="sourceLineNo">229</span> server.setMinSessionTimeout(configuration.getInt("hbase.zookeeper.property.minSessionTimeout", -1));<a name="line.229"></a>
-<span class="sourceLineNo">230</span> server.setMaxSessionTimeout(configuration.getInt("hbase.zookeeper.property.maxSessionTimeout", -1));<a name="line.230"></a>
-<span class="sourceLineNo">231</span> NIOServerCnxnFactory standaloneServerFactory;<a name="line.231"></a>
-<span class="sourceLineNo">232</span> while (true) {<a name="line.232"></a>
-<span class="sourceLineNo">233</span> try {<a name="line.233"></a>
-<span class="sourceLineNo">234</span> standaloneServerFactory = new NIOServerCnxnFactory();<a name="line.234"></a>
-<span class="sourceLineNo">235</span> standaloneServerFactory.configure(<a name="line.235"></a>
-<span class="sourceLineNo">236</span> new InetSocketAddress(currentClientPort),<a name="line.236"></a>
-<span class="sourceLineNo">237</span> configuration.getInt(HConstants.ZOOKEEPER_MAX_CLIENT_CNXNS, HConstants.DEFAULT_ZOOKEPER_MAX_CLIENT_CNXNS));<a name="line.237"></a>
-<span class="sourceLineNo">238</span> } catch (BindException e) {<a name="line.238"></a>
-<span class="sourceLineNo">239</span> LOG.debug("Failed binding ZK Server to client port: " +<a name="line.239"></a>
-<span class="sourceLineNo">240</span> currentClientPort, e);<a name="line.240"></a>
-<span class="sourceLineNo">241</span> // We're told to use some port but it's occupied, fail<a name="line.241"></a>
-<span class="sourceLineNo">242</span> if (hasValidClientPortInList(i)) {<a name="line.242"></a>
-<span class="sourceLineNo">243</span> return -1;<a name="line.243"></a>
-<span class="sourceLineNo">244</span> }<a name="line.244"></a>
-<span class="sourceLineNo">245</span> // This port is already in use, try to use another.<a name="line.245"></a>
-<span class="sourceLineNo">246</span> tentativePort = selectClientPort(tentativePort);<a name="line.246"></a>
-<span class="sourceLineNo">247</span> currentClientPort = tentativePort;<a name="line.247"></a>
-<span class="sourceLineNo">248</span> continue;<a name="line.248"></a>
-<span class="sourceLineNo">249</span> }<a name="line.249"></a>
-<span class="sourceLineNo">250</span> break;<a name="line.250"></a>
-<span class="sourceLineNo">251</span> }<a name="line.251"></a>
-<span class="sourceLineNo">252</span><a name="line.252"></a>
-<span class="sourceLineNo">253</span> // Start up this ZK server<a name="line.253"></a>
-<span class="sourceLineNo">254</span> standaloneServerFactory.startup(server);<a name="line.254"></a>
-<span class="sourceLineNo">255</span> // Runs a 'stat' against the servers.<a name="line.255"></a>
-<span class="sourceLineNo">256</span> if (!waitForServerUp(currentClientPort, connectionTimeout)) {<a name="line.256"></a>
-<span class="sourceLineNo">257</span> throw new IOException("Waiting for startup of standalone server");<a name="line.257"></a>
-<span class="sourceLineNo">258</span> }<a name="line.258"></a>
-<span class="sourceLineNo">259</span><a name="line.259"></a>
-<span class="sourceLineNo">260</span> // We have selected a port as a client port. Update clientPortList if necessary.<a name="line.260"></a>
-<span class="sourceLineNo">261</span> if (clientPortList.size() <= i) { // it is not in the list, add the port<a name="line.261"></a>
-<span class="sourceLineNo">262</span> clientPortList.add(currentClientPort);<a name="line.262"></a>
-<span class="sourceLineNo">263</span> }<a name="line.263"></a>
-<span class="sourceLineNo">264</span> else if (clientPortList.get(i) <= 0) { // the list has invalid port, update with valid port<a name="line.264"></a>
-<span class="sourceLineNo">265</span> clientPortList.remove(i);<a name="line.265"></a>
-<span class="sourceLineNo">266</span> clientPortList.add(i, currentClientPort);<a name="line.266"></a>
+<span class="sourceLineNo">201</span> }<a name="line.201"></a>
+<span class="sourceLineNo">202</span><a name="line.202"></a>
+<span class="sourceLineNo">203</span> setupTestEnv();<a name="line.203"></a>
+<span class="sourceLineNo">204</span> shutdown();<a name="line.204"></a>
+<span class="sourceLineNo">205</span><a name="line.205"></a>
+<span class="sourceLineNo">206</span> int tentativePort = -1; // the seed port<a name="line.206"></a>
+<span class="sourceLineNo">207</span> int currentClientPort;<a name="line.207"></a>
+<span class="sourceLineNo">208</span><a name="line.208"></a>
+<span class="sourceLineNo">209</span> // running all the ZK servers<a name="line.209"></a>
+<span class="sourceLineNo">210</span> for (int i = 0; i < numZooKeeperServers; i++) {<a name="line.210"></a>
+<span class="sourceLineNo">211</span> File dir = new File(baseDir, "zookeeper_"+i).getAbsoluteFile();<a name="line.211"></a>
+<span class="sourceLineNo">212</span> createDir(dir);<a name="line.212"></a>
+<span class="sourceLineNo">213</span> int tickTimeToUse;<a name="line.213"></a>
+<span class="sourceLineNo">214</span> if (this.tickTime > 0) {<a name="line.214"></a>
+<span class="sourceLineNo">215</span> tickTimeToUse = this.tickTime;<a name="line.215"></a>
+<span class="sourceLineNo">216</span> } else {<a name="line.216"></a>
+<span class="sourceLineNo">217</span> tickTimeToUse = TICK_TIME;<a name="line.217"></a>
+<span class="sourceLineNo">218</span> }<a name="line.218"></a>
+<span class="sourceLineNo">219</span><a name="line.219"></a>
+<span class="sourceLineNo">220</span> // Set up client port - if we have already had a list of valid ports, use it.<a name="line.220"></a>
+<span class="sourceLineNo">221</span> if (hasValidClientPortInList(i)) {<a name="line.221"></a>
+<span class="sourceLineNo">222</span> currentClientPort = clientPortList.get(i);<a name="line.222"></a>
+<span class="sourceLineNo">223</span> } else {<a name="line.223"></a>
+<span class="sourceLineNo">224</span> tentativePort = selectClientPort(tentativePort); // update the seed<a name="line.224"></a>
+<span class="sourceLineNo">225</span> currentClientPort = tentativePort;<a name="line.225"></a>
+<span class="sourceLineNo">226</span> }<a name="line.226"></a>
+<span class="sourceLineNo">227</span><a name="line.227"></a>
+<span class="sourceLineNo">228</span> ZooKeeperServer server = new ZooKeeperServer(dir, dir, tickTimeToUse);<a name="line.228"></a>
+<span class="sourceLineNo">229</span> // Setting {min,max}SessionTimeout defaults to be the same as in Zookeeper<a name="line.229"></a>
+<span class="sourceLineNo">230</span> server.setMinSessionTimeout(configuration.getInt(<a name="line.230"></a>
+<span class="sourceLineNo">231</span> "hbase.zookeeper.property.minSessionTimeout", -1));<a name="line.231"></a>
+<span class="sourceLineNo">232</span> server.setMaxSessionTimeout(configuration.getInt(<a name="line.232"></a>
+<span class="sourceLineNo">233</span> "hbase.zookeeper.property.maxSessionTimeout", -1));<a name="line.233"></a>
+<span class="sourceLineNo">234</span> NIOServerCnxnFactory standaloneServerFactory;<a name="line.234"></a>
+<span class="sourceLineNo">235</span> while (true) {<a name="line.235"></a>
+<span class="sourceLineNo">236</span> try {<a name="line.236"></a>
+<span class="sourceLineNo">237</span> standaloneServerFactory = new NIOServerCnxnFactory();<a name="line.237"></a>
+<span class="sourceLineNo">238</span> standaloneServerFactory.configure(<a name="line.238"></a>
+<span class="sourceLineNo">239</span> new InetSocketAddress(currentClientPort),<a name="line.239"></a>
+<span class="sourceLineNo">240</span> configuration.getInt(HConstants.ZOOKEEPER_MAX_CLIENT_CNXNS,<a name="line.240"></a>
+<span class="sourceLineNo">241</span> HConstants.DEFAULT_ZOOKEPER_MAX_CLIENT_CNXNS));<a name="line.241"></a>
+<span class="sourceLineNo">242</span> } catch (BindException e) {<a name="line.242"></a>
+<span class="sourceLineNo">243</span> LOG.debug("Failed binding ZK Server to client port: " +<a name="line.243"></a>
+<span class="sourceLineNo">244</span> currentClientPort, e);<a name="line.244"></a>
+<span class="sourceLineNo">245</span> // We're told to use some port but it's occupied, fail<a name="line.245"></a>
+<span class="sourceLineNo">246</span> if (hasValidClientPortInList(i)) {<a name="line.246"></a>
+<span class="sourceLineNo">247</span> return -1;<a name="line.247"></a>
+<span class="sourceLineNo">248</span> }<a name="line.248"></a>
+<span class="sourceLineNo">249</span> // This port is already in use, try to use another.<a name="line.249"></a>
+<span class="sourceLineNo">250</span> tentativePort = selectClientPort(tentativePort);<a name="line.250"></a>
+<span class="sourceLineNo">251</span> currentClientPort = tentativePort;<a name="line.251"></a>
+<span class="sourceLineNo">252</span> continue;<a name="line.252"></a>
+<span class="sourceLineNo">253</span> }<a name="line.253"></a>
+<span class="sourceLineNo">254</span> break;<a name="line.254"></a>
+<span class="sourceLineNo">255</span> }<a name="line.255"></a>
+<span class="sourceLineNo">256</span><a name="line.256"></a>
+<span class="sourceLineNo">257</span> // Start up this ZK server<a name="line.257"></a>
+<span class="sourceLineNo">258</span> standaloneServerFactory.startup(server);<a name="line.258"></a>
+<span class="sourceLineNo">259</span> // Runs a 'stat' against the servers.<a name="line.259"></a>
+<span class="sourceLineNo">260</span> if (!waitForServerUp(currentClientPort, connectionTimeout)) {<a name="line.260"></a>
+<span class="sourceLineNo">261</span> throw new IOException("Waiting for startup of standalone server");<a name="line.261"></a>
+<span class="sourceLineNo">262</span> }<a name="line.262"></a>
+<span class="sourceLineNo">263</span><a name="line.263"></a>
+<span class="sourceLineNo">264</span> // We have selected a port as a client port. Update clientPortList if necessary.<a name="line.264"></a>
+<span class="sourceLineNo">265</span> if (clientPortList.size() <= i) { // it is not in the list, add the port<a name="line.265"></a>
+<span class="sourceLineNo">266</span> clientPortList.add(currentClientPort);<a name="line.266"></a>
<span class="sourceLineNo">267</span> }<a name="line.267"></a>
-<span class="sourceLineNo">268</span><a name="line.268"></a>
-<span class="sourceLineNo">269</span> standaloneServerFactoryList.add(standaloneServerFactory);<a name="line.269"></a>
-<span class="sourceLineNo">270</span> zooKeeperServers.add(server);<a name="line.270"></a>
-<span class="sourceLineNo">271</span> }<a name="line.271"></a>
+<span class="sourceLineNo">268</span> else if (clientPortList.get(i) <= 0) { // the list has invalid port, update with valid port<a name="line.268"></a>
+<span class="sourceLineNo">269</span> clientPortList.remove(i);<a name="line.269"></a>
+<span class="sourceLineNo">270</span> clientPortList.add(i, currentClientPort);<a name="line.270"></a>
+<span class="sourceLineNo">271</span> }<a name="line.271"></a>
<span class="sourceLineNo">272</span><a name="line.272"></a>
-<span class="sourceLineNo">273</span> // set the first one to be active ZK; Others are backups<a name="line.273"></a>
-<span class="sourceLineNo">274</span> activeZKServerIndex = 0;<a name="line.274"></a>
-<span class="sourceLineNo">275</span> started = true;<a name="line.275"></a>
-<span class="sourceLineNo">276</span> int clientPort = clientPortList.get(activeZKServerIndex);<a name="line.276"></a>
-<span class="sourceLineNo">277</span> LOG.info("Started MiniZooKeeperCluster and ran successful 'stat' " +<a name="line.277"></a>
-<span class="sourceLineNo">278</span> "on client port=" + clientPort);<a name="line.278"></a>
-<span class="sourceLineNo">279</span> return clientPort;<a name="line.279"></a>
-<span class="sourceLineNo">280</span> }<a name="line.280"></a>
-<span class="sourceLineNo">281</span><a name="line.281"></a>
-<span class="sourceLineNo">282</span> private void createDir(File dir) throws IOException {<a name="line.282"></a>
-<span class="sourceLineNo">283</span> try {<a name="line.283"></a>
-<span class="sourceLineNo">284</span> if (!dir.exists()) {<a name="line.284"></a>
-<span class="sourceLineNo">285</span> dir.mkdirs();<a name="line.285"></a>
-<span class="sourceLineNo">286</span> }<a name="line.286"></a>
-<span class="sourceLineNo">287</span> } catch (SecurityException e) {<a name="line.287"></a>
-<span class="sourceLineNo">288</span> throw new IOException("creating dir: " + dir, e);<a name="line.288"></a>
-<span class="sourceLineNo">289</span> }<a name="line.289"></a>
-<span class="sourceLineNo">290</span> }<a name="line.290"></a>
-<span class="sourceLineNo">291</span><a name="line.291"></a>
-<span class="sourceLineNo">292</span> /**<a name="line.292"></a>
-<span class="sourceLineNo">293</span> * @throws IOException<a name="line.293"></a>
-<span class="sourceLineNo">294</span> */<a name="line.294"></a>
-<span class="sourceLineNo">295</span> public void shutdown() throws IOException {<a name="line.295"></a>
-<span class="sourceLineNo">296</span> // shut down all the zk servers<a name="line.296"></a>
-<span class="sourceLineNo">297</span> for (int i = 0; i < standaloneServerFactoryList.size(); i++) {<a name="line.297"></a>
-<span class="sourceLineNo">298</span> NIOServerCnxnFactory standaloneServerFactory =<a name="line.298"></a>
-<span class="sourceLineNo">299</span> standaloneServerFactoryList.get(i);<a name="line.299"></a>
-<span class="sourceLineNo">300</span> int clientPort = clientPortList.get(i);<a name="line.300"></a>
-<span class="sourceLineNo">301</span><a name="line.301"></a>
-<span class="sourceLineNo">302</span> standaloneServerFactory.shutdown();<a name="line.302"></a>
-<span class="sourceLineNo">303</span> if (!waitForServerDown(clientPort, connectionTimeout)) {<a name="line.303"></a>
-<span class="sourceLineNo">304</span> throw new IOException("Waiting for shutdown of standalone server");<a name="line.304"></a>
-<span class="sourceLineNo">305</span> }<a name="line.305"></a>
-<span class="sourceLineNo">306</span> }<a name="line.306"></a>
-<span class="sourceLineNo">307</span> standaloneServerFactoryList.clear();<a name="line.307"></a>
-<span class="sourceLineNo">308</span><a name="line.308"></a>
-<span class="sourceLineNo">309</span> for (ZooKeeperServer zkServer: zooKeeperServers) {<a name="line.309"></a>
-<span class="sourceLineNo">310</span> //explicitly close ZKDatabase since ZookeeperServer does not close them<a name="line.310"></a>
-<span class="sourceLineNo">311</span> zkServer.getZKDatabase().close();<a name="line.311"></a>
-<span class="sourceLineNo">312</span> }<a name="line.312"></a>
-<span class="sourceLineNo">313</span> zooKeeperServers.clear();<a name="line.313"></a>
-<span class="sourceLineNo">314</span><a name="line.314"></a>
-<span class="sourceLineNo">315</span> // clear everything<a name="line.315"></a>
-<span class="sourceLineNo">316</span> if (started) {<a name="line.316"></a>
-<span class="sourceLineNo">317</span> started = false;<a name="line.317"></a>
-<span class="sourceLineNo">318</span> activeZKServerIndex = 0;<a name="line.318"></a>
-<span class="sourceLineNo">319</span> clientPortList.clear();<a name="line.319"></a>
-<span class="sourceLineNo">320</span> LOG.info("Shutdown MiniZK cluster with all ZK servers");<a name="line.320"></a>
-<span class="sourceLineNo">321</span> }<a name="line.321"></a>
-<span class="sourceLineNo">322</span> }<a name="line.322"></a>
-<span class="sourceLineNo">323</span><a name="line.323"></a>
-<span class="sourceLineNo">324</span> /**@return clientPort return clientPort if there is another ZK backup can run<a name="line.324"></a>
-<span class="sourceLineNo">325</span> * when killing the current active; return -1, if there is no backups.<a name="line.325"></a>
-<span class="sourceLineNo">326</span> * @throws IOException<a name="line.326"></a>
-<span class="sourceLineNo">327</span> * @throws InterruptedException<a name="line.327"></a>
-<span class="sourceLineNo">328</span> */<a name="line.328"></a>
-<span class="sourceLineNo">329</span> public int killCurrentActiveZooKeeperServer() throws IOException,<a name="line.329"></a>
-<span class="sourceLineNo">330</span> InterruptedException {<a name="line.330"></a>
-<span class="sourceLineNo">331</span> if (!started || activeZKServerIndex < 0) {<a name="line.331"></a>
-<span class="sourceLineNo">332</span> return -1;<a name="line.332"></a>
-<span class="sourceLineNo">333</span> }<a name="line.333"></a>
-<span class="sourceLineNo">334</span><a name="line.334"></a>
-<span class="sourceLineNo">335</span> // Shutdown the current active one<a name="line.335"></a>
-<span class="sourceLineNo">336</span> NIOServerCnxnFactory standaloneServerFactory =<a name="line.336"></a>
-<span class="sourceLineNo">337</span> standaloneServerFactoryList.get(activeZKServerIndex);<a name="line.337"></a>
-<span class="sourceLineNo">338</span> int clientPort = clientPortList.get(activeZKServerIndex);<a name="line.338"></a>
-<span class="sourceLineNo">339</span><a name="line.339"></a>
-<span class="sourceLineNo">340</span> standaloneServerFactory.shutdown();<a name="line.340"></a>
-<span class="sourceLineNo">341</span> if (!waitForServerDown(clientPort, connectionTimeout)) {<a name="line.341"></a>
-<span class="sourceLineNo">342</span> throw new IOException("Waiting for shutdown of standalone server");<a name="line.342"></a>
-<span class="sourceLineNo">343</span> }<a name="line.343"></a>
-<span class="sourceLineNo">344</span><a name="line.344"></a>
-<span class="sourceLineNo">345</span> zooKeeperServers.get(activeZKServerIndex).getZKDatabase().close();<a name="line.345"></a>
-<span class="sourceLineNo">346</span><a name="line.346"></a>
-<span class="sourceLineNo">347</span> // remove the current active zk server<a name="line.347"></a>
-<span class="sourceLineNo">348</span> standaloneServerFactoryList.remove(activeZKServerIndex);<a name="line.348"></a>
-<span class="sourceLineNo">349</span> clientPortList.remove(activeZKServerIndex);<a name="line.349"></a>
-<span class="sourceLineNo">350</span> zooKeeperServers.remove(activeZKServerIndex);<a name="line.350"></a>
-<span class="sourceLineNo">351</span> LOG.info("Kill the current active ZK servers in the cluster " +<a name="line.351"></a>
-<span class="sourceLineNo">352</span> "on client port: " + clientPort);<a name="line.352"></a>
-<span class="sourceLineNo">353</span><a name="line.353"></a>
-<span class="sourceLineNo">354</span> if (standaloneServerFactoryList.isEmpty()) {<a name="line.354"></a>
-<span class="sourceLineNo">355</span> // there is no backup servers;<a name="line.355"></a>
-<span class="sourceLineNo">356</span> return -1;<a name="line.356"></a>
-<span class="sourceLineNo">357</span> }<a name="line.357"></a>
-<span class="sourceLineNo">358</span> clientPort = clientPortList.get(activeZKServerIndex);<a name="line.358"></a>
-<span class="sourceLineNo">359</span> LOG.info("Activate a backup zk server in the cluster " +<a name="line.359"></a>
-<span class="sourceLineNo">360</span> "on client port: " + clientPort);<a name="line.360"></a>
-<span class="sourceLineNo">361</span> // return the next back zk server's port<a name="line.361"></a>
-<span class="sourceLineNo">362</span> return clientPort;<a name="line.362"></a>
-<span class="sourceLineNo">363</span> }<a name="line.363"></a>
-<span class="sourceLineNo">364</span><a name="line.364"></a>
-<span class="sourceLineNo">365</span> /**<a name="line.365"></a>
-<span class="sourceLineNo">366</span> * Kill one back up ZK servers<a name="line.366"></a>
-<span class="sourceLineNo">367</span> * @throws IOException<a name="line.367"></a>
-<span class="sourceLineNo">368</span> * @throws InterruptedException<a name="line.368"></a>
-<span class="sourceLineNo">369</span> */<a name="line.369"></a>
-<span class="sourceLineNo">370</span> public void killOneBackupZooKeeperServer() throws IOException,<a name="line.370"></a>
-<span class="sourceLineNo">371</span> InterruptedException {<a name="line.371"></a>
-<span class="sourceLineNo">372</span> if (!started || activeZKServerIndex < 0 ||<a name="line.372"></a>
-<span class="sourceLineNo">373</span> standaloneServerFactoryList.size() <= 1) {<a name="line.373"></a>
-<span class="sourceLineNo">374</span> return ;<a name="line.374"></a>
-<span class="sourceLineNo">375</span> }<a name="line.375"></a>
-<span class="sourceLineNo">376</span><a name="line.376"></a>
-<span class="sourceLineNo">377</span> int backupZKServerIndex = activeZKServerIndex+1;<a name="line.377"></a>
-<span class="sourceLineNo">378</span> // Shutdown the current active one<a name="line.378"></a>
-<span class="sourceLineNo">379</span> NIOServerCnxnFactory standaloneServerFactory =<a name="line.379"></a>
-<span class="sourceLineNo">380</span> standaloneServerFactoryList.get(backupZKServerIndex);<a name="line.380"></a>
-<span class="sourceLineNo">381</span> int clientPort = clientPortList.get(backupZKServerIndex);<a name="line.381"></a>
-<span class="sourceLineNo">382</span><a name="line.382"></a>
-<span class="sourceLineNo">383</span> standaloneServerFactory.shutdown();<a name="line.383"></a>
-<span class="sourceLineNo">384</span> if (!waitForServerDown(clientPort, connectionTimeout)) {<a name="line.384"></a>
-<span class="sourceLineNo">385</span> throw new IOException("Waiting for shutdown of standalone server");<a name="line.385"></a>
-<span class="sourceLineNo">386</span> }<a name="line.386"></a>
-<span class="sourceLineNo">387</span><a name="line.387"></a>
-<span class="sourceLineNo">388</span> zooKeeperServers.get(backupZKServerIndex).getZKDatabase().close();<a name="line.388"></a>
-<span class="sourceLineNo">389</span><a name="line.389"></a>
-<span class="sourceLineNo">390</span> // remove this backup zk server<a name="line.390"></a>
-<span class="sourceLineNo">391</span> standaloneServerFactoryList.remove(backupZKServerIndex);<a name="line.391"></a>
-<span class="sourceLineNo">392</span> clientPortList.remove(backupZKServerIndex);<a name="line.392"></a>
-<span class="sourceLineNo">393</span> zooKeeperServers.remove(backupZKServerIndex);<a name="line.393"></a>
-<span class="sourceLineNo">394</span> LOG.info("Kill one backup ZK servers in the cluster " +<a name="line.394"></a>
-<span class="sourceLineNo">395</span> "on client port: " + clientPort);<a name="line.395"></a>
-<span class="sourceLineNo">396</span> }<a name="line.396"></a>
-<span class="sourceLineNo">397</span><a name="line.397"></a>
-<span class="sourceLineNo">398</span> // XXX: From o.a.zk.t.ClientBase<a name="line.398"></a>
-<span class="sourceLineNo">399</span> private static boolean waitForServerDown(int port, long timeout) throws IOException {<a name="line.399"></a>
-<span class="sourceLineNo">400</span> long start = System.currentTimeMillis();<a name="line.400"></a>
-<span class="sourceLineNo">401</span> while (true) {<a name="line.401"></a>
-<span class="sourceLineNo">402</span> try {<a name="line.402"></a>
-<span class="sourceLineNo">403</span> Socket sock = new Socket("localhost", port);<a name="line.403"></a>
-<span class="sourceLineNo">404</span> try {<a name="line.404"></a>
-<span class="sourceLineNo">405</span> OutputStream outstream = sock.getOutputStream();<a name="line.405"></a>
-<span class="sourceLineNo">406</span> outstream.write("stat".getBytes());<a name="line.406"></a>
-<span class="sourceLineNo">407</span> outstream.flush();<a name="line.407"></a>
-<span class="sourceLineNo">408</span> } finally {<a name="line.408"></a>
-<span class="sourceLineNo">409</span> sock.close();<a name="line.409"></a>
-<span class="sourceLineNo">410</span> }<a name="line.410"></a>
-<span class="sourceLineNo">411</span> } catch (IOException e) {<a name="line.411"></a>
-<span class="sourceLineNo">412</span> return true;<a name="line.412"></a>
-<span class="sourceLineNo">413</span> }<a name="line.413"></a>
-<span class="sourceLineNo">414</span><a name="line.414"></a>
-<span class="sourceLineNo">415</span> if (System.currentTimeMillis() > start + timeout) {<a name="line.415"></a>
-<span class="sourceLineNo">416</span> break;<a name="line.416"></a>
-<span class="sourceLineNo">417</span> }<a name="line.417"></a>
-<span class="sourceLineNo">418</span> try {<a name="line.418"></a>
-<span class="sourceLineNo">419</span> Thread.sleep(250);<a name="line.419"></a>
-<span class="sourceLineNo">420</span> } catch (InterruptedException e) {<a name="line.420"></a>
-<span class="sourceLineNo">421</span> throw (InterruptedIOException)new InterruptedIOException().initCause(e);<a name="line.421"></a>
-<span class="sourceLineNo">422</span> }<a name="line.422"></a>
-<span class="sourceLineNo">423</span> }<a name="line.423"></a>
-<span class="sourceLineNo">424</span> return false;<a name="line.424"></a>
-<span class="sourceLineNo">425</span> }<a name="line.425"></a>
-<span class="sourceLineNo">426</span><a name="line.426"></a>
-<span class="sourceLineNo">427</span> // XXX: From o.a.zk.t.ClientBase<a name="line.427"></a>
-<span class="sourceLineNo">428</span> private static boolean waitForServerUp(int port, long timeout) throws IOException {<a name="line.428"></a>
-<span class="sourceLineNo">429</span> long start = System.currentTimeMillis();<a name="line.429"></a>
-<span class="sourceLineNo">430</span> while (true) {<a name="line.430"></a>
-<span class="sourceLineNo">431</span> try {<a name="line.431"></a>
-<span class="sourceLineNo">432</span> Socket sock = new Socket("localhost", port);<a name="line.432"></a>
-<span class="sourceLineNo">433</span> BufferedReader reader = null;<a name="line.433"></a>
-<span class="sourceLineNo">434</span> try {<a name="line.434"></a>
-<span class="sourceLineNo">435</span> OutputStream outstream = sock.getOutputStream();<a name="line.435"></a>
-<span class="sourceLineNo">436</span> outstream.write("stat".getBytes());<a name="line.436"></a>
-<span class="sourceLineNo">437</span> outstream.flush();<a name="line.437"></a>
-<span class="sourceLineNo">438</span><a name="line.438"></a>
-<span class="sourceLineNo">439</span> Reader isr = new InputStreamReader(sock.getInputStream());<a name="line.439"></a>
-<span class="sourceLineNo">440</span> reader = new BufferedReader(isr);<a name="line.440"></a>
-<span class="sourceLineNo">441</span> String line = reader.readLine();<a name="line.441"></a>
-<span class="sourceLineNo">442</span> if (line != null && line.startsWith("Zookeeper version:")) {<a name="line.442"></a>
-<span class="sourceLineNo">443</span> return true;<a name="line.443"></a>
-<span class="sourceLineNo">444</span> }<a name="line.444"></a>
-<span class="sourceLineNo">445</span> } finally {<a name="line.445"></a>
-<span class="sourceLineNo">446</span> sock.close();<a name="line.446"></a>
-<span class="sourceLineNo">447</span> if (reader != null) {<a name="line.447"></a>
-<span class="sourceLineNo">448</span> reader.close();<a name="line.448"></a>
-<span class="sourceLineNo">449</span> }<a name="line.449"></a>
-<span class="sourceLineNo">450</span> }<a name="line.450"></a>
-<span class="sourceLineNo">451</span> } catch (IOException e) {<a name="line.451"></a>
-<span class="sourceLineNo">452</span> // ignore as this is expected<a name="line.452"></a>
-<span class="sourceLineNo">453</span> LOG.info("server localhost:" + port + " not up " + e);<a name="line.453"></a>
-<span class="sourceLineNo">454</span> }<a name="line.454"></a>
-<span class="sourceLineNo">455</span><a name="line.455"></a>
-<span class="sourceLineNo">456</span> if (System.currentTimeMillis() > start + timeout) {<a name="line.456"></a>
-<span class="sourceLineNo">457</span> break;<a name="line.457"></a>
-<span class="sourceLineNo">458</span> }<a name="line.458"></a>
-<span class="sourceLineNo">459</span> try {<a name="line.459"></a>
-<span class="sourceLineNo">460</span> Thread.sleep(250);<a name="line.460"></a>
-<span class="sourceLineNo">461</span> } catch (InterruptedException e) {<a name="line.461"></a>
-<span class="sourceLineNo">462</span> throw (InterruptedIOException)new InterruptedIOException().initCause(e);<a name="line.462"></a>
-<span class="sourceLineNo">463</span> }<a name="line.463"></a>
-<span class="sourceLineNo">464</span> }<a name="line.464"></a>
-<span class="sourceLineNo">465</span> return false;<a name="line.465"></a>
-<span class="sourceLineNo">466</span> }<a name="line.466"></a>
-<span class="sourceLineNo">467</span><a name="line.467"></a>
-<span class="sourceLineNo">468</span> public int getClientPort() {<a name="line.468"></a>
-<span class="sourceLineNo">469</span> return activeZKServerIndex < 0 || activeZKServerIndex >= clientPortList.size() ? -1<a name="line.469"></a>
-<span class="sourceLineNo">470</span> : clientPortList.get(activeZKServerIndex);<a name="line.470"></a>
-<span class="sourceLineNo">471</span> }<a name="line.471"></a>
-<span class="sourceLineNo">472</span><a name="line.472"></a>
-<span class="sourceLineNo">473</span> List<ZooKeeperServer> getZooKeeperServers() {<a name="line.473"></a>
-<span class="sourceLineNo">474</span> return zooKeeperServers;<a name="line.474"></a>
-<span class="sourceLineNo">475</span> }<a name="line.475"></a>
-<span class="sourceLineNo">476</span>}<a name="line.476"></a>
+<span class="sourceLineNo">273</span> standaloneServerFactoryList.add(standaloneServerFactory);<a name="line.273"></a>
+<span class="sourceLineNo">274</span> zooKeeperServers.add(server);<a name="line.274"></a>
+<span class="sourceLineNo">275</span> }<a name="line.275"></a>
+<span class="sourceLineNo">276</span><a name="line.276"></a>
+<span class="sourceLineNo">277</span> // set the first one to be active ZK; Others are backups<a name="line.277"></a>
+<span class="sourceLineNo">278</span> activeZKServerIndex = 0;<a name="line.278"></a>
+<span class="sourceLineNo">279</span> started = true;<a name="line.279"></a>
+<span class="sourceLineNo">280</span> int clientPort = clientPortList.get(activeZKServerIndex);<a name="line.280"></a>
+<span class="sourceLineNo">281</span> LOG.info("Started MiniZooKeeperCluster and ran successful 'stat' " +<a name="line.281"></a>
+<span class="sourceLineNo">282</span> "on client port=" + clientPort);<a name="line.282"></a>
+<span class="sourceLineNo">283</span> return clientPort;<a name="line.283"></a>
+<span class="sourceLineNo">284</span> }<a name="line.284"></a>
+<span class="sourceLineNo">285</span><a name="line.285"></a>
+<span class="sourceLineNo">286</span> private void createDir(File dir) throws IOException {<a name="line.286"></a>
+<span class="sourceLineNo">287</span> try {<a name="line.287"></a>
+<span class="sourceLineNo">288</span> if (!dir.exists()) {<a name="line.288"></a>
+<span class="sourceLineNo">289</span> dir.mkdirs();<a name="line.289"></a>
+<span class="sourceLineNo">290</span> }<a name="line.290"></a>
+<span class="sourceLineNo">291</span> } catch (SecurityException e) {<a name="line.291"></a>
+<span class="sourceLineNo">292</span> throw new IOException("creating dir: " + dir, e);<a name="line.292"></a>
+<span class="sourceLineNo">293</span> }<a name="line.293"></a>
+<span class="sourceLineNo">294</span> }<a name="line.294"></a>
+<span class="sourceLineNo">295</span><a name="line.295"></a>
+<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
+<span class="sourceLineNo">297</span> * @throws IOException if waiting for the shutdown of a server fails<a name="line.297"></a>
+<span class="sourceLineNo">298</span> */<a name="line.298"></a>
+<span class="sourceLineNo">299</span> public void shutdown() throws IOException {<a name="line.299"></a>
+<span class="sourceLineNo">300</span> // shut down all the zk servers<a name="line.300"></a>
+<span class="sourceLineNo">301</span> for (int i = 0; i < standaloneServerFactoryList.size(); i++) {<a name="line.301"></a>
+<span class="sourceLineNo">302</span> NIOServerCnxnFactory standaloneServerFactory =<a name="line.302"></a>
+<span class="sourceLineNo">303</span> standaloneServerFactoryList.get(i);<a name="line.303"></a>
+<span class="sourceLineNo">304</span> int clientPort = clientPortList.get(i);<a name="line.304"></a>
+<span class="sourceLineNo">305</span><a name="line.305"></a>
+<span class="sourceLineNo">306</span> standaloneServerFactory.shutdown();<a name="line.306"></a>
+<span class="sourceLineNo">307</span> if (!waitForServerDown(clientPort, connectionTimeout)) {<a name="line.307"></a>
+<span class="sourceLineNo">308</span> throw new IOException("Waiting for shutdown of standalone server");<a name="line.308"></a>
+<span class="sourceLineNo">309</span> }<a name="line.309"></a>
+<span class="sourceLineNo">310</span> }<a name="line.310"></a>
+<span class="sourceLineNo">311</span> standaloneServerFactoryList.clear();<a name="line.311"></a>
+<span class="sourceLineNo">312</span><a name="line.312"></a>
+<span class="sourceLineNo">313</span> for (ZooKeeperServer zkServer: zooKeeperServers) {<a name="line.313"></a>
+<span class="sourceLineNo">314</span> //explicitly close ZKDatabase since ZookeeperServer does not close them<a name="line.314"></a>
+<span class="sourceLineNo">315</span> zkServer.getZKDatabase().close();<a name="line.315"></a>
+<span class="sourceLineNo">316</span> }<a name="line.316"></a>
+<span class="sourceLineNo">317</span> zooKeeperServers.clear();<a name="line.317"></a>
+<span class="sourceLineNo">318</span><a name="line.318"></a>
+<span class="sourceLineNo">319</span> // clear everything<a name="line.319"></a>
+<span class="sourceLineNo">320</span> if (started) {<a name="line.320"></a>
+<span class="sourceLineNo">321</span> started = false;<a name="line.321"></a>
+<span class="sourceLineNo">322</span> activeZKServerIndex = 0;<a name="line.322"></a>
+<span class="sourceLineNo">323</span> clientPortList.clear();<a name="line.323"></a>
+<span class="sourceLineNo">324</span> LOG.info("Shutdown MiniZK cluster with all ZK servers");<a name="line.324"></a>
+<span class="sourceLineNo">325</span> }<a name="line.325"></a>
+<span class="sourceLineNo">326</span> }<a name="line.326"></a>
+<span class="sourceLineNo">327</span><a name="line.327"></a>
+<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
+<span class="sourceLineNo">329</span> * @return clientPort return clientPort if there is another ZK backup can run<a name="line.329"></a>
+<span class="sourceLineNo">330</span> * when killing the current active; return -1, if there is no backups.<a name="line.330"></a>
+<span class="sourceLineNo">331</span> * @throws IOException if waiting for the shutdown of a server fails<a name="line.331"></a>
+<span class="sourceLineNo">332</span> */<a name="line.332"></a>
+<span class="sourceLineNo">333</span> public int killCurrentActiveZooKeeperServer() throws IOException, InterruptedException {<a name="line.333"></a>
+<span class="sourceLineNo">334</span> if (!started || activeZKServerIndex < 0) {<a name="line.334"></a>
+<span class="sourceLineNo">335</span> return -1;<a name="line.335"></a>
+<span class="sourceLineNo">336</span> }<a name="line.336"></a>
+<span class="sourceLineNo">337</span><a name="line.337"></a>
+<span class="sourceLineNo">338</span> // Shutdown the current active one<a name="line.338"></a>
+<span class="sourceLineNo">339</span> NIOServerCnxnFactory standaloneServerFactory =<a name="line.339"></a>
+<span class="sourceLineNo">340</span> standaloneServerFactoryList.get(activeZKServerIndex);<a name="line.340"></a>
+<span class="sourceLineNo">341</span> int clientPort = clientPortList.get(activeZKServerIndex);<a name="line.341"></a>
+<span class="sourceLineNo">342</span><a name="line.342"></a>
+<span class="sourceLineNo">343</span> standaloneServerFactory.shutdown();<a name="line.343"></a>
+<span class="sourceLineNo">344</span> if (!waitForServerDown(clientPort, connectionTimeout)) {<a name="line.344"></a>
+<span class="sourceLineNo">345</span> throw new IOException("Waiting for shutdown of standalone server");<a name="line.345"></a>
+<span class="sourceLineNo">346</span> }<a name="line.346"></a>
+<span class="sourceLineNo">347</span><a name="line.347"></a>
+<span class="sourceLineNo">348</span> zooKeeperServers.get(activeZKServerIndex).getZKDatabase().close();<a name="line.348"></a>
+<span class="sourceLineNo">349</span><a name="line.349"></a>
+<span class="sourceLineNo">350</span> // remove the current active zk server<a name="line.350"></a>
+<span class="sourceLineNo">351</span> standaloneServerFactoryList.remove(activeZKServerIndex);<a name="line.351"></a>
+<span class="sourceLineNo">352</span> clientPortList.remove(activeZKServerIndex);<a name="line.352"></a>
+<span class="sourceLineNo">353</span> zooKeeperServers.remove(activeZKServerIndex);<a name="line.353"></a>
+<span class="sourceLineNo">354</span> LOG.info("Kill the current active ZK servers in the cluster " +<a name="line.354"></a>
+<span class="sourceLineNo">355</span> "on client port: " + clientPort);<a name="line.355"></a>
+<span class="sourceLineNo">356</span><a name="line.356"></a>
+<span class="sourceLineNo">357</span> if (standaloneServerFactoryList.isEmpty()) {<a name="line.357"></a>
+<span class="sourceLineNo">358</span> // there is no backup servers;<a name="line.358"></a>
+<span class="sourceLineNo">359</span> return -1;<a name="line.359"></a>
+<span class="sourceLineNo">360</span> }<a name="line.360"></a>
+<span class="sourceLineNo">361</span> clientPort = clientPortList.get(activeZKServerIndex);<a name="line.361"></a>
+<span class="sourceLineNo">362</span> LOG.info("Activate a backup zk server in the cluster " +<a name="line.362"></a>
+<span class="sourceLineNo">363</span> "on client port: " + clientPort);<a name="line.363"></a>
+<span class="sourceLineNo">364</span> // return the next back zk server's port<a name="line.364"></a>
+<span class="sourceLineNo">365</span> return clientPort;<a name="line.365"></a>
+<span class="sourceLineNo">366</span> }<a name="line.366"></a>
+<span class="sourceLineNo">367</span><a name="line.367"></a>
+<span class="sourceLineNo">368</span> /**<a name="line.368"></a>
+<span class="sourceLineNo">369</span> * Kill one back up ZK servers.<a name="line.369"></a>
+<span class="sourceLineNo">370</span> *<a name="line.370"></a>
+<span class="sourceLineNo">371</span> * @throws IOException if waiting for the shutdown of a server fails<a name="line.371"></a>
+<span class="sourceLineNo">372</span> */<a name="line.372"></a>
+<span class="sourceLineNo">373</span> public void killOneBackupZooKeeperServer() throws IOException, InterruptedException {<a name="line.373"></a>
+<span class="sourceLineNo">374</span> if (!started || activeZKServerIndex < 0 || standaloneServerFactoryList.size() <= 1) {<a name="line.374"></a>
+<span class="sourceLineNo">375</span> return ;<a name="line.375"></a>
+<span class="sourceLineNo">376</span> }<a name="line.376"></a>
+<span class="sourceLineNo">377</span><a name="line.377"></a>
+<span class="sourceLineNo">378</span> int backupZKServerIndex = activeZKServerIndex+1;<a name="line.378"></a>
+<span class="sourceLineNo">379</span> // Shutdown the current active one<a name="line.379"></a>
+<span class="sourceLineNo">380</span> NIOServerCnxnFactory standaloneServerFactory =<a name="line.380"></a>
+<span class="sourceLineNo">381</span> standaloneServerFactoryList.get(backupZKServerIndex);<a name="line.381"></a>
+<span class="sourceLineNo">382</span> int clientPort = clientPortList.get(backupZKServerIndex);<a name="line.382"></a>
+<span class="sourceLineNo">383</span><a name="line.383"></a>
+<span class="sourceLineNo">384</span> standaloneServerFactory.shutdown();<a name="line.384"></a>
+<span class="sourceLineNo">385</span> if (!waitForServerDown(clientPort, connectionTimeout)) {<a name="line.385"></a>
+<span class="sourceLineNo">386</span> throw new IOException("Waiting for shutdown of standalone server");<a name="line.386"></a>
+<span class="sourceLineNo">387</span> }<a name="line.387"></a>
+<span class="sourceLineNo">388</span><a name="line.388"></a>
+<span class="sourceLineNo">389</span> zooKeeperServers.get(backupZKServerIndex).getZKDatabase().close();<a name="line.389"></a>
+<span class="sourceLineNo">390</span><a name="line.390"></a>
+<span class="sourceLineNo">391</span> // remove this backup zk server<a name="line.391"></a>
+<span class="sourceLineNo">392</span> standaloneServerFactoryList.remove(backupZKServerIndex);<a name="line.392"></a>
+<span class="sourceLineNo">393</span> clientPortList.remove(backupZKServerIndex);<a name="line.393"></a>
+<span class="sourceLineNo">394</span> zooKeeperServers.remove(backupZKServerIndex);<a name="line.394"></a>
+<span class="sourceLineNo">395</span> LOG.info("Kill one backup ZK servers in the cluster " +<a name="line.395"></a>
+<span class="sourceLineNo">396</span> "on client port: " + clientPort);<a name="line.396"></a>
+<span class="sourceLineNo">397</span> }<a name="line.397"></a>
+<span class="sourceLineNo">398</span><a name="line.398"></a>
+<span class="sourceLineNo">399</span> // XXX: From o.a.zk.t.ClientBase<a name="line.399"></a>
+<span class="sourceLineNo">400</span> private static boolean waitForServerDown(int port, long timeout) throws IOException {<a name="line.400"></a>
+<span class="sourceLineNo">401</span> long start = System.currentTimeMillis();<a name="line.401"></a>
+<span class="sourceLineNo">402</span> while (true) {<a name="line.402"></a>
+<span class="sourceLineNo">403</span> try {<a name="line.403"></a>
+<span class="sourceLineNo">404</span> Socket sock = new Socket("localhost", port);<a name="line.404"></a>
+<span class="sourceLineNo">405</span> try {<a name="line.405"></a>
+<span class="sourceLineNo">406</span> OutputStream outstream = sock.getOutputStream();<a name="line.406"></a>
+<span class="sourceLineNo">407</span> outstream.write("stat".getBytes());<a name="line.407"></a>
+<span class="sourceLineNo">408</span> outstream.flush();<a name="line.408"></a>
+<span class="sourceLineNo">409</span> } finally {<a name="line.409"></a>
+<span class="sourceLineNo">410</span> sock.close();<a name="line.410"></a>
+<span class="sourceLineNo">411</span> }<a name="line.411"></a>
+<span class="sourceLineNo">412</span> } catch (IOException e) {<a name="line.412"></a>
+<span class="sourceLineNo">413</span> return true;<a name="line.413"></a>
+<span class="sourceLineNo">414</span> }<a name="line.414"></a>
+<span class="sourceLineNo">415</span><a name="line.415"></a>
+<span class="sourceLineNo">416</span> if (System.currentTimeMillis() > start + timeout) {<a name="line.416"></a>
+<span class="sourceLineNo">417</span> break;<a name="line.417"></a>
+<span class="sourceLineNo">418</span> }<a name="line.418"></a>
+<span class="sourceLineNo">419</span> try {<a name="line.419"></a>
+<span class="sourceLineNo">420</span> Thread.sleep(250);<a name="line.420"></a>
+<span class="sourceLineNo">421</span> } catch (InterruptedException e) {<a name="line.421"></a>
+<span class="sourceLineNo">422</span> throw (InterruptedIOException)new InterruptedIOException().initCause(e);<a name="line.422"></a>
+<span class="sourceLineNo">423</span> }<a name="line.423"></a>
+<span class="sourceLineNo">424</span> }<a name="line.424"></a>
+<span class="sourceLineNo">425</span> return false;<a name="line.425"></a>
+<span class="sourceLineNo">426</span> }<a name="line.426"></a>
+<span class="sourceLineNo">427</span><a name="line.427"></a>
+<span class="sourceLineNo">428</span> // XXX: From o.a.zk.t.ClientBase<a name="line.428"></a>
+<span class="sourceLineNo">429</span> private static boolean waitForServerUp(int port, long timeout) throws IOException {<a name="line.429"></a>
+<span class="sourceLineNo">430</span> long start = System.currentTimeMillis();<a name="line.430"></a>
+<span class="sourceLineNo">431</span> while (true) {<a name="line.431"></a>
+<span class="sourceLineNo">432</span> try {<a name="line.432"></a>
+<span class="sourceLineNo">433</span> Socket sock = new Socket("localhost", port);<a name="line.433"></a>
+<span class="sourceLineNo">434</span> BufferedReader reader = null;<a name="line.434"></a>
+<span class="sourceLineNo">435</span> try {<a name="line.435"></a>
+<span class="sourceLineNo">436</span> OutputStream outstream = sock.getOutputStream();<a name="line.436"></a>
+<span class="sourceLineNo">437</span> outstream.write("stat".getBytes());<a name="line.437"></a>
+<span class="sourceLineNo">438</span> outstream.flush();<a name="line.438"></a>
+<span class="sourceLineNo">439</span><a name="line.439"></a>
+<span class="sourceLineNo">440</span> Reader isr = new InputStreamReader(sock.getInputStream());<a name="line.440"></a>
+<span class="sourceLineNo">441</span> reader = new BufferedReader(isr);<a name="line.441"></a>
+<span class="sourceLineNo">442</span> String line = reader.readLine();<a name="line.442"></a>
+<span class="sourceLineNo">443</span> if (line != null && line.startsWith("Zookeeper version:")) {<a name="line.443"></a>
+<span class="sourceLineNo">444</span> return true;<a name="line.444"></a>
+<span class="sourceLineNo">445</span> }<a name="line.445"></a>
+<span class="sourceLineNo">446</span> } finally {<a name="line.446"></a>
+<span class="sourceLineNo">447</span> sock.close();<a name="line.447"></a>
+<span class="sourceLineNo">448</span> if (reader != null) {<a name="line.448"></a>
+<span class="sourceLineNo">449</span> reader.close();<a name="line.449"></a>
+<span class="sourceLineNo">450</span> }<a name="line.450"></a>
+<span class="sourceLineNo">451</span> }<a name="line.451"></a>
+<span class="sourceLineNo">452</span> } catch (IOException e) {<a name="line.452"></a>
+<span class="sourceLineNo">453</span> // ignore as this is expected<a name="line.453"></a>
+<span class="sourceLineNo">454</span> LOG.info("server localhost:" + port + " not up " + e);<a name="line.454"></a>
+<span class="sourceLineNo">455</span> }<a name="line.455"></a>
+<span class="sourceLineNo">456</span><a name="line.456"></a>
+<span class="sourceLineNo">457</span> if (System.currentTimeMillis() > start + timeout) {<a name="line.457"></a>
+<span class="sourceLineNo">458</span> break;<a name="line.458"></a>
+<span class="sourceLineNo">459</span> }<a name="line.459"></a>
+<span class="sourceLineNo">460</span> try {<a name="line.460"></a>
+<span class="sourceLineNo">461</span> Thread.sleep(250);<a name="line.461"></a>
+<span class="sourceLineNo">462</span> } catch (InterruptedException e) {<a name="line.462"></a>
+<span class="sourceLineNo">463</span> throw (InterruptedIOException)new InterruptedIOException().initCause(e);<a name="line.463"></a>
+<span class="sourceLineNo">464</span> }<a name="line.464"></a>
+<span class="sourceLineNo">465</span> }<a name="line.465"></a>
+<span class="sourceLineNo">466</span> return false;<a name="line.466"></a>
+<span class="sourceLineNo">467</span> }<a name="line.467"></a>
+<span class="sourceLineNo">468</span><a name="line.468"></a>
+<span class="sourceLineNo">469</span> public int getClientPort() {<a name="line.469"></a>
+<span class="sourceLineNo">470</span> return activeZKServerIndex < 0 || activeZKServerIndex >= clientPortList.size() ? -1<a name="line.470"></a>
+<span class="sourceLineNo">471</span> : clientPortList.get(activeZKServerIndex);<a name="line.471"></a>
+<span class="sourceLineNo">472</span> }<a name="line.472"></a>
+<span class="sourceLineNo">473</span><a name="line.473"></a>
+<span class="sourceLineNo">474</span> List<ZooKeeperServer> getZooKeeperServers() {<a name="line.474"></a>
+<span class="sourceLineNo">475</span> return zooKeeperServers;<a name="line.475"></a>
+<span class="sourceLineNo">476</span> }<a name="line.476"></a>
+<span class="sourceLineNo">477</span>}<a name="line.477"></a>
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/48bd3915/book.html
----------------------------------------------------------------------
diff --git a/book.html b/book.html
index c624cdf..bcfa034 100644
--- a/book.html
+++ b/book.html
@@ -37002,7 +37002,7 @@ The server will return cellblocks compressed using this same compressor as long
<div id="footer">
<div id="footer-text">
Version 3.0.0-SNAPSHOT<br>
-Last updated 2017-12-16 14:29:41 UTC
+Last updated 2017-12-17 14:29:54 UTC
</div>
</div>
</body>
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/48bd3915/bulk-loads.html
----------------------------------------------------------------------
diff --git a/bulk-loads.html b/bulk-loads.html
index 075a9c0..cf60ac4 100644
--- a/bulk-loads.html
+++ b/bulk-loads.html
@@ -7,7 +7,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="Date-Revision-yyyymmdd" content="20171216" />
+ <meta name="Date-Revision-yyyymmdd" content="20171217" />
<meta http-equiv="Content-Language" content="en" />
<title>Apache HBase –
Bulk Loads in Apache HBase (TM)
@@ -311,7 +311,7 @@ under the License. -->
<a href="https://www.apache.org/">The Apache Software Foundation</a>.
All rights reserved.
- <li id="publishDate" class="pull-right">Last Published: 2017-12-16</li>
+ <li id="publishDate" class="pull-right">Last Published: 2017-12-17</li>
</p>
</div>