hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [16/51] [partial] hbase-site git commit: Published site at .
Date Thu, 23 Nov 2017 15:24:41 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/devapidocs/src-html/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.html
index c2635a2..6931991 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.html
@@ -376,182 +376,183 @@
 <span class="sourceLineNo">368</span>    existingConfig.setTableCFsMap(newConfig.getTableCFsMap());<a name="line.368"></a>
 <span class="sourceLineNo">369</span>    existingConfig.setNamespaces(newConfig.getNamespaces());<a name="line.369"></a>
 <span class="sourceLineNo">370</span>    existingConfig.setBandwidth(newConfig.getBandwidth());<a name="line.370"></a>
-<span class="sourceLineNo">371</span><a name="line.371"></a>
-<span class="sourceLineNo">372</span>    try {<a name="line.372"></a>
-<span class="sourceLineNo">373</span>      ZKUtil.setData(this.zookeeper, getPeerNode(id),<a name="line.373"></a>
-<span class="sourceLineNo">374</span>          ReplicationPeerConfigUtil.toByteArray(existingConfig));<a name="line.374"></a>
-<span class="sourceLineNo">375</span>    }<a name="line.375"></a>
-<span class="sourceLineNo">376</span>    catch(KeeperException ke){<a name="line.376"></a>
-<span class="sourceLineNo">377</span>      throw new ReplicationException("There was a problem trying to save changes to the " +<a name="line.377"></a>
-<span class="sourceLineNo">378</span>          "replication peer " + id, ke);<a name="line.378"></a>
-<span class="sourceLineNo">379</span>    }<a name="line.379"></a>
-<span class="sourceLineNo">380</span>  }<a name="line.380"></a>
-<span class="sourceLineNo">381</span><a name="line.381"></a>
-<span class="sourceLineNo">382</span>  /**<a name="line.382"></a>
-<span class="sourceLineNo">383</span>   * List all registered peer clusters and set a watch on their znodes.<a name="line.383"></a>
-<span class="sourceLineNo">384</span>   */<a name="line.384"></a>
-<span class="sourceLineNo">385</span>  @Override<a name="line.385"></a>
-<span class="sourceLineNo">386</span>  public List&lt;String&gt; getAllPeerIds() {<a name="line.386"></a>
-<span class="sourceLineNo">387</span>    List&lt;String&gt; ids = null;<a name="line.387"></a>
-<span class="sourceLineNo">388</span>    try {<a name="line.388"></a>
-<span class="sourceLineNo">389</span>      ids = ZKUtil.listChildrenAndWatchThem(this.zookeeper, this.peersZNode);<a name="line.389"></a>
-<span class="sourceLineNo">390</span>    } catch (KeeperException e) {<a name="line.390"></a>
-<span class="sourceLineNo">391</span>      this.abortable.abort("Cannot get the list of peers ", e);<a name="line.391"></a>
-<span class="sourceLineNo">392</span>    }<a name="line.392"></a>
-<span class="sourceLineNo">393</span>    return ids;<a name="line.393"></a>
-<span class="sourceLineNo">394</span>  }<a name="line.394"></a>
-<span class="sourceLineNo">395</span><a name="line.395"></a>
-<span class="sourceLineNo">396</span>  /**<a name="line.396"></a>
-<span class="sourceLineNo">397</span>   * A private method used during initialization. This method attempts to add all registered<a name="line.397"></a>
-<span class="sourceLineNo">398</span>   * peer clusters. This method does not set a watch on the peer cluster znodes.<a name="line.398"></a>
-<span class="sourceLineNo">399</span>   */<a name="line.399"></a>
-<span class="sourceLineNo">400</span>  private void addExistingPeers() throws ReplicationException {<a name="line.400"></a>
-<span class="sourceLineNo">401</span>    List&lt;String&gt; znodes = null;<a name="line.401"></a>
-<span class="sourceLineNo">402</span>    try {<a name="line.402"></a>
-<span class="sourceLineNo">403</span>      znodes = ZKUtil.listChildrenNoWatch(this.zookeeper, this.peersZNode);<a name="line.403"></a>
-<span class="sourceLineNo">404</span>    } catch (KeeperException e) {<a name="line.404"></a>
-<span class="sourceLineNo">405</span>      throw new ReplicationException("Error getting the list of peer clusters.", e);<a name="line.405"></a>
-<span class="sourceLineNo">406</span>    }<a name="line.406"></a>
-<span class="sourceLineNo">407</span>    if (znodes != null) {<a name="line.407"></a>
-<span class="sourceLineNo">408</span>      for (String z : znodes) {<a name="line.408"></a>
-<span class="sourceLineNo">409</span>        createAndAddPeer(z);<a name="line.409"></a>
-<span class="sourceLineNo">410</span>      }<a name="line.410"></a>
-<span class="sourceLineNo">411</span>    }<a name="line.411"></a>
-<span class="sourceLineNo">412</span>  }<a name="line.412"></a>
-<span class="sourceLineNo">413</span><a name="line.413"></a>
-<span class="sourceLineNo">414</span>  @Override<a name="line.414"></a>
-<span class="sourceLineNo">415</span>  public boolean peerConnected(String peerId) throws ReplicationException {<a name="line.415"></a>
-<span class="sourceLineNo">416</span>    return createAndAddPeer(peerId);<a name="line.416"></a>
-<span class="sourceLineNo">417</span>  }<a name="line.417"></a>
-<span class="sourceLineNo">418</span><a name="line.418"></a>
-<span class="sourceLineNo">419</span>  @Override<a name="line.419"></a>
-<span class="sourceLineNo">420</span>  public void peerDisconnected(String peerId) {<a name="line.420"></a>
-<span class="sourceLineNo">421</span>    ReplicationPeer rp = this.peerClusters.get(peerId);<a name="line.421"></a>
-<span class="sourceLineNo">422</span>    if (rp != null) {<a name="line.422"></a>
-<span class="sourceLineNo">423</span>      ((ConcurrentMap&lt;String, ReplicationPeerZKImpl&gt;) peerClusters).remove(peerId, rp);<a name="line.423"></a>
-<span class="sourceLineNo">424</span>    }<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>  /**<a name="line.427"></a>
-<span class="sourceLineNo">428</span>   * Attempt to connect to a new remote slave cluster.<a name="line.428"></a>
-<span class="sourceLineNo">429</span>   * @param peerId a short that identifies the cluster<a name="line.429"></a>
-<span class="sourceLineNo">430</span>   * @return true if a new connection was made, false if no new connection was made.<a name="line.430"></a>
-<span class="sourceLineNo">431</span>   */<a name="line.431"></a>
-<span class="sourceLineNo">432</span>  public boolean createAndAddPeer(String peerId) throws ReplicationException {<a name="line.432"></a>
-<span class="sourceLineNo">433</span>    if (peerClusters == null) {<a name="line.433"></a>
-<span class="sourceLineNo">434</span>      return false;<a name="line.434"></a>
-<span class="sourceLineNo">435</span>    }<a name="line.435"></a>
-<span class="sourceLineNo">436</span>    if (this.peerClusters.containsKey(peerId)) {<a name="line.436"></a>
-<span class="sourceLineNo">437</span>      return false;<a name="line.437"></a>
-<span class="sourceLineNo">438</span>    }<a name="line.438"></a>
-<span class="sourceLineNo">439</span><a name="line.439"></a>
-<span class="sourceLineNo">440</span>    ReplicationPeerZKImpl peer = null;<a name="line.440"></a>
-<span class="sourceLineNo">441</span>    try {<a name="line.441"></a>
-<span class="sourceLineNo">442</span>      peer = createPeer(peerId);<a name="line.442"></a>
-<span class="sourceLineNo">443</span>    } catch (Exception e) {<a name="line.443"></a>
-<span class="sourceLineNo">444</span>      throw new ReplicationException("Error adding peer with id=" + peerId, e);<a name="line.444"></a>
-<span class="sourceLineNo">445</span>    }<a name="line.445"></a>
-<span class="sourceLineNo">446</span>    if (peer == null) {<a name="line.446"></a>
-<span class="sourceLineNo">447</span>      return false;<a name="line.447"></a>
-<span class="sourceLineNo">448</span>    }<a name="line.448"></a>
-<span class="sourceLineNo">449</span>    ReplicationPeerZKImpl previous =<a name="line.449"></a>
-<span class="sourceLineNo">450</span>      ((ConcurrentMap&lt;String, ReplicationPeerZKImpl&gt;) peerClusters).putIfAbsent(peerId, peer);<a name="line.450"></a>
-<span class="sourceLineNo">451</span>    if (previous == null) {<a name="line.451"></a>
-<span class="sourceLineNo">452</span>      LOG.info("Added new peer cluster=" + peer.getPeerConfig().getClusterKey());<a name="line.452"></a>
-<span class="sourceLineNo">453</span>    } else {<a name="line.453"></a>
-<span class="sourceLineNo">454</span>      LOG.info("Peer already present, " + previous.getPeerConfig().getClusterKey() +<a name="line.454"></a>
-<span class="sourceLineNo">455</span>        ", new cluster=" + peer.getPeerConfig().getClusterKey());<a name="line.455"></a>
-<span class="sourceLineNo">456</span>    }<a name="line.456"></a>
-<span class="sourceLineNo">457</span>    return true;<a name="line.457"></a>
-<span class="sourceLineNo">458</span>  }<a name="line.458"></a>
-<span class="sourceLineNo">459</span><a name="line.459"></a>
-<span class="sourceLineNo">460</span>  /**<a name="line.460"></a>
-<span class="sourceLineNo">461</span>   * Update the state znode of a peer cluster.<a name="line.461"></a>
-<span class="sourceLineNo">462</span>   * @param id<a name="line.462"></a>
-<span class="sourceLineNo">463</span>   * @param state<a name="line.463"></a>
-<span class="sourceLineNo">464</span>   */<a name="line.464"></a>
-<span class="sourceLineNo">465</span>  private void changePeerState(String id, ReplicationProtos.ReplicationState.State state)<a name="line.465"></a>
-<span class="sourceLineNo">466</span>      throws ReplicationException {<a name="line.466"></a>
-<span class="sourceLineNo">467</span>    try {<a name="line.467"></a>
-<span class="sourceLineNo">468</span>      if (!peerExists(id)) {<a name="line.468"></a>
-<span class="sourceLineNo">469</span>        throw new IllegalArgumentException("Cannot enable/disable peer because id=" + id<a name="line.469"></a>
-<span class="sourceLineNo">470</span>            + " does not exist.");<a name="line.470"></a>
-<span class="sourceLineNo">471</span>      }<a name="line.471"></a>
-<span class="sourceLineNo">472</span>      String peerStateZNode = getPeerStateNode(id);<a name="line.472"></a>
-<span class="sourceLineNo">473</span>      byte[] stateBytes =<a name="line.473"></a>
-<span class="sourceLineNo">474</span>          (state == ReplicationProtos.ReplicationState.State.ENABLED) ? ENABLED_ZNODE_BYTES<a name="line.474"></a>
-<span class="sourceLineNo">475</span>              : DISABLED_ZNODE_BYTES;<a name="line.475"></a>
-<span class="sourceLineNo">476</span>      if (ZKUtil.checkExists(this.zookeeper, peerStateZNode) != -1) {<a name="line.476"></a>
-<span class="sourceLineNo">477</span>        ZKUtil.setData(this.zookeeper, peerStateZNode, stateBytes);<a name="line.477"></a>
-<span class="sourceLineNo">478</span>      } else {<a name="line.478"></a>
-<span class="sourceLineNo">479</span>        ZKUtil.createAndWatch(this.zookeeper, peerStateZNode, stateBytes);<a name="line.479"></a>
-<span class="sourceLineNo">480</span>      }<a name="line.480"></a>
-<span class="sourceLineNo">481</span>      LOG.info("Peer with id= " + id + " is now " + state.name());<a name="line.481"></a>
-<span class="sourceLineNo">482</span>    } catch (KeeperException e) {<a name="line.482"></a>
-<span class="sourceLineNo">483</span>      throw new ReplicationException("Unable to change state of the peer with id=" + id, e);<a name="line.483"></a>
-<span class="sourceLineNo">484</span>    }<a name="line.484"></a>
-<span class="sourceLineNo">485</span>  }<a name="line.485"></a>
-<span class="sourceLineNo">486</span><a name="line.486"></a>
-<span class="sourceLineNo">487</span>  /**<a name="line.487"></a>
-<span class="sourceLineNo">488</span>   * Helper method to connect to a peer<a name="line.488"></a>
-<span class="sourceLineNo">489</span>   * @param peerId peer's identifier<a name="line.489"></a>
-<span class="sourceLineNo">490</span>   * @return object representing the peer<a name="line.490"></a>
-<span class="sourceLineNo">491</span>   * @throws ReplicationException<a name="line.491"></a>
-<span class="sourceLineNo">492</span>   */<a name="line.492"></a>
-<span class="sourceLineNo">493</span>  private ReplicationPeerZKImpl createPeer(String peerId) throws ReplicationException {<a name="line.493"></a>
-<span class="sourceLineNo">494</span>    Pair&lt;ReplicationPeerConfig, Configuration&gt; pair = getPeerConf(peerId);<a name="line.494"></a>
-<span class="sourceLineNo">495</span>    if (pair == null) {<a name="line.495"></a>
-<span class="sourceLineNo">496</span>      return null;<a name="line.496"></a>
-<span class="sourceLineNo">497</span>    }<a name="line.497"></a>
-<span class="sourceLineNo">498</span>    Configuration peerConf = pair.getSecond();<a name="line.498"></a>
-<span class="sourceLineNo">499</span><a name="line.499"></a>
-<span class="sourceLineNo">500</span>    ReplicationPeerZKImpl peer = new ReplicationPeerZKImpl(zookeeper,<a name="line.500"></a>
-<span class="sourceLineNo">501</span>        peerConf, peerId, pair.getFirst(), abortable);<a name="line.501"></a>
-<span class="sourceLineNo">502</span>    try {<a name="line.502"></a>
-<span class="sourceLineNo">503</span>      peer.startStateTracker(this.getPeerStateNode(peerId));<a name="line.503"></a>
-<span class="sourceLineNo">504</span>    } catch (KeeperException e) {<a name="line.504"></a>
-<span class="sourceLineNo">505</span>      throw new ReplicationException("Error starting the peer state tracker for peerId=" +<a name="line.505"></a>
-<span class="sourceLineNo">506</span>          peerId, e);<a name="line.506"></a>
-<span class="sourceLineNo">507</span>    }<a name="line.507"></a>
-<span class="sourceLineNo">508</span><a name="line.508"></a>
-<span class="sourceLineNo">509</span>    try {<a name="line.509"></a>
-<span class="sourceLineNo">510</span>      peer.startPeerConfigTracker(this.getPeerNode(peerId));<a name="line.510"></a>
-<span class="sourceLineNo">511</span>    } catch (KeeperException e) {<a name="line.511"></a>
-<span class="sourceLineNo">512</span>      throw new ReplicationException("Error starting the peer tableCFs tracker for peerId=" +<a name="line.512"></a>
-<span class="sourceLineNo">513</span>          peerId, e);<a name="line.513"></a>
-<span class="sourceLineNo">514</span>    }<a name="line.514"></a>
-<span class="sourceLineNo">515</span><a name="line.515"></a>
-<span class="sourceLineNo">516</span>    return peer;<a name="line.516"></a>
-<span class="sourceLineNo">517</span>  }<a name="line.517"></a>
-<span class="sourceLineNo">518</span><a name="line.518"></a>
-<span class="sourceLineNo">519</span>  private void checkQueuesDeleted(String peerId) throws ReplicationException {<a name="line.519"></a>
-<span class="sourceLineNo">520</span>    if (queuesClient == null) return;<a name="line.520"></a>
-<span class="sourceLineNo">521</span>    try {<a name="line.521"></a>
-<span class="sourceLineNo">522</span>      List&lt;String&gt; replicators = queuesClient.getListOfReplicators();<a name="line.522"></a>
-<span class="sourceLineNo">523</span>      if (replicators == null || replicators.isEmpty()) {<a name="line.523"></a>
-<span class="sourceLineNo">524</span>        return;<a name="line.524"></a>
-<span class="sourceLineNo">525</span>      }<a name="line.525"></a>
-<span class="sourceLineNo">526</span>      for (String replicator : replicators) {<a name="line.526"></a>
-<span class="sourceLineNo">527</span>        List&lt;String&gt; queueIds = queuesClient.getAllQueues(replicator);<a name="line.527"></a>
-<span class="sourceLineNo">528</span>        for (String queueId : queueIds) {<a name="line.528"></a>
-<span class="sourceLineNo">529</span>          ReplicationQueueInfo queueInfo = new ReplicationQueueInfo(queueId);<a name="line.529"></a>
-<span class="sourceLineNo">530</span>          if (queueInfo.getPeerId().equals(peerId)) {<a name="line.530"></a>
-<span class="sourceLineNo">531</span>            throw new ReplicationException("undeleted queue for peerId: " + peerId<a name="line.531"></a>
-<span class="sourceLineNo">532</span>                + ", replicator: " + replicator + ", queueId: " + queueId);<a name="line.532"></a>
-<span class="sourceLineNo">533</span>          }<a name="line.533"></a>
-<span class="sourceLineNo">534</span>        }<a name="line.534"></a>
-<span class="sourceLineNo">535</span>      }<a name="line.535"></a>
-<span class="sourceLineNo">536</span>      // Check for hfile-refs queue<a name="line.536"></a>
-<span class="sourceLineNo">537</span>      if (-1 != ZKUtil.checkExists(zookeeper, hfileRefsZNode)<a name="line.537"></a>
-<span class="sourceLineNo">538</span>          &amp;&amp; queuesClient.getAllPeersFromHFileRefsQueue().contains(peerId)) {<a name="line.538"></a>
-<span class="sourceLineNo">539</span>        throw new ReplicationException("Undeleted queue for peerId: " + peerId<a name="line.539"></a>
-<span class="sourceLineNo">540</span>            + ", found in hfile-refs node path " + hfileRefsZNode);<a name="line.540"></a>
-<span class="sourceLineNo">541</span>      }<a name="line.541"></a>
-<span class="sourceLineNo">542</span>    } catch (KeeperException e) {<a name="line.542"></a>
-<span class="sourceLineNo">543</span>      throw new ReplicationException("Could not check queues deleted with id=" + peerId, e);<a name="line.543"></a>
-<span class="sourceLineNo">544</span>    }<a name="line.544"></a>
-<span class="sourceLineNo">545</span>  }<a name="line.545"></a>
-<span class="sourceLineNo">546</span>}<a name="line.546"></a>
+<span class="sourceLineNo">371</span>    existingConfig.setReplicateAllUserTables(newConfig.replicateAllUserTables());<a name="line.371"></a>
+<span class="sourceLineNo">372</span><a name="line.372"></a>
+<span class="sourceLineNo">373</span>    try {<a name="line.373"></a>
+<span class="sourceLineNo">374</span>      ZKUtil.setData(this.zookeeper, getPeerNode(id),<a name="line.374"></a>
+<span class="sourceLineNo">375</span>          ReplicationPeerConfigUtil.toByteArray(existingConfig));<a name="line.375"></a>
+<span class="sourceLineNo">376</span>    }<a name="line.376"></a>
+<span class="sourceLineNo">377</span>    catch(KeeperException ke){<a name="line.377"></a>
+<span class="sourceLineNo">378</span>      throw new ReplicationException("There was a problem trying to save changes to the " +<a name="line.378"></a>
+<span class="sourceLineNo">379</span>          "replication peer " + id, ke);<a name="line.379"></a>
+<span class="sourceLineNo">380</span>    }<a name="line.380"></a>
+<span class="sourceLineNo">381</span>  }<a name="line.381"></a>
+<span class="sourceLineNo">382</span><a name="line.382"></a>
+<span class="sourceLineNo">383</span>  /**<a name="line.383"></a>
+<span class="sourceLineNo">384</span>   * List all registered peer clusters and set a watch on their znodes.<a name="line.384"></a>
+<span class="sourceLineNo">385</span>   */<a name="line.385"></a>
+<span class="sourceLineNo">386</span>  @Override<a name="line.386"></a>
+<span class="sourceLineNo">387</span>  public List&lt;String&gt; getAllPeerIds() {<a name="line.387"></a>
+<span class="sourceLineNo">388</span>    List&lt;String&gt; ids = null;<a name="line.388"></a>
+<span class="sourceLineNo">389</span>    try {<a name="line.389"></a>
+<span class="sourceLineNo">390</span>      ids = ZKUtil.listChildrenAndWatchThem(this.zookeeper, this.peersZNode);<a name="line.390"></a>
+<span class="sourceLineNo">391</span>    } catch (KeeperException e) {<a name="line.391"></a>
+<span class="sourceLineNo">392</span>      this.abortable.abort("Cannot get the list of peers ", e);<a name="line.392"></a>
+<span class="sourceLineNo">393</span>    }<a name="line.393"></a>
+<span class="sourceLineNo">394</span>    return ids;<a name="line.394"></a>
+<span class="sourceLineNo">395</span>  }<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>   * A private method used during initialization. This method attempts to add all registered<a name="line.398"></a>
+<span class="sourceLineNo">399</span>   * peer clusters. This method does not set a watch on the peer cluster znodes.<a name="line.399"></a>
+<span class="sourceLineNo">400</span>   */<a name="line.400"></a>
+<span class="sourceLineNo">401</span>  private void addExistingPeers() throws ReplicationException {<a name="line.401"></a>
+<span class="sourceLineNo">402</span>    List&lt;String&gt; znodes = null;<a name="line.402"></a>
+<span class="sourceLineNo">403</span>    try {<a name="line.403"></a>
+<span class="sourceLineNo">404</span>      znodes = ZKUtil.listChildrenNoWatch(this.zookeeper, this.peersZNode);<a name="line.404"></a>
+<span class="sourceLineNo">405</span>    } catch (KeeperException e) {<a name="line.405"></a>
+<span class="sourceLineNo">406</span>      throw new ReplicationException("Error getting the list of peer clusters.", e);<a name="line.406"></a>
+<span class="sourceLineNo">407</span>    }<a name="line.407"></a>
+<span class="sourceLineNo">408</span>    if (znodes != null) {<a name="line.408"></a>
+<span class="sourceLineNo">409</span>      for (String z : znodes) {<a name="line.409"></a>
+<span class="sourceLineNo">410</span>        createAndAddPeer(z);<a name="line.410"></a>
+<span class="sourceLineNo">411</span>      }<a name="line.411"></a>
+<span class="sourceLineNo">412</span>    }<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>  @Override<a name="line.415"></a>
+<span class="sourceLineNo">416</span>  public boolean peerConnected(String peerId) throws ReplicationException {<a name="line.416"></a>
+<span class="sourceLineNo">417</span>    return createAndAddPeer(peerId);<a name="line.417"></a>
+<span class="sourceLineNo">418</span>  }<a name="line.418"></a>
+<span class="sourceLineNo">419</span><a name="line.419"></a>
+<span class="sourceLineNo">420</span>  @Override<a name="line.420"></a>
+<span class="sourceLineNo">421</span>  public void peerDisconnected(String peerId) {<a name="line.421"></a>
+<span class="sourceLineNo">422</span>    ReplicationPeer rp = this.peerClusters.get(peerId);<a name="line.422"></a>
+<span class="sourceLineNo">423</span>    if (rp != null) {<a name="line.423"></a>
+<span class="sourceLineNo">424</span>      ((ConcurrentMap&lt;String, ReplicationPeerZKImpl&gt;) peerClusters).remove(peerId, rp);<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><a name="line.427"></a>
+<span class="sourceLineNo">428</span>  /**<a name="line.428"></a>
+<span class="sourceLineNo">429</span>   * Attempt to connect to a new remote slave cluster.<a name="line.429"></a>
+<span class="sourceLineNo">430</span>   * @param peerId a short that identifies the cluster<a name="line.430"></a>
+<span class="sourceLineNo">431</span>   * @return true if a new connection was made, false if no new connection was made.<a name="line.431"></a>
+<span class="sourceLineNo">432</span>   */<a name="line.432"></a>
+<span class="sourceLineNo">433</span>  public boolean createAndAddPeer(String peerId) throws ReplicationException {<a name="line.433"></a>
+<span class="sourceLineNo">434</span>    if (peerClusters == null) {<a name="line.434"></a>
+<span class="sourceLineNo">435</span>      return false;<a name="line.435"></a>
+<span class="sourceLineNo">436</span>    }<a name="line.436"></a>
+<span class="sourceLineNo">437</span>    if (this.peerClusters.containsKey(peerId)) {<a name="line.437"></a>
+<span class="sourceLineNo">438</span>      return false;<a name="line.438"></a>
+<span class="sourceLineNo">439</span>    }<a name="line.439"></a>
+<span class="sourceLineNo">440</span><a name="line.440"></a>
+<span class="sourceLineNo">441</span>    ReplicationPeerZKImpl peer = null;<a name="line.441"></a>
+<span class="sourceLineNo">442</span>    try {<a name="line.442"></a>
+<span class="sourceLineNo">443</span>      peer = createPeer(peerId);<a name="line.443"></a>
+<span class="sourceLineNo">444</span>    } catch (Exception e) {<a name="line.444"></a>
+<span class="sourceLineNo">445</span>      throw new ReplicationException("Error adding peer with id=" + peerId, e);<a name="line.445"></a>
+<span class="sourceLineNo">446</span>    }<a name="line.446"></a>
+<span class="sourceLineNo">447</span>    if (peer == null) {<a name="line.447"></a>
+<span class="sourceLineNo">448</span>      return false;<a name="line.448"></a>
+<span class="sourceLineNo">449</span>    }<a name="line.449"></a>
+<span class="sourceLineNo">450</span>    ReplicationPeerZKImpl previous =<a name="line.450"></a>
+<span class="sourceLineNo">451</span>      ((ConcurrentMap&lt;String, ReplicationPeerZKImpl&gt;) peerClusters).putIfAbsent(peerId, peer);<a name="line.451"></a>
+<span class="sourceLineNo">452</span>    if (previous == null) {<a name="line.452"></a>
+<span class="sourceLineNo">453</span>      LOG.info("Added new peer cluster=" + peer.getPeerConfig().getClusterKey());<a name="line.453"></a>
+<span class="sourceLineNo">454</span>    } else {<a name="line.454"></a>
+<span class="sourceLineNo">455</span>      LOG.info("Peer already present, " + previous.getPeerConfig().getClusterKey() +<a name="line.455"></a>
+<span class="sourceLineNo">456</span>        ", new cluster=" + peer.getPeerConfig().getClusterKey());<a name="line.456"></a>
+<span class="sourceLineNo">457</span>    }<a name="line.457"></a>
+<span class="sourceLineNo">458</span>    return true;<a name="line.458"></a>
+<span class="sourceLineNo">459</span>  }<a name="line.459"></a>
+<span class="sourceLineNo">460</span><a name="line.460"></a>
+<span class="sourceLineNo">461</span>  /**<a name="line.461"></a>
+<span class="sourceLineNo">462</span>   * Update the state znode of a peer cluster.<a name="line.462"></a>
+<span class="sourceLineNo">463</span>   * @param id<a name="line.463"></a>
+<span class="sourceLineNo">464</span>   * @param state<a name="line.464"></a>
+<span class="sourceLineNo">465</span>   */<a name="line.465"></a>
+<span class="sourceLineNo">466</span>  private void changePeerState(String id, ReplicationProtos.ReplicationState.State state)<a name="line.466"></a>
+<span class="sourceLineNo">467</span>      throws ReplicationException {<a name="line.467"></a>
+<span class="sourceLineNo">468</span>    try {<a name="line.468"></a>
+<span class="sourceLineNo">469</span>      if (!peerExists(id)) {<a name="line.469"></a>
+<span class="sourceLineNo">470</span>        throw new IllegalArgumentException("Cannot enable/disable peer because id=" + id<a name="line.470"></a>
+<span class="sourceLineNo">471</span>            + " does not exist.");<a name="line.471"></a>
+<span class="sourceLineNo">472</span>      }<a name="line.472"></a>
+<span class="sourceLineNo">473</span>      String peerStateZNode = getPeerStateNode(id);<a name="line.473"></a>
+<span class="sourceLineNo">474</span>      byte[] stateBytes =<a name="line.474"></a>
+<span class="sourceLineNo">475</span>          (state == ReplicationProtos.ReplicationState.State.ENABLED) ? ENABLED_ZNODE_BYTES<a name="line.475"></a>
+<span class="sourceLineNo">476</span>              : DISABLED_ZNODE_BYTES;<a name="line.476"></a>
+<span class="sourceLineNo">477</span>      if (ZKUtil.checkExists(this.zookeeper, peerStateZNode) != -1) {<a name="line.477"></a>
+<span class="sourceLineNo">478</span>        ZKUtil.setData(this.zookeeper, peerStateZNode, stateBytes);<a name="line.478"></a>
+<span class="sourceLineNo">479</span>      } else {<a name="line.479"></a>
+<span class="sourceLineNo">480</span>        ZKUtil.createAndWatch(this.zookeeper, peerStateZNode, stateBytes);<a name="line.480"></a>
+<span class="sourceLineNo">481</span>      }<a name="line.481"></a>
+<span class="sourceLineNo">482</span>      LOG.info("Peer with id= " + id + " is now " + state.name());<a name="line.482"></a>
+<span class="sourceLineNo">483</span>    } catch (KeeperException e) {<a name="line.483"></a>
+<span class="sourceLineNo">484</span>      throw new ReplicationException("Unable to change state of the peer with id=" + id, e);<a name="line.484"></a>
+<span class="sourceLineNo">485</span>    }<a name="line.485"></a>
+<span class="sourceLineNo">486</span>  }<a name="line.486"></a>
+<span class="sourceLineNo">487</span><a name="line.487"></a>
+<span class="sourceLineNo">488</span>  /**<a name="line.488"></a>
+<span class="sourceLineNo">489</span>   * Helper method to connect to a peer<a name="line.489"></a>
+<span class="sourceLineNo">490</span>   * @param peerId peer's identifier<a name="line.490"></a>
+<span class="sourceLineNo">491</span>   * @return object representing the peer<a name="line.491"></a>
+<span class="sourceLineNo">492</span>   * @throws ReplicationException<a name="line.492"></a>
+<span class="sourceLineNo">493</span>   */<a name="line.493"></a>
+<span class="sourceLineNo">494</span>  private ReplicationPeerZKImpl createPeer(String peerId) throws ReplicationException {<a name="line.494"></a>
+<span class="sourceLineNo">495</span>    Pair&lt;ReplicationPeerConfig, Configuration&gt; pair = getPeerConf(peerId);<a name="line.495"></a>
+<span class="sourceLineNo">496</span>    if (pair == null) {<a name="line.496"></a>
+<span class="sourceLineNo">497</span>      return null;<a name="line.497"></a>
+<span class="sourceLineNo">498</span>    }<a name="line.498"></a>
+<span class="sourceLineNo">499</span>    Configuration peerConf = pair.getSecond();<a name="line.499"></a>
+<span class="sourceLineNo">500</span><a name="line.500"></a>
+<span class="sourceLineNo">501</span>    ReplicationPeerZKImpl peer = new ReplicationPeerZKImpl(zookeeper,<a name="line.501"></a>
+<span class="sourceLineNo">502</span>        peerConf, peerId, pair.getFirst(), abortable);<a name="line.502"></a>
+<span class="sourceLineNo">503</span>    try {<a name="line.503"></a>
+<span class="sourceLineNo">504</span>      peer.startStateTracker(this.getPeerStateNode(peerId));<a name="line.504"></a>
+<span class="sourceLineNo">505</span>    } catch (KeeperException e) {<a name="line.505"></a>
+<span class="sourceLineNo">506</span>      throw new ReplicationException("Error starting the peer state tracker for peerId=" +<a name="line.506"></a>
+<span class="sourceLineNo">507</span>          peerId, e);<a name="line.507"></a>
+<span class="sourceLineNo">508</span>    }<a name="line.508"></a>
+<span class="sourceLineNo">509</span><a name="line.509"></a>
+<span class="sourceLineNo">510</span>    try {<a name="line.510"></a>
+<span class="sourceLineNo">511</span>      peer.startPeerConfigTracker(this.getPeerNode(peerId));<a name="line.511"></a>
+<span class="sourceLineNo">512</span>    } catch (KeeperException e) {<a name="line.512"></a>
+<span class="sourceLineNo">513</span>      throw new ReplicationException("Error starting the peer tableCFs tracker for peerId=" +<a name="line.513"></a>
+<span class="sourceLineNo">514</span>          peerId, e);<a name="line.514"></a>
+<span class="sourceLineNo">515</span>    }<a name="line.515"></a>
+<span class="sourceLineNo">516</span><a name="line.516"></a>
+<span class="sourceLineNo">517</span>    return peer;<a name="line.517"></a>
+<span class="sourceLineNo">518</span>  }<a name="line.518"></a>
+<span class="sourceLineNo">519</span><a name="line.519"></a>
+<span class="sourceLineNo">520</span>  private void checkQueuesDeleted(String peerId) throws ReplicationException {<a name="line.520"></a>
+<span class="sourceLineNo">521</span>    if (queuesClient == null) return;<a name="line.521"></a>
+<span class="sourceLineNo">522</span>    try {<a name="line.522"></a>
+<span class="sourceLineNo">523</span>      List&lt;String&gt; replicators = queuesClient.getListOfReplicators();<a name="line.523"></a>
+<span class="sourceLineNo">524</span>      if (replicators == null || replicators.isEmpty()) {<a name="line.524"></a>
+<span class="sourceLineNo">525</span>        return;<a name="line.525"></a>
+<span class="sourceLineNo">526</span>      }<a name="line.526"></a>
+<span class="sourceLineNo">527</span>      for (String replicator : replicators) {<a name="line.527"></a>
+<span class="sourceLineNo">528</span>        List&lt;String&gt; queueIds = queuesClient.getAllQueues(replicator);<a name="line.528"></a>
+<span class="sourceLineNo">529</span>        for (String queueId : queueIds) {<a name="line.529"></a>
+<span class="sourceLineNo">530</span>          ReplicationQueueInfo queueInfo = new ReplicationQueueInfo(queueId);<a name="line.530"></a>
+<span class="sourceLineNo">531</span>          if (queueInfo.getPeerId().equals(peerId)) {<a name="line.531"></a>
+<span class="sourceLineNo">532</span>            throw new ReplicationException("undeleted queue for peerId: " + peerId<a name="line.532"></a>
+<span class="sourceLineNo">533</span>                + ", replicator: " + replicator + ", queueId: " + queueId);<a name="line.533"></a>
+<span class="sourceLineNo">534</span>          }<a name="line.534"></a>
+<span class="sourceLineNo">535</span>        }<a name="line.535"></a>
+<span class="sourceLineNo">536</span>      }<a name="line.536"></a>
+<span class="sourceLineNo">537</span>      // Check for hfile-refs queue<a name="line.537"></a>
+<span class="sourceLineNo">538</span>      if (-1 != ZKUtil.checkExists(zookeeper, hfileRefsZNode)<a name="line.538"></a>
+<span class="sourceLineNo">539</span>          &amp;&amp; queuesClient.getAllPeersFromHFileRefsQueue().contains(peerId)) {<a name="line.539"></a>
+<span class="sourceLineNo">540</span>        throw new ReplicationException("Undeleted queue for peerId: " + peerId<a name="line.540"></a>
+<span class="sourceLineNo">541</span>            + ", found in hfile-refs node path " + hfileRefsZNode);<a name="line.541"></a>
+<span class="sourceLineNo">542</span>      }<a name="line.542"></a>
+<span class="sourceLineNo">543</span>    } catch (KeeperException e) {<a name="line.543"></a>
+<span class="sourceLineNo">544</span>      throw new ReplicationException("Could not check queues deleted with id=" + peerId, e);<a name="line.544"></a>
+<span class="sourceLineNo">545</span>    }<a name="line.545"></a>
+<span class="sourceLineNo">546</span>  }<a name="line.546"></a>
+<span class="sourceLineNo">547</span>}<a name="line.547"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/devapidocs/src-html/org/apache/hadoop/hbase/replication/master/ReplicationPeerConfigUpgrader.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/master/ReplicationPeerConfigUpgrader.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/master/ReplicationPeerConfigUpgrader.html
new file mode 100644
index 0000000..a23b42f
--- /dev/null
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/master/ReplicationPeerConfigUpgrader.html
@@ -0,0 +1,256 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a>
+<span class="sourceLineNo">002</span> *<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * Licensed to the Apache Software Foundation (ASF) under one<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * or more contributor license agreements.  See the NOTICE file<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * distributed with this work for additional information<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * regarding copyright ownership.  The ASF licenses this file<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * to you under the Apache License, Version 2.0 (the<a name="line.7"></a>
+<span class="sourceLineNo">008</span> * "License"); you may not use this file except in compliance<a name="line.8"></a>
+<span class="sourceLineNo">009</span> * with the License.  You may obtain a copy of the License at<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *<a name="line.10"></a>
+<span class="sourceLineNo">011</span> *     http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<span class="sourceLineNo">012</span> *<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
+<span class="sourceLineNo">016</span> * See the License for the specific language governing permissions and<a name="line.16"></a>
+<span class="sourceLineNo">017</span> * limitations under the License.<a name="line.17"></a>
+<span class="sourceLineNo">018</span> */<a name="line.18"></a>
+<span class="sourceLineNo">019</span>package org.apache.hadoop.hbase.replication.master;<a name="line.19"></a>
+<span class="sourceLineNo">020</span><a name="line.20"></a>
+<span class="sourceLineNo">021</span>import java.io.IOException;<a name="line.21"></a>
+<span class="sourceLineNo">022</span>import java.util.List;<a name="line.22"></a>
+<span class="sourceLineNo">023</span><a name="line.23"></a>
+<span class="sourceLineNo">024</span>import org.apache.commons.logging.Log;<a name="line.24"></a>
+<span class="sourceLineNo">025</span>import org.apache.commons.logging.LogFactory;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import org.apache.hadoop.conf.Configuration;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.Abortable;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.HBaseConfiguration;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.apache.hadoop.hbase.client.Admin;<a name="line.29"></a>
+<span class="sourceLineNo">030</span>import org.apache.hadoop.hbase.client.Connection;<a name="line.30"></a>
+<span class="sourceLineNo">031</span>import org.apache.hadoop.hbase.client.ConnectionFactory;<a name="line.31"></a>
+<span class="sourceLineNo">032</span>import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil;<a name="line.32"></a>
+<span class="sourceLineNo">033</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.33"></a>
+<span class="sourceLineNo">034</span>import org.apache.hadoop.hbase.replication.ReplicationPeerConfig;<a name="line.34"></a>
+<span class="sourceLineNo">035</span>import org.apache.hadoop.hbase.replication.ReplicationStateZKBase;<a name="line.35"></a>
+<span class="sourceLineNo">036</span>import org.apache.hadoop.hbase.zookeeper.ZKUtil;<a name="line.36"></a>
+<span class="sourceLineNo">037</span>import org.apache.hadoop.hbase.zookeeper.ZKWatcher;<a name="line.37"></a>
+<span class="sourceLineNo">038</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.38"></a>
+<span class="sourceLineNo">039</span>import org.apache.yetus.audience.InterfaceStability;<a name="line.39"></a>
+<span class="sourceLineNo">040</span>import org.apache.zookeeper.KeeperException;<a name="line.40"></a>
+<span class="sourceLineNo">041</span><a name="line.41"></a>
+<span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.ReplicationProtos;<a name="line.42"></a>
+<span class="sourceLineNo">043</span><a name="line.43"></a>
+<span class="sourceLineNo">044</span>/**<a name="line.44"></a>
+<span class="sourceLineNo">045</span> * This class is used to upgrade TableCFs from HBase 1.0, 1.1, 1.2, 1.3 to HBase 1.4 or 2.x.<a name="line.45"></a>
+<span class="sourceLineNo">046</span> * It will be removed in HBase 3.x. See HBASE-11393<a name="line.46"></a>
+<span class="sourceLineNo">047</span> */<a name="line.47"></a>
+<span class="sourceLineNo">048</span>@InterfaceAudience.Private<a name="line.48"></a>
+<span class="sourceLineNo">049</span>@InterfaceStability.Unstable<a name="line.49"></a>
+<span class="sourceLineNo">050</span>public class ReplicationPeerConfigUpgrader extends ReplicationStateZKBase {<a name="line.50"></a>
+<span class="sourceLineNo">051</span><a name="line.51"></a>
+<span class="sourceLineNo">052</span>  private static final Log LOG = LogFactory.getLog(ReplicationPeerConfigUpgrader.class);<a name="line.52"></a>
+<span class="sourceLineNo">053</span><a name="line.53"></a>
+<span class="sourceLineNo">054</span>  public ReplicationPeerConfigUpgrader(ZKWatcher zookeeper,<a name="line.54"></a>
+<span class="sourceLineNo">055</span>                         Configuration conf, Abortable abortable) {<a name="line.55"></a>
+<span class="sourceLineNo">056</span>    super(zookeeper, conf, abortable);<a name="line.56"></a>
+<span class="sourceLineNo">057</span>  }<a name="line.57"></a>
+<span class="sourceLineNo">058</span><a name="line.58"></a>
+<span class="sourceLineNo">059</span>  public void upgrade() throws Exception {<a name="line.59"></a>
+<span class="sourceLineNo">060</span>    try (Connection conn = ConnectionFactory.createConnection(conf)) {<a name="line.60"></a>
+<span class="sourceLineNo">061</span>      Admin admin = conn.getAdmin();<a name="line.61"></a>
+<span class="sourceLineNo">062</span>      admin.listReplicationPeers().forEach(<a name="line.62"></a>
+<span class="sourceLineNo">063</span>        (peerDesc) -&gt; {<a name="line.63"></a>
+<span class="sourceLineNo">064</span>          String peerId = peerDesc.getPeerId();<a name="line.64"></a>
+<span class="sourceLineNo">065</span>          ReplicationPeerConfig peerConfig = peerDesc.getPeerConfig();<a name="line.65"></a>
+<span class="sourceLineNo">066</span>          if ((peerConfig.getNamespaces() != null &amp;&amp; !peerConfig.getNamespaces().isEmpty())<a name="line.66"></a>
+<span class="sourceLineNo">067</span>              || (peerConfig.getTableCFsMap() != null &amp;&amp; !peerConfig.getTableCFsMap().isEmpty())) {<a name="line.67"></a>
+<span class="sourceLineNo">068</span>            peerConfig.setReplicateAllUserTables(false);<a name="line.68"></a>
+<span class="sourceLineNo">069</span>            try {<a name="line.69"></a>
+<span class="sourceLineNo">070</span>              admin.updateReplicationPeerConfig(peerId, peerConfig);<a name="line.70"></a>
+<span class="sourceLineNo">071</span>            } catch (Exception e) {<a name="line.71"></a>
+<span class="sourceLineNo">072</span>              LOG.error("Failed to upgrade replication peer config for peerId=" + peerId, e);<a name="line.72"></a>
+<span class="sourceLineNo">073</span>            }<a name="line.73"></a>
+<span class="sourceLineNo">074</span>          }<a name="line.74"></a>
+<span class="sourceLineNo">075</span>        });<a name="line.75"></a>
+<span class="sourceLineNo">076</span>    }<a name="line.76"></a>
+<span class="sourceLineNo">077</span>  }<a name="line.77"></a>
+<span class="sourceLineNo">078</span><a name="line.78"></a>
+<span class="sourceLineNo">079</span>  public void copyTableCFs() {<a name="line.79"></a>
+<span class="sourceLineNo">080</span>    List&lt;String&gt; znodes = null;<a name="line.80"></a>
+<span class="sourceLineNo">081</span>    try {<a name="line.81"></a>
+<span class="sourceLineNo">082</span>      znodes = ZKUtil.listChildrenNoWatch(this.zookeeper, this.peersZNode);<a name="line.82"></a>
+<span class="sourceLineNo">083</span>    } catch (KeeperException e) {<a name="line.83"></a>
+<span class="sourceLineNo">084</span>      LOG.error("Failed to get peers znode", e);<a name="line.84"></a>
+<span class="sourceLineNo">085</span>    }<a name="line.85"></a>
+<span class="sourceLineNo">086</span>    if (znodes != null) {<a name="line.86"></a>
+<span class="sourceLineNo">087</span>      for (String peerId : znodes) {<a name="line.87"></a>
+<span class="sourceLineNo">088</span>        if (!copyTableCFs(peerId)) {<a name="line.88"></a>
+<span class="sourceLineNo">089</span>          LOG.error("upgrade tableCFs failed for peerId=" + peerId);<a name="line.89"></a>
+<span class="sourceLineNo">090</span>        }<a name="line.90"></a>
+<span class="sourceLineNo">091</span>      }<a name="line.91"></a>
+<span class="sourceLineNo">092</span>    }<a name="line.92"></a>
+<span class="sourceLineNo">093</span>  }<a name="line.93"></a>
+<span class="sourceLineNo">094</span><a name="line.94"></a>
+<span class="sourceLineNo">095</span>  public boolean copyTableCFs(String peerId) {<a name="line.95"></a>
+<span class="sourceLineNo">096</span>    String tableCFsNode = getTableCFsNode(peerId);<a name="line.96"></a>
+<span class="sourceLineNo">097</span>    try {<a name="line.97"></a>
+<span class="sourceLineNo">098</span>      if (ZKUtil.checkExists(zookeeper, tableCFsNode) != -1) {<a name="line.98"></a>
+<span class="sourceLineNo">099</span>        String peerNode = getPeerNode(peerId);<a name="line.99"></a>
+<span class="sourceLineNo">100</span>        ReplicationPeerConfig rpc = getReplicationPeerConig(peerNode);<a name="line.100"></a>
+<span class="sourceLineNo">101</span>        // We only need to copy data from tableCFs node to rpc Node the first time hmaster start.<a name="line.101"></a>
+<span class="sourceLineNo">102</span>        if (rpc.getTableCFsMap() == null || rpc.getTableCFsMap().isEmpty()) {<a name="line.102"></a>
+<span class="sourceLineNo">103</span>          // we copy TableCFs node into PeerNode<a name="line.103"></a>
+<span class="sourceLineNo">104</span>          LOG.info("copy tableCFs into peerNode:" + peerId);<a name="line.104"></a>
+<span class="sourceLineNo">105</span>          ReplicationProtos.TableCF[] tableCFs =<a name="line.105"></a>
+<span class="sourceLineNo">106</span>                  ReplicationPeerConfigUtil.parseTableCFs(<a name="line.106"></a>
+<span class="sourceLineNo">107</span>                          ZKUtil.getData(this.zookeeper, tableCFsNode));<a name="line.107"></a>
+<span class="sourceLineNo">108</span>          if (tableCFs != null &amp;&amp; tableCFs.length &gt; 0) {<a name="line.108"></a>
+<span class="sourceLineNo">109</span>            rpc.setTableCFsMap(ReplicationPeerConfigUtil.convert2Map(tableCFs));<a name="line.109"></a>
+<span class="sourceLineNo">110</span>            ZKUtil.setData(this.zookeeper, peerNode,<a name="line.110"></a>
+<span class="sourceLineNo">111</span>              ReplicationPeerConfigUtil.toByteArray(rpc));<a name="line.111"></a>
+<span class="sourceLineNo">112</span>          }<a name="line.112"></a>
+<span class="sourceLineNo">113</span>        } else {<a name="line.113"></a>
+<span class="sourceLineNo">114</span>          LOG.info("No tableCFs in peerNode:" + peerId);<a name="line.114"></a>
+<span class="sourceLineNo">115</span>        }<a name="line.115"></a>
+<span class="sourceLineNo">116</span>      }<a name="line.116"></a>
+<span class="sourceLineNo">117</span>    } catch (KeeperException e) {<a name="line.117"></a>
+<span class="sourceLineNo">118</span>      LOG.warn("NOTICE!! Update peerId failed, peerId=" + peerId, e);<a name="line.118"></a>
+<span class="sourceLineNo">119</span>      return false;<a name="line.119"></a>
+<span class="sourceLineNo">120</span>    } catch (InterruptedException e) {<a name="line.120"></a>
+<span class="sourceLineNo">121</span>      LOG.warn("NOTICE!! Update peerId failed, peerId=" + peerId, e);<a name="line.121"></a>
+<span class="sourceLineNo">122</span>      return false;<a name="line.122"></a>
+<span class="sourceLineNo">123</span>    } catch (IOException e) {<a name="line.123"></a>
+<span class="sourceLineNo">124</span>      LOG.warn("NOTICE!! Update peerId failed, peerId=" + peerId, e);<a name="line.124"></a>
+<span class="sourceLineNo">125</span>      return false;<a name="line.125"></a>
+<span class="sourceLineNo">126</span>    }<a name="line.126"></a>
+<span class="sourceLineNo">127</span>    return true;<a name="line.127"></a>
+<span class="sourceLineNo">128</span>  }<a name="line.128"></a>
+<span class="sourceLineNo">129</span><a name="line.129"></a>
+<span class="sourceLineNo">130</span>  private ReplicationPeerConfig getReplicationPeerConig(String peerNode)<a name="line.130"></a>
+<span class="sourceLineNo">131</span>          throws KeeperException, InterruptedException {<a name="line.131"></a>
+<span class="sourceLineNo">132</span>    byte[] data = null;<a name="line.132"></a>
+<span class="sourceLineNo">133</span>    data = ZKUtil.getData(this.zookeeper, peerNode);<a name="line.133"></a>
+<span class="sourceLineNo">134</span>    if (data == null) {<a name="line.134"></a>
+<span class="sourceLineNo">135</span>      LOG.error("Could not get configuration for " +<a name="line.135"></a>
+<span class="sourceLineNo">136</span>              "peer because it doesn't exist. peer=" + peerNode);<a name="line.136"></a>
+<span class="sourceLineNo">137</span>      return null;<a name="line.137"></a>
+<span class="sourceLineNo">138</span>    }<a name="line.138"></a>
+<span class="sourceLineNo">139</span>    try {<a name="line.139"></a>
+<span class="sourceLineNo">140</span>      return ReplicationPeerConfigUtil.parsePeerFrom(data);<a name="line.140"></a>
+<span class="sourceLineNo">141</span>    } catch (DeserializationException e) {<a name="line.141"></a>
+<span class="sourceLineNo">142</span>      LOG.warn("Failed to parse cluster key from peer=" + peerNode);<a name="line.142"></a>
+<span class="sourceLineNo">143</span>      return null;<a name="line.143"></a>
+<span class="sourceLineNo">144</span>    }<a name="line.144"></a>
+<span class="sourceLineNo">145</span>  }<a name="line.145"></a>
+<span class="sourceLineNo">146</span><a name="line.146"></a>
+<span class="sourceLineNo">147</span>  private static void printUsageAndExit() {<a name="line.147"></a>
+<span class="sourceLineNo">148</span>    System.err.printf(<a name="line.148"></a>
+<span class="sourceLineNo">149</span>      "Usage: hbase org.apache.hadoop.hbase.replication.master.ReplicationPeerConfigUpgrader"<a name="line.149"></a>
+<span class="sourceLineNo">150</span>          + " [options]");<a name="line.150"></a>
+<span class="sourceLineNo">151</span>    System.err.println(" where [options] are:");<a name="line.151"></a>
+<span class="sourceLineNo">152</span>    System.err.println("  -h|-help      Show this help and exit.");<a name="line.152"></a>
+<span class="sourceLineNo">153</span>    System.err.println("  copyTableCFs  Copy table-cfs to replication peer config");<a name="line.153"></a>
+<span class="sourceLineNo">154</span>    System.err.println("  upgrade           Upgrade replication peer config to new format");<a name="line.154"></a>
+<span class="sourceLineNo">155</span>    System.err.println();<a name="line.155"></a>
+<span class="sourceLineNo">156</span>    System.exit(1);<a name="line.156"></a>
+<span class="sourceLineNo">157</span>  }<a name="line.157"></a>
+<span class="sourceLineNo">158</span><a name="line.158"></a>
+<span class="sourceLineNo">159</span>  public static void main(String[] args) throws Exception {<a name="line.159"></a>
+<span class="sourceLineNo">160</span>    if (args.length != 1) {<a name="line.160"></a>
+<span class="sourceLineNo">161</span>      printUsageAndExit();<a name="line.161"></a>
+<span class="sourceLineNo">162</span>    }<a name="line.162"></a>
+<span class="sourceLineNo">163</span>    if (args[0].equals("-help") || args[0].equals("-h")) {<a name="line.163"></a>
+<span class="sourceLineNo">164</span>      printUsageAndExit();<a name="line.164"></a>
+<span class="sourceLineNo">165</span>    } else if (args[0].equals("copyTableCFs")) {<a name="line.165"></a>
+<span class="sourceLineNo">166</span>      Configuration conf = HBaseConfiguration.create();<a name="line.166"></a>
+<span class="sourceLineNo">167</span>      ZKWatcher zkw = new ZKWatcher(conf, "ReplicationPeerConfigUpgrader", null);<a name="line.167"></a>
+<span class="sourceLineNo">168</span>      try {<a name="line.168"></a>
+<span class="sourceLineNo">169</span>        ReplicationPeerConfigUpgrader tableCFsUpdater = new ReplicationPeerConfigUpgrader(zkw,<a name="line.169"></a>
+<span class="sourceLineNo">170</span>            conf, null);<a name="line.170"></a>
+<span class="sourceLineNo">171</span>        tableCFsUpdater.copyTableCFs();<a name="line.171"></a>
+<span class="sourceLineNo">172</span>      } finally {<a name="line.172"></a>
+<span class="sourceLineNo">173</span>        zkw.close();<a name="line.173"></a>
+<span class="sourceLineNo">174</span>      }<a name="line.174"></a>
+<span class="sourceLineNo">175</span>    } else if (args[0].equals("upgrade")) {<a name="line.175"></a>
+<span class="sourceLineNo">176</span>      Configuration conf = HBaseConfiguration.create();<a name="line.176"></a>
+<span class="sourceLineNo">177</span>      ZKWatcher zkw = new ZKWatcher(conf, "ReplicationPeerConfigUpgrader", null);<a name="line.177"></a>
+<span class="sourceLineNo">178</span>      ReplicationPeerConfigUpgrader upgrader = new ReplicationPeerConfigUpgrader(zkw, conf, null);<a name="line.178"></a>
+<span class="sourceLineNo">179</span>      upgrader.upgrade();<a name="line.179"></a>
+<span class="sourceLineNo">180</span>    } else {<a name="line.180"></a>
+<span class="sourceLineNo">181</span>      printUsageAndExit();<a name="line.181"></a>
+<span class="sourceLineNo">182</span>    }<a name="line.182"></a>
+<span class="sourceLineNo">183</span>  }<a name="line.183"></a>
+<span class="sourceLineNo">184</span>}<a name="line.184"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</pre>
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/devapidocs/src-html/org/apache/hadoop/hbase/replication/master/TableCFsUpdater.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/master/TableCFsUpdater.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/master/TableCFsUpdater.html
deleted file mode 100644
index 3a12e36..0000000
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/master/TableCFsUpdater.html
+++ /dev/null
@@ -1,223 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-<head>
-<title>Source code</title>
-<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
-</head>
-<body>
-<div class="sourceContainer">
-<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a>
-<span class="sourceLineNo">002</span> *<a name="line.2"></a>
-<span class="sourceLineNo">003</span> * Licensed to the Apache Software Foundation (ASF) under one<a name="line.3"></a>
-<span class="sourceLineNo">004</span> * or more contributor license agreements.  See the NOTICE file<a name="line.4"></a>
-<span class="sourceLineNo">005</span> * distributed with this work for additional information<a name="line.5"></a>
-<span class="sourceLineNo">006</span> * regarding copyright ownership.  The ASF licenses this file<a name="line.6"></a>
-<span class="sourceLineNo">007</span> * to you under the Apache License, Version 2.0 (the<a name="line.7"></a>
-<span class="sourceLineNo">008</span> * "License"); you may not use this file except in compliance<a name="line.8"></a>
-<span class="sourceLineNo">009</span> * with the License.  You may obtain a copy of the License at<a name="line.9"></a>
-<span class="sourceLineNo">010</span> *<a name="line.10"></a>
-<span class="sourceLineNo">011</span> *     http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
-<span class="sourceLineNo">012</span> *<a name="line.12"></a>
-<span class="sourceLineNo">013</span> * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
-<span class="sourceLineNo">014</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
-<span class="sourceLineNo">015</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
-<span class="sourceLineNo">016</span> * See the License for the specific language governing permissions and<a name="line.16"></a>
-<span class="sourceLineNo">017</span> * limitations under the License.<a name="line.17"></a>
-<span class="sourceLineNo">018</span> */<a name="line.18"></a>
-<span class="sourceLineNo">019</span>package org.apache.hadoop.hbase.replication.master;<a name="line.19"></a>
-<span class="sourceLineNo">020</span><a name="line.20"></a>
-<span class="sourceLineNo">021</span>import org.apache.commons.logging.Log;<a name="line.21"></a>
-<span class="sourceLineNo">022</span>import org.apache.commons.logging.LogFactory;<a name="line.22"></a>
-<span class="sourceLineNo">023</span>import org.apache.hadoop.conf.Configuration;<a name="line.23"></a>
-<span class="sourceLineNo">024</span>import org.apache.hadoop.hbase.Abortable;<a name="line.24"></a>
-<span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.HBaseConfiguration;<a name="line.25"></a>
-<span class="sourceLineNo">026</span>import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.27"></a>
-<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.ReplicationProtos;<a name="line.28"></a>
-<span class="sourceLineNo">029</span>import org.apache.hadoop.hbase.replication.ReplicationPeerConfig;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import org.apache.hadoop.hbase.replication.ReplicationStateZKBase;<a name="line.30"></a>
-<span class="sourceLineNo">031</span>import org.apache.hadoop.hbase.zookeeper.ZKUtil;<a name="line.31"></a>
-<span class="sourceLineNo">032</span>import org.apache.hadoop.hbase.zookeeper.ZKWatcher;<a name="line.32"></a>
-<span class="sourceLineNo">033</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.33"></a>
-<span class="sourceLineNo">034</span>import org.apache.yetus.audience.InterfaceStability;<a name="line.34"></a>
-<span class="sourceLineNo">035</span>import org.apache.zookeeper.KeeperException;<a name="line.35"></a>
-<span class="sourceLineNo">036</span><a name="line.36"></a>
-<span class="sourceLineNo">037</span>import java.io.IOException;<a name="line.37"></a>
-<span class="sourceLineNo">038</span>import java.util.List;<a name="line.38"></a>
-<span class="sourceLineNo">039</span><a name="line.39"></a>
-<span class="sourceLineNo">040</span>/**<a name="line.40"></a>
-<span class="sourceLineNo">041</span> * This class is used to upgrade TableCFs from HBase 1.0, 1.1, 1.2, 1.3 to HBase 1.4 or 2.x.<a name="line.41"></a>
-<span class="sourceLineNo">042</span> * It will be removed in HBase 3.x. See HBASE-11393<a name="line.42"></a>
-<span class="sourceLineNo">043</span> */<a name="line.43"></a>
-<span class="sourceLineNo">044</span>@InterfaceAudience.Private<a name="line.44"></a>
-<span class="sourceLineNo">045</span>@InterfaceStability.Unstable<a name="line.45"></a>
-<span class="sourceLineNo">046</span>public class TableCFsUpdater extends ReplicationStateZKBase {<a name="line.46"></a>
-<span class="sourceLineNo">047</span><a name="line.47"></a>
-<span class="sourceLineNo">048</span>  private static final Log LOG = LogFactory.getLog(TableCFsUpdater.class);<a name="line.48"></a>
-<span class="sourceLineNo">049</span><a name="line.49"></a>
-<span class="sourceLineNo">050</span>  public TableCFsUpdater(ZKWatcher zookeeper,<a name="line.50"></a>
-<span class="sourceLineNo">051</span>                         Configuration conf, Abortable abortable) {<a name="line.51"></a>
-<span class="sourceLineNo">052</span>    super(zookeeper, conf, abortable);<a name="line.52"></a>
-<span class="sourceLineNo">053</span>  }<a name="line.53"></a>
-<span class="sourceLineNo">054</span><a name="line.54"></a>
-<span class="sourceLineNo">055</span>  public void update() {<a name="line.55"></a>
-<span class="sourceLineNo">056</span>    List&lt;String&gt; znodes = null;<a name="line.56"></a>
-<span class="sourceLineNo">057</span>    try {<a name="line.57"></a>
-<span class="sourceLineNo">058</span>      znodes = ZKUtil.listChildrenNoWatch(this.zookeeper, this.peersZNode);<a name="line.58"></a>
-<span class="sourceLineNo">059</span>    } catch (KeeperException e) {<a name="line.59"></a>
-<span class="sourceLineNo">060</span>      LOG.error("Failed to get peers znode", e);<a name="line.60"></a>
-<span class="sourceLineNo">061</span>    }<a name="line.61"></a>
-<span class="sourceLineNo">062</span>    if (znodes != null) {<a name="line.62"></a>
-<span class="sourceLineNo">063</span>      for (String peerId : znodes) {<a name="line.63"></a>
-<span class="sourceLineNo">064</span>        if (!update(peerId)) {<a name="line.64"></a>
-<span class="sourceLineNo">065</span>          LOG.error("upgrade tableCFs failed for peerId=" + peerId);<a name="line.65"></a>
-<span class="sourceLineNo">066</span>        }<a name="line.66"></a>
-<span class="sourceLineNo">067</span>      }<a name="line.67"></a>
-<span class="sourceLineNo">068</span>    }<a name="line.68"></a>
-<span class="sourceLineNo">069</span>  }<a name="line.69"></a>
-<span class="sourceLineNo">070</span><a name="line.70"></a>
-<span class="sourceLineNo">071</span>  public boolean update(String peerId) {<a name="line.71"></a>
-<span class="sourceLineNo">072</span>    String tableCFsNode = getTableCFsNode(peerId);<a name="line.72"></a>
-<span class="sourceLineNo">073</span>    try {<a name="line.73"></a>
-<span class="sourceLineNo">074</span>      if (ZKUtil.checkExists(zookeeper, tableCFsNode) != -1) {<a name="line.74"></a>
-<span class="sourceLineNo">075</span>        String peerNode = getPeerNode(peerId);<a name="line.75"></a>
-<span class="sourceLineNo">076</span>        ReplicationPeerConfig rpc = getReplicationPeerConig(peerNode);<a name="line.76"></a>
-<span class="sourceLineNo">077</span>        // We only need to copy data from tableCFs node to rpc Node the first time hmaster start.<a name="line.77"></a>
-<span class="sourceLineNo">078</span>        if (rpc.getTableCFsMap() == null || rpc.getTableCFsMap().isEmpty()) {<a name="line.78"></a>
-<span class="sourceLineNo">079</span>          // we copy TableCFs node into PeerNode<a name="line.79"></a>
-<span class="sourceLineNo">080</span>          LOG.info("copy tableCFs into peerNode:" + peerId);<a name="line.80"></a>
-<span class="sourceLineNo">081</span>          ReplicationProtos.TableCF[] tableCFs =<a name="line.81"></a>
-<span class="sourceLineNo">082</span>                  ReplicationPeerConfigUtil.parseTableCFs(<a name="line.82"></a>
-<span class="sourceLineNo">083</span>                          ZKUtil.getData(this.zookeeper, tableCFsNode));<a name="line.83"></a>
-<span class="sourceLineNo">084</span>          if (tableCFs != null &amp;&amp; tableCFs.length &gt; 0) {<a name="line.84"></a>
-<span class="sourceLineNo">085</span>            rpc.setTableCFsMap(ReplicationPeerConfigUtil.convert2Map(tableCFs));<a name="line.85"></a>
-<span class="sourceLineNo">086</span>            ZKUtil.setData(this.zookeeper, peerNode,<a name="line.86"></a>
-<span class="sourceLineNo">087</span>              ReplicationPeerConfigUtil.toByteArray(rpc));<a name="line.87"></a>
-<span class="sourceLineNo">088</span>          }<a name="line.88"></a>
-<span class="sourceLineNo">089</span>        } else {<a name="line.89"></a>
-<span class="sourceLineNo">090</span>          LOG.info("No tableCFs in peerNode:" + peerId);<a name="line.90"></a>
-<span class="sourceLineNo">091</span>        }<a name="line.91"></a>
-<span class="sourceLineNo">092</span>      }<a name="line.92"></a>
-<span class="sourceLineNo">093</span>    } catch (KeeperException e) {<a name="line.93"></a>
-<span class="sourceLineNo">094</span>      LOG.warn("NOTICE!! Update peerId failed, peerId=" + peerId, e);<a name="line.94"></a>
-<span class="sourceLineNo">095</span>      return false;<a name="line.95"></a>
-<span class="sourceLineNo">096</span>    } catch (InterruptedException e) {<a name="line.96"></a>
-<span class="sourceLineNo">097</span>      LOG.warn("NOTICE!! Update peerId failed, peerId=" + peerId, e);<a name="line.97"></a>
-<span class="sourceLineNo">098</span>      return false;<a name="line.98"></a>
-<span class="sourceLineNo">099</span>    } catch (IOException e) {<a name="line.99"></a>
-<span class="sourceLineNo">100</span>      LOG.warn("NOTICE!! Update peerId failed, peerId=" + peerId, e);<a name="line.100"></a>
-<span class="sourceLineNo">101</span>      return false;<a name="line.101"></a>
-<span class="sourceLineNo">102</span>    }<a name="line.102"></a>
-<span class="sourceLineNo">103</span>    return true;<a name="line.103"></a>
-<span class="sourceLineNo">104</span>  }<a name="line.104"></a>
-<span class="sourceLineNo">105</span><a name="line.105"></a>
-<span class="sourceLineNo">106</span>  private ReplicationPeerConfig getReplicationPeerConig(String peerNode)<a name="line.106"></a>
-<span class="sourceLineNo">107</span>          throws KeeperException, InterruptedException {<a name="line.107"></a>
-<span class="sourceLineNo">108</span>    byte[] data = null;<a name="line.108"></a>
-<span class="sourceLineNo">109</span>    data = ZKUtil.getData(this.zookeeper, peerNode);<a name="line.109"></a>
-<span class="sourceLineNo">110</span>    if (data == null) {<a name="line.110"></a>
-<span class="sourceLineNo">111</span>      LOG.error("Could not get configuration for " +<a name="line.111"></a>
-<span class="sourceLineNo">112</span>              "peer because it doesn't exist. peer=" + peerNode);<a name="line.112"></a>
-<span class="sourceLineNo">113</span>      return null;<a name="line.113"></a>
-<span class="sourceLineNo">114</span>    }<a name="line.114"></a>
-<span class="sourceLineNo">115</span>    try {<a name="line.115"></a>
-<span class="sourceLineNo">116</span>      return ReplicationPeerConfigUtil.parsePeerFrom(data);<a name="line.116"></a>
-<span class="sourceLineNo">117</span>    } catch (DeserializationException e) {<a name="line.117"></a>
-<span class="sourceLineNo">118</span>      LOG.warn("Failed to parse cluster key from peer=" + peerNode);<a name="line.118"></a>
-<span class="sourceLineNo">119</span>      return null;<a name="line.119"></a>
-<span class="sourceLineNo">120</span>    }<a name="line.120"></a>
-<span class="sourceLineNo">121</span>  }<a name="line.121"></a>
-<span class="sourceLineNo">122</span><a name="line.122"></a>
-<span class="sourceLineNo">123</span>  private static void printUsageAndExit() {<a name="line.123"></a>
-<span class="sourceLineNo">124</span>    System.err.printf("Usage: hbase org.apache.hadoop.hbase.replication.master.TableCFsUpdater [options]");<a name="line.124"></a>
-<span class="sourceLineNo">125</span>    System.err.println(" where [options] are:");<a name="line.125"></a>
-<span class="sourceLineNo">126</span>    System.err.println("  -h|-help    Show this help and exit.");<a name="line.126"></a>
-<span class="sourceLineNo">127</span>    System.err.println("  update      Copy table-cfs to replication peer config");<a name="line.127"></a>
-<span class="sourceLineNo">128</span>    System.err.println();<a name="line.128"></a>
-<span class="sourceLineNo">129</span>    System.exit(1);<a name="line.129"></a>
-<span class="sourceLineNo">130</span>  }<a name="line.130"></a>
-<span class="sourceLineNo">131</span><a name="line.131"></a>
-<span class="sourceLineNo">132</span>  public static void main(String[] args) throws Exception {<a name="line.132"></a>
-<span class="sourceLineNo">133</span>    if (args.length != 1) {<a name="line.133"></a>
-<span class="sourceLineNo">134</span>      printUsageAndExit();<a name="line.134"></a>
-<span class="sourceLineNo">135</span>    }<a name="line.135"></a>
-<span class="sourceLineNo">136</span>    if (args[0].equals("-help") || args[0].equals("-h")) {<a name="line.136"></a>
-<span class="sourceLineNo">137</span>      printUsageAndExit();<a name="line.137"></a>
-<span class="sourceLineNo">138</span>    } else if (args[0].equals("update")) {<a name="line.138"></a>
-<span class="sourceLineNo">139</span>      Configuration conf = HBaseConfiguration.create();<a name="line.139"></a>
-<span class="sourceLineNo">140</span>      ZKWatcher zkw = new ZKWatcher(conf, "TableCFsUpdater", null);<a name="line.140"></a>
-<span class="sourceLineNo">141</span>      try {<a name="line.141"></a>
-<span class="sourceLineNo">142</span>        TableCFsUpdater tableCFsUpdater = new TableCFsUpdater(zkw, conf, null);<a name="line.142"></a>
-<span class="sourceLineNo">143</span>        tableCFsUpdater.update();<a name="line.143"></a>
-<span class="sourceLineNo">144</span>      } finally {<a name="line.144"></a>
-<span class="sourceLineNo">145</span>        zkw.close();<a name="line.145"></a>
-<span class="sourceLineNo">146</span>      }<a name="line.146"></a>
-<span class="sourceLineNo">147</span>    } else {<a name="line.147"></a>
-<span class="sourceLineNo">148</span>      printUsageAndExit();<a name="line.148"></a>
-<span class="sourceLineNo">149</span>    }<a name="line.149"></a>
-<span class="sourceLineNo">150</span>  }<a name="line.150"></a>
-<span class="sourceLineNo">151</span>}<a name="line.151"></a>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</pre>
-</div>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.DumpOptions.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.DumpOptions.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.DumpOptions.html
index 5c9af16..b1004a1 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.DumpOptions.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.DumpOptions.html
@@ -398,7 +398,7 @@
 <span class="sourceLineNo">390</span>   *  return total size in bytes from a list of WALs<a name="line.390"></a>
 <span class="sourceLineNo">391</span>   */<a name="line.391"></a>
 <span class="sourceLineNo">392</span>  private long getTotalWALSize(FileSystem fs, List&lt;String&gt; wals, String server) throws IOException {<a name="line.392"></a>
-<span class="sourceLineNo">393</span>    int size = 0;<a name="line.393"></a>
+<span class="sourceLineNo">393</span>    long size = 0;<a name="line.393"></a>
 <span class="sourceLineNo">394</span>    FileStatus fileStatus;<a name="line.394"></a>
 <span class="sourceLineNo">395</span><a name="line.395"></a>
 <span class="sourceLineNo">396</span>    for (String wal : wals) {<a name="line.396"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.WarnOnlyAbortable.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.WarnOnlyAbortable.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.WarnOnlyAbortable.html
index 5c9af16..b1004a1 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.WarnOnlyAbortable.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.WarnOnlyAbortable.html
@@ -398,7 +398,7 @@
 <span class="sourceLineNo">390</span>   *  return total size in bytes from a list of WALs<a name="line.390"></a>
 <span class="sourceLineNo">391</span>   */<a name="line.391"></a>
 <span class="sourceLineNo">392</span>  private long getTotalWALSize(FileSystem fs, List&lt;String&gt; wals, String server) throws IOException {<a name="line.392"></a>
-<span class="sourceLineNo">393</span>    int size = 0;<a name="line.393"></a>
+<span class="sourceLineNo">393</span>    long size = 0;<a name="line.393"></a>
 <span class="sourceLineNo">394</span>    FileStatus fileStatus;<a name="line.394"></a>
 <span class="sourceLineNo">395</span><a name="line.395"></a>
 <span class="sourceLineNo">396</span>    for (String wal : wals) {<a name="line.396"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.WarnOnlyStoppable.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.WarnOnlyStoppable.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.WarnOnlyStoppable.html
index 5c9af16..b1004a1 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.WarnOnlyStoppable.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.WarnOnlyStoppable.html
@@ -398,7 +398,7 @@
 <span class="sourceLineNo">390</span>   *  return total size in bytes from a list of WALs<a name="line.390"></a>
 <span class="sourceLineNo">391</span>   */<a name="line.391"></a>
 <span class="sourceLineNo">392</span>  private long getTotalWALSize(FileSystem fs, List&lt;String&gt; wals, String server) throws IOException {<a name="line.392"></a>
-<span class="sourceLineNo">393</span>    int size = 0;<a name="line.393"></a>
+<span class="sourceLineNo">393</span>    long size = 0;<a name="line.393"></a>
 <span class="sourceLineNo">394</span>    FileStatus fileStatus;<a name="line.394"></a>
 <span class="sourceLineNo">395</span><a name="line.395"></a>
 <span class="sourceLineNo">396</span>    for (String wal : wals) {<a name="line.396"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.html
index 5c9af16..b1004a1 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/DumpReplicationQueues.html
@@ -398,7 +398,7 @@
 <span class="sourceLineNo">390</span>   *  return total size in bytes from a list of WALs<a name="line.390"></a>
 <span class="sourceLineNo">391</span>   */<a name="line.391"></a>
 <span class="sourceLineNo">392</span>  private long getTotalWALSize(FileSystem fs, List&lt;String&gt; wals, String server) throws IOException {<a name="line.392"></a>
-<span class="sourceLineNo">393</span>    int size = 0;<a name="line.393"></a>
+<span class="sourceLineNo">393</span>    long size = 0;<a name="line.393"></a>
 <span class="sourceLineNo">394</span>    FileStatus fileStatus;<a name="line.394"></a>
 <span class="sourceLineNo">395</span><a name="line.395"></a>
 <span class="sourceLineNo">396</span>    for (String wal : wals) {<a name="line.396"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/export_control.html
----------------------------------------------------------------------
diff --git a/export_control.html b/export_control.html
index 4d1c591..9d89900 100644
--- a/export_control.html
+++ b/export_control.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; 
       Export Control
@@ -336,7 +336,7 @@ for more details.</p>
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/hbase-annotations/checkstyle.html
----------------------------------------------------------------------
diff --git a/hbase-annotations/checkstyle.html b/hbase-annotations/checkstyle.html
index be845cc..eea659f 100644
--- a/hbase-annotations/checkstyle.html
+++ b/hbase-annotations/checkstyle.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase - Annotations &#x2013; Checkstyle Results</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -178,7 +178,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/hbase-annotations/dependencies.html
----------------------------------------------------------------------
diff --git a/hbase-annotations/dependencies.html b/hbase-annotations/dependencies.html
index 4034005..19c3880 100644
--- a/hbase-annotations/dependencies.html
+++ b/hbase-annotations/dependencies.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase - Annotations &#x2013; Project Dependencies</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -272,7 +272,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/hbase-annotations/dependency-convergence.html
----------------------------------------------------------------------
diff --git a/hbase-annotations/dependency-convergence.html b/hbase-annotations/dependency-convergence.html
index a953b13..a7ca896 100644
--- a/hbase-annotations/dependency-convergence.html
+++ b/hbase-annotations/dependency-convergence.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase - Annotations &#x2013; Reactor Dependency Convergence</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -838,7 +838,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/hbase-annotations/dependency-info.html
----------------------------------------------------------------------
diff --git a/hbase-annotations/dependency-info.html b/hbase-annotations/dependency-info.html
index 0b536a9..a6330e4 100644
--- a/hbase-annotations/dependency-info.html
+++ b/hbase-annotations/dependency-info.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase - Annotations &#x2013; Dependency Information</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -147,7 +147,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/hbase-annotations/dependency-management.html
----------------------------------------------------------------------
diff --git a/hbase-annotations/dependency-management.html b/hbase-annotations/dependency-management.html
index 76252c1..c5f5a19 100644
--- a/hbase-annotations/dependency-management.html
+++ b/hbase-annotations/dependency-management.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase - Annotations &#x2013; Project Dependency Management</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -804,7 +804,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/hbase-annotations/index.html
----------------------------------------------------------------------
diff --git a/hbase-annotations/index.html b/hbase-annotations/index.html
index 1257a6c..e1a3b27 100644
--- a/hbase-annotations/index.html
+++ b/hbase-annotations/index.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase - Annotations &#x2013; About</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -119,7 +119,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/hbase-annotations/integration.html
----------------------------------------------------------------------
diff --git a/hbase-annotations/integration.html b/hbase-annotations/integration.html
index 4281cff..5326ecd 100644
--- a/hbase-annotations/integration.html
+++ b/hbase-annotations/integration.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase - Annotations &#x2013; CI Management</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -126,7 +126,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/hbase-annotations/issue-tracking.html
----------------------------------------------------------------------
diff --git a/hbase-annotations/issue-tracking.html b/hbase-annotations/issue-tracking.html
index 47dfaff..9d31f0f 100644
--- a/hbase-annotations/issue-tracking.html
+++ b/hbase-annotations/issue-tracking.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase - Annotations &#x2013; Issue Management</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -123,7 +123,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/hbase-annotations/license.html
----------------------------------------------------------------------
diff --git a/hbase-annotations/license.html b/hbase-annotations/license.html
index d89db6d..aa9ea64 100644
--- a/hbase-annotations/license.html
+++ b/hbase-annotations/license.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase - Annotations &#x2013; Project Licenses</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -326,7 +326,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/9118853f/hbase-annotations/mail-lists.html
----------------------------------------------------------------------
diff --git a/hbase-annotations/mail-lists.html b/hbase-annotations/mail-lists.html
index ee6103e..8063137 100644
--- a/hbase-annotations/mail-lists.html
+++ b/hbase-annotations/mail-lists.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="20171122" />
+    <meta name="Date-Revision-yyyymmdd" content="20171123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase - Annotations &#x2013; Project Mailing Lists</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -176,7 +176,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-11-22</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-11-23</li>
             </p>
                 </div>
 


Mime
View raw message