hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [5/5] hbase git commit: HBASE-19128 Purge Distributed Log Replay from codebase, configurations, text; mark the feature as unsupported, broken.
Date Wed, 08 Nov 2017 01:43:32 GMT
HBASE-19128 Purge Distributed Log Replay from codebase, configurations, text; mark the feature as unsupported, broken.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4132314f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4132314f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4132314f

Branch: refs/heads/master
Commit: 4132314f51951af43f4f56d9886233b3ba417903
Parents: dc127df
Author: Apekshit Sharma <appy@apache.org>
Authored: Fri Nov 3 14:34:15 2017 -0700
Committer: Apekshit Sharma <appy@apache.org>
Committed: Tue Nov 7 17:43:14 2017 -0800

----------------------------------------------------------------------
 .../exceptions/RegionInRecoveryException.java   |  44 -
 .../apache/hadoop/hbase/executor/EventType.java |   3 +-
 .../hbase/shaded/protobuf/ProtobufUtil.java     |   2 +-
 .../hbase/shaded/protobuf/RequestConverter.java |  16 +-
 .../apache/hadoop/hbase/zookeeper/ZKUtil.java   |  54 -
 .../hadoop/hbase/zookeeper/ZNodePaths.java      |  11 +-
 .../hbase/zookeeper/ZooKeeperWatcher.java       |   1 -
 .../hbase/zookeeper/TestZooKeeperWatcher.java   |   4 +-
 .../org/apache/hadoop/hbase/HConstants.java     |   7 -
 .../src/main/resources/hbase-default.xml        |   8 +-
 .../wal/MetricsEditsReplaySource.java           |  72 --
 .../wal/MetricsEditsReplaySourceImpl.java       |  76 --
 ...se.regionserver.wal.MetricsEditsReplaySource |  18 -
 .../src/main/protobuf/Admin.proto               |   4 +-
 .../src/main/protobuf/MasterProcedure.proto     |   4 +-
 .../src/main/protobuf/ZooKeeper.proto           |   7 +-
 hbase-protocol/src/main/protobuf/Admin.proto    |   4 +-
 .../src/main/protobuf/ZooKeeper.proto           |   7 +-
 .../org/apache/hadoop/hbase/SplitLogTask.java   |  37 +-
 .../SplitLogManagerCoordination.java            |  69 --
 .../SplitLogWorkerCoordination.java             |  12 +-
 .../ZKSplitLogManagerCoordination.java          | 394 +-------
 .../ZkSplitLogWorkerCoordination.java           |  80 +-
 .../hbase/coprocessor/RegionObserver.java       |   7 +-
 .../hadoop/hbase/master/MasterWalManager.java   |  29 -
 .../hadoop/hbase/master/SplitLogManager.java    | 147 +--
 .../master/procedure/RSProcedureDispatcher.java |   2 +-
 .../hadoop/hbase/regionserver/HRegion.java      | 119 +--
 .../hbase/regionserver/HRegionServer.java       | 112 ---
 .../hbase/regionserver/RSRpcServices.java       |  24 -
 .../hadoop/hbase/regionserver/Region.java       |   3 -
 .../regionserver/RegionCoprocessorHost.java     |  19 -
 .../regionserver/RegionServerServices.java      |   8 +-
 .../hbase/regionserver/SplitLogWorker.java      |   8 +-
 .../handler/FinishRegionRecoveringHandler.java  |  56 --
 .../handler/WALSplitterHandler.java             |  18 +-
 .../regionserver/wal/MetricsWALEditsReplay.java |  59 --
 .../regionserver/wal/WALEditsReplaySink.java    | 227 -----
 .../RegionReplicaReplicationEndpoint.java       |  41 -
 .../hbase/security/access/AccessController.java |  22 +-
 .../visibility/VisibilityController.java        |  16 +-
 .../apache/hadoop/hbase/wal/WALSplitter.java    | 705 +------------
 .../zookeeper/RecoveringRegionWatcher.java      |  92 --
 .../hadoop/hbase/zookeeper/ZKSplitLog.java      | 114 +--
 .../hadoop/hbase/MockRegionServerServices.java  |   6 -
 .../org/apache/hadoop/hbase/TestIOFencing.java  |   2 +-
 .../apache/hadoop/hbase/TestSerialization.java  |  13 -
 .../hadoop/hbase/client/TestReplicasClient.java |   2 +-
 .../hadoop/hbase/master/MockRegionServer.java   |   5 -
 .../master/TestDistributedLogSplitting.java     | 996 +------------------
 .../hbase/master/TestMasterWalManager.java      | 105 --
 .../hbase/master/TestSplitLogManager.java       |  83 +-
 .../hadoop/hbase/regionserver/TestHRegion.java  |  90 --
 .../regionserver/TestPerColumnFamilyFlush.java  |  12 -
 .../regionserver/TestRegionReplicaFailover.java |  20 -
 .../regionserver/TestRegionServerNoMaster.java  |   4 +-
 .../hbase/regionserver/TestSplitLogWorker.java  |  27 +-
 .../regionserver/TestSplitWalDataLoss.java      |   1 -
 .../regionserver/wal/AbstractTestWALReplay.java |  14 +-
 ...egionReplicaReplicationEndpointNoMaster.java |  52 -
 ...sibilityLabelReplicationWithExpAsString.java |   1 -
 .../visibility/TestVisibilityLabels.java        |  14 +-
 .../TestVisibilityLabelsReplication.java        |   1 -
 ...VisibilityLabelsWithCustomVisLabService.java |   2 -
 ...ibilityLabelsWithDefaultVisLabelService.java |   2 -
 .../TestVisibilityLabelsWithDeletes.java        |   3 +-
 .../TestVisibilityWithCheckAuths.java           |   1 -
 .../hbase/wal/TestWALReaderOnSecureWAL.java     |   9 +-
 .../apache/hadoop/hbase/wal/TestWALSplit.java   |  15 +-
 src/main/asciidoc/_chapters/architecture.adoc   |  27 +-
 src/main/asciidoc/_chapters/hbase-default.adoc  |  20 +-
 src/main/asciidoc/_chapters/upgrading.adoc      |  10 +-
 72 files changed, 170 insertions(+), 4129 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionInRecoveryException.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionInRecoveryException.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionInRecoveryException.java
deleted file mode 100644
index 82f6b30..0000000
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionInRecoveryException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.exceptions;
-
-import org.apache.hadoop.hbase.NotServingRegionException;
-import org.apache.yetus.audience.InterfaceAudience;
-
-/**
- * Thrown when a read request issued against a region which is in recovering state.
- */
-@InterfaceAudience.Public
-public class RegionInRecoveryException extends NotServingRegionException {
-  private static final long serialVersionUID = 327302071153799L;
-
-  /** default constructor */
-  public RegionInRecoveryException() {
-    super();
-  }
-
-  /**
-   * Constructor
-   * @param s message
-   */
-  public RegionInRecoveryException(String s) {
-    super(s);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-client/src/main/java/org/apache/hadoop/hbase/executor/EventType.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/executor/EventType.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/executor/EventType.java
index ca76e96..03eb55a 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/executor/EventType.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/executor/EventType.java
@@ -259,8 +259,7 @@ public enum EventType {
   RS_PARALLEL_SEEK          (80, ExecutorType.RS_PARALLEL_SEEK),
 
   /**
-   * RS wal recovery work items(either creating recover.edits or directly replay wals)
-   * to be executed on the RS.<br>
+   * RS wal recovery work items (splitting wals) to be executed on the RS.<br>
    *
    * RS_LOG_REPLAY
    */

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
index 7953b8a..96b0b61 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
@@ -1806,7 +1806,7 @@ public final class ProtobufUtil {
       final AdminService.BlockingInterface admin, ServerName server, final org.apache.hadoop.hbase.client.RegionInfo region)
           throws IOException {
     OpenRegionRequest request =
-      RequestConverter.buildOpenRegionRequest(server, region, null, null);
+      RequestConverter.buildOpenRegionRequest(server, region, null);
     try {
       admin.openRegion(controller, request);
     } catch (ServiceException se) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
index 4ad28f2..2da9c07 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
@@ -866,15 +866,14 @@ public final class RequestConverter {
    * Create a protocol buffer OpenRegionRequest to open a list of regions
    * @param server the serverName for the RPC
    * @param regionOpenInfos info of a list of regions to open
-   * @param openForReplay whether open for replay
    * @return a protocol buffer OpenRegionRequest
    */
   public static OpenRegionRequest buildOpenRegionRequest(ServerName server,
-      final List<Pair<RegionInfo, List<ServerName>>> regionOpenInfos, Boolean openForReplay) {
+      final List<Pair<RegionInfo, List<ServerName>>> regionOpenInfos) {
     OpenRegionRequest.Builder builder = OpenRegionRequest.newBuilder();
     for (Pair<RegionInfo, List<ServerName>> regionOpenInfo : regionOpenInfos) {
       builder.addOpenInfo(buildRegionOpenInfo(regionOpenInfo.getFirst(),
-        regionOpenInfo.getSecond(), openForReplay));
+        regionOpenInfo.getSecond()));
     }
     if (server != null) {
       builder.setServerStartCode(server.getStartcode());
@@ -889,13 +888,12 @@ public final class RequestConverter {
    * @param server the serverName for the RPC
    * @param region the region to open
    * @param favoredNodes a list of favored nodes
-   * @param openForReplay whether open for replay
    * @return a protocol buffer OpenRegionRequest
    */
   public static OpenRegionRequest buildOpenRegionRequest(ServerName server,
-      final RegionInfo region, List<ServerName> favoredNodes, Boolean openForReplay) {
+      final RegionInfo region, List<ServerName> favoredNodes) {
     OpenRegionRequest.Builder builder = OpenRegionRequest.newBuilder();
-    builder.addOpenInfo(buildRegionOpenInfo(region, favoredNodes, openForReplay));
+    builder.addOpenInfo(buildRegionOpenInfo(region, favoredNodes));
     if (server != null) {
       builder.setServerStartCode(server.getStartcode());
     }
@@ -1522,8 +1520,7 @@ public final class RequestConverter {
    * Create a RegionOpenInfo based on given region info and version of offline node
    */
   public static RegionOpenInfo buildRegionOpenInfo(
-      final RegionInfo region,
-      final List<ServerName> favoredNodes, Boolean openForReplay) {
+      final RegionInfo region, final List<ServerName> favoredNodes) {
     RegionOpenInfo.Builder builder = RegionOpenInfo.newBuilder();
     builder.setRegion(ProtobufUtil.toRegionInfo(region));
     if (favoredNodes != null) {
@@ -1531,9 +1528,6 @@ public final class RequestConverter {
         builder.addFavoredNodes(ProtobufUtil.toServerName(server));
       }
     }
-    if(openForReplay != null) {
-      builder.setOpenForDistributedLogReplay(openForReplay);
-    }
     return builder.build();
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
index 060792f..717d969 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
@@ -46,10 +46,7 @@ import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.hadoop.hbase.exceptions.DeserializationException;
 import org.apache.hadoop.hbase.security.Superusers;
 import org.apache.hadoop.hbase.shaded.com.google.protobuf.InvalidProtocolBufferException;
-import org.apache.hadoop.hbase.shaded.com.google.protobuf.UnsafeByteOperations;
 import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIds;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.ReplicationProtos;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Threads;
@@ -2089,55 +2086,4 @@ public class ZKUtil {
       return 0;
     }
   }
-
-  /**
-   * @param regionLastFlushedSequenceId the flushed sequence id of a region which is the min of its
-   *          store max seq ids
-   * @param storeSequenceIds column family to sequence Id map
-   * @return Serialized protobuf of <code>RegionSequenceIds</code> with pb magic prefix prepended
-   *         suitable for use to filter wal edits in distributedLogReplay mode
-   */
-  public static byte[] regionSequenceIdsToByteArray(final Long regionLastFlushedSequenceId,
-      final Map<byte[], Long> storeSequenceIds) {
-    ClusterStatusProtos.RegionStoreSequenceIds.Builder regionSequenceIdsBuilder =
-        ClusterStatusProtos.RegionStoreSequenceIds.newBuilder();
-    ClusterStatusProtos.StoreSequenceId.Builder storeSequenceIdBuilder =
-        ClusterStatusProtos.StoreSequenceId.newBuilder();
-    if (storeSequenceIds != null) {
-      for (Map.Entry<byte[], Long> e : storeSequenceIds.entrySet()){
-        byte[] columnFamilyName = e.getKey();
-        Long curSeqId = e.getValue();
-        storeSequenceIdBuilder.setFamilyName(UnsafeByteOperations.unsafeWrap(columnFamilyName));
-        storeSequenceIdBuilder.setSequenceId(curSeqId);
-        regionSequenceIdsBuilder.addStoreSequenceId(storeSequenceIdBuilder.build());
-        storeSequenceIdBuilder.clear();
-      }
-    }
-    regionSequenceIdsBuilder.setLastFlushedSequenceId(regionLastFlushedSequenceId);
-    byte[] result = regionSequenceIdsBuilder.build().toByteArray();
-    return ProtobufUtil.prependPBMagic(result);
-  }
-
-  /**
-   * @param bytes Content of serialized data of RegionStoreSequenceIds
-   * @return a RegionStoreSequenceIds object
-   * @throws DeserializationException
-   */
-  public static RegionStoreSequenceIds parseRegionStoreSequenceIds(final byte[] bytes)
-      throws DeserializationException {
-    if (bytes == null || !ProtobufUtil.isPBMagicPrefix(bytes)) {
-      throw new DeserializationException("Unable to parse RegionStoreSequenceIds.");
-    }
-    RegionStoreSequenceIds.Builder regionSequenceIdsBuilder =
-        ClusterStatusProtos.RegionStoreSequenceIds.newBuilder();
-    int pblen = ProtobufUtil.lengthOfPBMagic();
-    RegionStoreSequenceIds storeIds = null;
-    try {
-      ProtobufUtil.mergeFrom(regionSequenceIdsBuilder, bytes, pblen, bytes.length - pblen);
-      storeIds = regionSequenceIdsBuilder.build();
-    } catch (IOException e) {
-      throw new DeserializationException(e);
-    }
-    return storeIds;
-  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZNodePaths.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZNodePaths.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZNodePaths.java
index 84b53d8..2a0764d 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZNodePaths.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZNodePaths.java
@@ -72,8 +72,6 @@ public class ZNodePaths {
   public final String switchZNode;
   // znode containing the lock for the tables
   public final String tableLockZNode;
-  // znode containing the state of recovering regions
-  public final String recoveringRegionsZNode;
   // znode containing namespace descriptors
   public final String namespaceZNode;
   // znode of indicating master maintenance mode
@@ -116,8 +114,6 @@ public class ZNodePaths {
     switchZNode = ZKUtil.joinZNode(baseZNode, conf.get("zookeeper.znode.switch", "switch"));
     tableLockZNode = ZKUtil.joinZNode(baseZNode,
       conf.get("zookeeper.znode.tableLock", "table-lock"));
-    recoveringRegionsZNode = ZKUtil.joinZNode(baseZNode,
-      conf.get("zookeeper.znode.recovering.regions", "recovering-regions"));
     namespaceZNode = ZKUtil.joinZNode(baseZNode,
       conf.get("zookeeper.znode.namespace", "namespace"));
     masterMaintZNode = ZKUtil.joinZNode(baseZNode,
@@ -142,10 +138,9 @@ public class ZNodePaths {
         + ", clusterIdZNode=" + clusterIdZNode + ", splitLogZNode=" + splitLogZNode
         + ", balancerZNode=" + balancerZNode + ", regionNormalizerZNode=" + regionNormalizerZNode
         + ", switchZNode=" + switchZNode + ", tableLockZNode=" + tableLockZNode
-        + ", recoveringRegionsZNode=" + recoveringRegionsZNode + ", namespaceZNode="
-        + namespaceZNode + ", masterMaintZNode=" + masterMaintZNode + ", replicationZNode="
-        + replicationZNode + ", peersZNode=" + peersZNode + ", queuesZNode=" + queuesZNode
-        + ", hfileRefsZNode=" + hfileRefsZNode + "]";
+        + ", namespaceZNode=" + namespaceZNode + ", masterMaintZNode=" + masterMaintZNode
+        + ", replicationZNode=" + replicationZNode + ", peersZNode=" + peersZNode
+        + ", queuesZNode=" + queuesZNode + ", hfileRefsZNode=" + hfileRefsZNode + "]";
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
index 30913dc..49113d0 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
@@ -158,7 +158,6 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable {
       ZKUtil.createAndFailSilent(this, znodePaths.splitLogZNode);
       ZKUtil.createAndFailSilent(this, znodePaths.backupMasterAddressesZNode);
       ZKUtil.createAndFailSilent(this, znodePaths.tableLockZNode);
-      ZKUtil.createAndFailSilent(this, znodePaths.recoveringRegionsZNode);
       ZKUtil.createAndFailSilent(this, znodePaths.masterMaintZNode);
     } catch (KeeperException e) {
       throw new ZooKeeperConnectionException(

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperWatcher.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperWatcher.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperWatcher.java
index de2ec2a..4b6ef96 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperWatcher.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperWatcher.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertTrue;
 import java.io.IOException;
 
 import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.ZooKeeperConnectionException;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -33,7 +32,7 @@ import org.junit.experimental.categories.Category;
 public class TestZooKeeperWatcher {
 
   @Test
-  public void testIsClientReadable() throws ZooKeeperConnectionException, IOException {
+  public void testIsClientReadable() throws IOException {
     ZooKeeperWatcher watcher = new ZooKeeperWatcher(HBaseConfiguration.create(),
         "testIsClientReadable", null, false);
 
@@ -50,7 +49,6 @@ public class TestZooKeeperWatcher {
     assertFalse(watcher.isClientReadable(watcher.znodePaths.regionNormalizerZNode));
     assertFalse(watcher.isClientReadable(watcher.znodePaths.clusterStateZNode));
     assertFalse(watcher.isClientReadable(watcher.znodePaths.drainingZNode));
-    assertFalse(watcher.isClientReadable(watcher.znodePaths.recoveringRegionsZNode));
     assertFalse(watcher.isClientReadable(watcher.znodePaths.splitLogZNode));
     assertFalse(watcher.isClientReadable(watcher.znodePaths.backupMasterAddressesZNode));
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 45f22a6..cc9fc57 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -993,13 +993,6 @@ public final class HConstants {
 
   public static final String LOCALHOST_IP = "127.0.0.1";
 
-  /** Conf key that enables unflushed WAL edits directly being replayed to region servers */
-  public static final String DISTRIBUTED_LOG_REPLAY_KEY = "hbase.master.distributed.log.replay";
-  public static final boolean DEFAULT_DISTRIBUTED_LOG_REPLAY_CONFIG = false;
-  public static final String DISALLOW_WRITES_IN_RECOVERING =
-      "hbase.regionserver.disallow.writes.when.recovering";
-  public static final boolean DEFAULT_DISALLOW_WRITES_IN_RECOVERING_CONFIG = false;
-
   public static final String REGION_SERVER_HANDLER_COUNT = "hbase.regionserver.handler.count";
   public static final int DEFAULT_REGION_SERVER_HANDLER_COUNT = 30;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-common/src/main/resources/hbase-default.xml
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/resources/hbase-default.xml b/hbase-common/src/main/resources/hbase-default.xml
index 79af2d1..28e9b4d 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -930,8 +930,7 @@ possible configurations would overwhelm and obscure the important.
       <value>3</value>
       <description>The HFile format version to use for new files.
       Version 3 adds support for tags in hfiles (See http://hbase.apache.org/book.html#hbase.tags).
-      Distributed Log Replay requires that tags are enabled. Also see the configuration
-      'hbase.replication.rpc.codec'.
+      Also see the configuration 'hbase.replication.rpc.codec'.
       </description>
   </property>
   <property>
@@ -1654,9 +1653,8 @@ possible configurations would overwhelm and obscure the important.
       of written. This configure is to set how long (in ms) we will wait before next checking if a
       log can not push right now because there are some logs written before it have not been pushed.
       A larger waiting will decrease the number of queries on hbase:meta but will enlarge the delay
-      of replication. This feature relies on zk-less assignment, and conflicts with distributed log
-      replay. So users must set hbase.assignment.usezk and hbase.master.distributed.log.replay to
-      false to support it.
+      of replication. This feature relies on zk-less assignment, so users must set
+      hbase.assignment.usezk to false to support it.
     </description>
   </property>
   <!-- Static Web User Filter properties. -->

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/wal/MetricsEditsReplaySource.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/wal/MetricsEditsReplaySource.java b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/wal/MetricsEditsReplaySource.java
deleted file mode 100644
index 4f8cb36..0000000
--- a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/wal/MetricsEditsReplaySource.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hbase.regionserver.wal;
-
-import org.apache.hadoop.hbase.metrics.BaseSource;
-
-/**
- * Interface of the source that will export metrics about log replay statistics when recovering a
- * region server in distributedLogReplay mode
- */
-public interface MetricsEditsReplaySource extends BaseSource {
-
-  /**
-   * The name of the metrics
-   */
-  String METRICS_NAME = "replay";
-
-  /**
-   * The name of the metrics context that metrics will be under.
-   */
-  String METRICS_CONTEXT = "regionserver";
-
-  /**
-   * Description
-   */
-  String METRICS_DESCRIPTION = "Metrics about HBase RegionServer WAL Edits Replay";
-
-  /**
-   * The name of the metrics context that metrics will be under in jmx
-   */
-  String METRICS_JMX_CONTEXT = "RegionServer,sub=" + METRICS_NAME;
-
-
-  String REPLAY_TIME_NAME = "replayTime";
-  String REPLAY_TIME_DESC = "Time an replay operation took.";
-  String REPLAY_BATCH_SIZE_NAME = "replayBatchSize";
-  String REPLAY_BATCH_SIZE_DESC = "Number of changes in each replay batch.";
-  String REPLAY_DATA_SIZE_NAME = "replayDataSize";
-  String REPLAY_DATA_SIZE_DESC = "Size (in bytes) of the data of each replay.";
-
-  /**
-   * Add the time a replay command took
-   */
-  void updateReplayTime(long time);
-
-  /**
-   * Add the batch size of each replay
-   */
-  void updateReplayBatchSize(long size);
-
-  /**
-   * Add the payload data size of each replay
-   */
-  void updateReplayDataSize(long size);
-
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/wal/MetricsEditsReplaySourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/wal/MetricsEditsReplaySourceImpl.java b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/wal/MetricsEditsReplaySourceImpl.java
deleted file mode 100644
index b5d4971..0000000
--- a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/wal/MetricsEditsReplaySourceImpl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hbase.regionserver.wal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.yetus.audience.InterfaceAudience;
-import org.apache.hadoop.hbase.metrics.BaseSourceImpl;
-import org.apache.hadoop.metrics2.MetricHistogram;
-
-/**
- * Hadoop1 implementation of MetricsMasterSource. Implements BaseSource through BaseSourceImpl,
- * following the pattern
- */
-@InterfaceAudience.Private
-public class MetricsEditsReplaySourceImpl extends BaseSourceImpl implements
-    MetricsEditsReplaySource {
-
-  private static final Log LOG = LogFactory.getLog(MetricsEditsReplaySourceImpl.class.getName());
-
-  private MetricHistogram replayTimeHisto;
-  private MetricHistogram replayBatchSizeHisto;
-  private MetricHistogram replayDataSizeHisto;
-
-  public MetricsEditsReplaySourceImpl() {
-    this(METRICS_NAME, METRICS_DESCRIPTION, METRICS_CONTEXT, METRICS_JMX_CONTEXT);
-  }
-
-  public MetricsEditsReplaySourceImpl(String metricsName,
-                                      String metricsDescription,
-                                      String metricsContext,
-                                      String metricsJmxContext) {
-    super(metricsName, metricsDescription, metricsContext, metricsJmxContext);
-  }
-
-  @Override
-  public void init() {
-    super.init();
-    replayTimeHisto = metricsRegistry.newTimeHistogram(REPLAY_TIME_NAME, REPLAY_TIME_DESC);
-    replayBatchSizeHisto = metricsRegistry.newSizeHistogram(REPLAY_BATCH_SIZE_NAME,
-      REPLAY_BATCH_SIZE_DESC);
-    replayDataSizeHisto = metricsRegistry
-        .newSizeHistogram(REPLAY_DATA_SIZE_NAME, REPLAY_DATA_SIZE_DESC);
-  }
-
-  @Override
-  public void updateReplayTime(long time) {
-    replayTimeHisto.add(time);
-  }
-
-  @Override
-  public void updateReplayBatchSize(long size) {
-    replayBatchSizeHisto.add(size);
-  }
-
-  @Override
-  public void updateReplayDataSize(long size) {
-    replayDataSizeHisto.add(size);
-  }
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-hadoop2-compat/src/main/resources/META-INF/services/org.apache.hadoop.hbase.regionserver.wal.MetricsEditsReplaySource
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/main/resources/META-INF/services/org.apache.hadoop.hbase.regionserver.wal.MetricsEditsReplaySource b/hbase-hadoop2-compat/src/main/resources/META-INF/services/org.apache.hadoop.hbase.regionserver.wal.MetricsEditsReplaySource
deleted file mode 100644
index ed92e85..0000000
--- a/hbase-hadoop2-compat/src/main/resources/META-INF/services/org.apache.hadoop.hbase.regionserver.wal.MetricsEditsReplaySource
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.hadoop.hbase.regionserver.wal.MetricsEditsReplaySourceImpl

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-protocol-shaded/src/main/protobuf/Admin.proto
----------------------------------------------------------------------
diff --git a/hbase-protocol-shaded/src/main/protobuf/Admin.proto b/hbase-protocol-shaded/src/main/protobuf/Admin.proto
index dc4e324..10732fd 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Admin.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/Admin.proto
@@ -39,7 +39,7 @@ message GetRegionInfoRequest {
 message GetRegionInfoResponse {
   required RegionInfo region_info = 1;
   optional CompactionState compaction_state = 2;
-  optional bool isRecovering = 3;
+  // optional bool DEPRECATED_isRecovering = 3;
   // True if region is splittable, false otherwise.
   optional bool splittable = 4;
   // True if region is mergeable, false otherwise.
@@ -87,7 +87,7 @@ message OpenRegionRequest {
     optional uint32 version_of_offline_node = 2;
     repeated ServerName favored_nodes = 3;
     // open region for distributedLogReplay
-    optional bool openForDistributedLogReplay = 4;
+    // optional bool DEPRECATED_openForDistributedLogReplay = 4;
   }
 }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto
----------------------------------------------------------------------
diff --git a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto
index af9caef..635beaf 100644
--- a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto
@@ -278,7 +278,7 @@ message MergeTableRegionsStateData {
 
 message ServerCrashStateData {
   required ServerName server_name = 1;
-  optional bool distributed_log_replay = 2;
+  // optional bool DEPRECATED_distributed_log_replay = 2;
   repeated RegionInfo regions_on_crashed_server = 3;
   repeated RegionInfo regions_assigned = 4;
   optional bool carrying_meta = 5;
@@ -297,7 +297,7 @@ enum ServerCrashState {
   SERVER_CRASH_GET_REGIONS = 3;
   SERVER_CRASH_NO_SPLIT_LOGS = 4;
   SERVER_CRASH_SPLIT_LOGS = 5;
-  SERVER_CRASH_PREPARE_LOG_REPLAY = 6;
+  // Removed SERVER_CRASH_PREPARE_LOG_REPLAY = 6;
   // Removed SERVER_CRASH_CALC_REGIONS_TO_ASSIGN = 7;
   SERVER_CRASH_ASSIGN = 8;
   SERVER_CRASH_WAIT_ON_ASSIGN = 9;

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto
----------------------------------------------------------------------
diff --git a/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto b/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto
index 9d3d173..2a87ef6 100644
--- a/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto
@@ -78,14 +78,9 @@ message SplitLogTask {
     DONE = 3;
     ERR = 4;
   }
-  enum RecoveryMode {
-    UNKNOWN = 0;
-    LOG_SPLITTING = 1;
-    LOG_REPLAY = 2;
-  }
   required State state = 1;
   required ServerName server_name = 2;
-  optional RecoveryMode mode = 3 [default = UNKNOWN];
+  // optional RecoveryMode DEPRECATED_mode = 3 [default = UNKNOWN];
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-protocol/src/main/protobuf/Admin.proto
----------------------------------------------------------------------
diff --git a/hbase-protocol/src/main/protobuf/Admin.proto b/hbase-protocol/src/main/protobuf/Admin.proto
index 6096966..2c1d174 100644
--- a/hbase-protocol/src/main/protobuf/Admin.proto
+++ b/hbase-protocol/src/main/protobuf/Admin.proto
@@ -36,7 +36,7 @@ message GetRegionInfoRequest {
 message GetRegionInfoResponse {
   required RegionInfo region_info = 1;
   optional CompactionState compaction_state = 2;
-  optional bool isRecovering = 3;
+  // optional bool DEPRECATED_isRecovering = 3;
 
   enum CompactionState {
     NONE = 0;
@@ -78,7 +78,7 @@ message OpenRegionRequest {
     optional uint32 version_of_offline_node = 2;
     repeated ServerName favored_nodes = 3;
     // open region for distributedLogReplay
-    optional bool openForDistributedLogReplay = 4;
+    // optional bool DEPRECATED_openForDistributedLogReplay = 4;
   }
 }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-protocol/src/main/protobuf/ZooKeeper.proto
----------------------------------------------------------------------
diff --git a/hbase-protocol/src/main/protobuf/ZooKeeper.proto b/hbase-protocol/src/main/protobuf/ZooKeeper.proto
index ee73c84..418f817 100644
--- a/hbase-protocol/src/main/protobuf/ZooKeeper.proto
+++ b/hbase-protocol/src/main/protobuf/ZooKeeper.proto
@@ -77,14 +77,9 @@ message SplitLogTask {
     DONE = 3;
     ERR = 4;
   }
-  enum RecoveryMode {
-    UNKNOWN = 0;
-    LOG_SPLITTING = 1;
-    LOG_REPLAY = 2;
-  }
   required State state = 1;
   required ServerName server_name = 2;
-  optional RecoveryMode mode = 3 [default = UNKNOWN];
+  // optional RecoveryMode DEPRECATED_mode = 3 [default = UNKNOWN];
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogTask.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogTask.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogTask.java
index 83ae620..dd4eb93 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogTask.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogTask.java
@@ -24,7 +24,6 @@ import org.apache.hadoop.hbase.exceptions.DeserializationException;
 import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos.SplitLogTask.RecoveryMode;
 import org.apache.hadoop.hbase.util.Bytes;
 
 /**
@@ -37,64 +36,51 @@ import org.apache.hadoop.hbase.util.Bytes;
 public class SplitLogTask {
   private final ServerName originServer;
   private final ZooKeeperProtos.SplitLogTask.State state;
-  private final ZooKeeperProtos.SplitLogTask.RecoveryMode mode;
 
   public static class Unassigned extends SplitLogTask {
-    public Unassigned(final ServerName originServer, final RecoveryMode mode) {
-      super(originServer, ZooKeeperProtos.SplitLogTask.State.UNASSIGNED, mode);
+    public Unassigned(final ServerName originServer) {
+      super(originServer, ZooKeeperProtos.SplitLogTask.State.UNASSIGNED);
     }
   }
 
   public static class Owned extends SplitLogTask {
     public Owned(final ServerName originServer) {
-      this(originServer, ZooKeeperProtos.SplitLogTask.RecoveryMode.LOG_SPLITTING);
-    }
- 
-    public Owned(final ServerName originServer, final RecoveryMode mode) {
-      super(originServer, ZooKeeperProtos.SplitLogTask.State.OWNED, mode);
+      super(originServer, ZooKeeperProtos.SplitLogTask.State.OWNED);
     }
   }
 
   public static class Resigned extends SplitLogTask {
-    public Resigned(final ServerName originServer, final RecoveryMode mode) {
-      super(originServer, ZooKeeperProtos.SplitLogTask.State.RESIGNED, mode);
+    public Resigned(final ServerName originServer) {
+      super(originServer, ZooKeeperProtos.SplitLogTask.State.RESIGNED);
     }
   }
 
   public static class Done extends SplitLogTask {
-    public Done(final ServerName originServer, final RecoveryMode mode) {
-      super(originServer, ZooKeeperProtos.SplitLogTask.State.DONE, mode);
+    public Done(final ServerName originServer) {
+      super(originServer, ZooKeeperProtos.SplitLogTask.State.DONE);
     }
   }
 
   public static class Err extends SplitLogTask {
-    public Err(final ServerName originServer, final RecoveryMode mode) {
-      super(originServer, ZooKeeperProtos.SplitLogTask.State.ERR, mode);
+    public Err(final ServerName originServer) {
+      super(originServer, ZooKeeperProtos.SplitLogTask.State.ERR);
     }
   }
 
   SplitLogTask(final ZooKeeperProtos.SplitLogTask slt) {
     this.originServer = ProtobufUtil.toServerName(slt.getServerName());
     this.state = slt.getState();
-    this.mode = (slt.hasMode()) ? slt.getMode() :
-      ZooKeeperProtos.SplitLogTask.RecoveryMode.UNKNOWN;
   }
 
-  SplitLogTask(final ServerName originServer, final ZooKeeperProtos.SplitLogTask.State state,
-      final ZooKeeperProtos.SplitLogTask.RecoveryMode mode) {
+  SplitLogTask(final ServerName originServer, final ZooKeeperProtos.SplitLogTask.State state) {
     this.originServer = originServer;
     this.state = state;
-    this.mode = mode;
   }
 
   public ServerName getServerName() {
     return this.originServer;
   }
 
-  public ZooKeeperProtos.SplitLogTask.RecoveryMode getMode() {
-    return this.mode;
-  }
-
   public boolean isUnassigned(final ServerName sn) {
     return this.originServer.equals(sn) && isUnassigned();
   }
@@ -182,8 +168,7 @@ public class SplitLogTask {
     // pbs just created.
     HBaseProtos.ServerName snpb = ProtobufUtil.toServerName(this.originServer);
     ZooKeeperProtos.SplitLogTask slts =
-      ZooKeeperProtos.SplitLogTask.newBuilder().setServerName(snpb).setState(this.state).
-      setMode(this.mode).build();
+      ZooKeeperProtos.SplitLogTask.newBuilder().setServerName(snpb).setState(this.state).build();
     return ProtobufUtil.prependPBMagic(slts.toByteArray());
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitLogManagerCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitLogManagerCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitLogManagerCoordination.java
index 564d729..1b14bcd 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitLogManagerCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitLogManagerCoordination.java
@@ -20,19 +20,16 @@
 package org.apache.hadoop.hbase.coordination;
 
 import java.io.IOException;
-import java.io.InterruptedIOException;
 import java.util.Set;
 import java.util.concurrent.ConcurrentMap;
 
 import org.apache.hadoop.hbase.ServerName;
-import org.apache.hadoop.hbase.client.RegionInfo;
 import org.apache.hadoop.hbase.master.MasterServices;
 import org.apache.hadoop.hbase.master.SplitLogManager.ResubmitDirective;
 import org.apache.hadoop.hbase.master.SplitLogManager.Task;
 import org.apache.yetus.audience.InterfaceAudience;
 
 import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos.SplitLogTask.RecoveryMode;
 
 /**
  * Coordination for SplitLogManager. It creates and works with tasks for split log operations<BR>
@@ -41,20 +38,11 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos.SplitLo
  * {@link #remainingTasksInCoordination()} and waits until it become zero.
  * <P>
  * Methods required for task life circle: <BR>
- * {@link #markRegionsRecovering(ServerName, Set)} mark regions for log replaying. Used by
- * {@link org.apache.hadoop.hbase.master.MasterFileSystem} <BR>
- * {@link #removeRecoveringRegions(Set, Boolean)} make regions cleanup that previous were marked as
- * recovering. Called after all tasks processed <BR>
- * {@link #removeStaleRecoveringRegions(Set)} remove stale recovering. called by
- * {@link org.apache.hadoop.hbase.master.MasterFileSystem} after Active Master is initialized <BR>
- * {@link #getLastRecoveryTime()} required for garbage collector and should indicate when the last
- * recovery has been made<BR>
  * {@link #checkTaskStillAvailable(String)} Check that task is still there <BR>
  * {@link #checkTasks()} check for unassigned tasks and resubmit them
  */
 @InterfaceAudience.Private
 public interface SplitLogManagerCoordination {
-
   /**
    * Detail class that shares data between coordination and split log manager
    */
@@ -117,29 +105,11 @@ public interface SplitLogManagerCoordination {
   String prepareTask(String taskName);
 
   /**
-   * Mark regions in recovering state for distributed log replay
-   * @param serverName server name
-   * @param userRegions set of regions to be marked
-   * @throws IOException in case of failure
-   * @throws InterruptedIOException
-   */
-  void markRegionsRecovering(final ServerName serverName, Set<RegionInfo> userRegions)
-      throws IOException, InterruptedIOException;
-
-  /**
    * tells Coordination that it should check for new tasks
    */
   void checkTasks();
 
   /**
-   * It removes recovering regions from Coordination
-   * @param serverNames servers which are just recovered
-   * @param isMetaRecovery whether current recovery is for the meta region on
-   *          <code>serverNames</code>
-   */
-  void removeRecoveringRegions(Set<String> serverNames, Boolean isMetaRecovery) throws IOException;
-
-  /**
    * Return the number of remaining tasks
    */
   int remainingTasksInCoordination();
@@ -151,23 +121,6 @@ public interface SplitLogManagerCoordination {
   void checkTaskStillAvailable(String task);
 
   /**
-   * Change the recovery mode.
-   * @param b the recovery mode state
-   * @throws InterruptedIOException
-   * @throws IOException in case of failure
-   */
-  void setRecoveryMode(boolean b) throws IOException;
-
-  /**
-   * Removes known stale servers
-   * @param knownServers set of previously failed servers
-   * @throws IOException in case of failure
-   * @throws InterruptedIOException
-   */
-  void removeStaleRecoveringRegions(Set<String> knownServers) throws IOException,
-      InterruptedIOException;
-
-  /**
    * Resubmit the task in case if found unassigned or failed
    * @param taskName path related to task
    * @param task to resubmit
@@ -188,28 +141,6 @@ public interface SplitLogManagerCoordination {
   void deleteTask(String taskName);
 
   /**
-   * @return shows whether the log recovery mode is in replaying state
-   */
-  boolean isReplaying();
-
-  /**
-   * @return shows whether the log recovery mode is in splitting state
-   */
-  boolean isSplitting();
-
-  /**
-   * @return the time of last attempt to recover
-   */
-  long getLastRecoveryTime();
-
-  /**
-   * Temporary function, mostly for UTs. In the regular code isReplaying or isSplitting should be
-   * used.
-   * @return the current log recovery mode.
-   */
-  RecoveryMode getRecoveryMode();
-
-  /**
    * Support method to init constants such as timeout. Mostly required for UTs.
    * @throws IOException
    */

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitLogWorkerCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitLogWorkerCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitLogWorkerCoordination.java
index 529d8ef..ad07dcf 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitLogWorkerCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitLogWorkerCoordination.java
@@ -17,7 +17,6 @@
   * limitations under the License.
   */
 package org.apache.hadoop.hbase.coordination;
-import java.io.IOException;
 import java.util.concurrent.atomic.LongAdder;
 
 import org.apache.hadoop.conf.Configuration;
@@ -25,7 +24,6 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.SplitLogTask;
 import org.apache.yetus.audience.InterfaceAudience;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIds;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.regionserver.SplitLogWorker;
 import org.apache.hadoop.hbase.regionserver.SplitLogWorker.TaskExecutor;
@@ -33,7 +31,7 @@ import org.apache.hadoop.hbase.regionserver.SplitLogWorker.TaskExecutor;
 import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
 
 /**
- * Coordinated operations for {@link SplitLogWorker} and 
+ * Coordinated operations for {@link SplitLogWorker} and
  * {@link org.apache.hadoop.hbase.regionserver.handler.WALSplitterHandler} Important
  * methods for SplitLogWorker: <BR>
  * {@link #isReady()} called from {@link SplitLogWorker#run()} to check whether the coordination is
@@ -51,7 +49,7 @@ import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTe
 public interface SplitLogWorkerCoordination {
 
 /* SplitLogWorker part */
-  public static final int DEFAULT_MAX_SPLITTERS = 2;
+  int DEFAULT_MAX_SPLITTERS = 2;
 
   /**
    * Initialize internal values. This method should be used when corresponding SplitLogWorker
@@ -127,15 +125,11 @@ public interface SplitLogWorkerCoordination {
    * Interface for log-split tasks Used to carry implementation details in encapsulated way through
    * Handlers to the coordination API.
    */
-  static interface SplitTaskDetails {
+  interface SplitTaskDetails {
 
     /**
      * @return full file path in HDFS for the WAL file to be split.
      */
     String getWALFile();
   }
-
-  RegionStoreSequenceIds getRegionFlushedSequenceId(String failedServerName, String key)
-      throws IOException;
-
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
index ef99de0..8073d64 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
@@ -27,23 +27,15 @@ import static org.apache.hadoop.hbase.master.SplitLogManager.TerminationStatus.S
 import static org.apache.hadoop.hbase.util.CollectionUtils.computeIfAbsent;
 
 import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
-import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.CoordinatedStateManager;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.SplitLogCounters;
 import org.apache.hadoop.hbase.SplitLogTask;
-import org.apache.hadoop.hbase.client.RegionInfo;
-import org.apache.hadoop.hbase.client.RegionInfoBuilder;
 import org.apache.hadoop.hbase.coordination.ZKSplitLogManagerCoordination.TaskFinisher.Status;
 import org.apache.hadoop.hbase.exceptions.DeserializationException;
 import org.apache.hadoop.hbase.master.SplitLogManager.ResubmitDirective;
@@ -51,7 +43,6 @@ import org.apache.hadoop.hbase.master.SplitLogManager.Task;
 import org.apache.hadoop.hbase.master.SplitLogManager.TerminationStatus;
 import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
-import org.apache.hadoop.hbase.wal.AbstractFSWALProvider;
 import org.apache.hadoop.hbase.wal.WALSplitter;
 import org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper;
 import org.apache.hadoop.hbase.zookeeper.ZKSplitLog;
@@ -67,8 +58,6 @@ import org.apache.zookeeper.KeeperException.NoNodeException;
 import org.apache.zookeeper.ZooDefs.Ids;
 import org.apache.zookeeper.data.Stat;
 
-import org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos.SplitLogTask.RecoveryMode;
-
 /**
  * ZooKeeper based implementation of
  * {@link SplitLogManagerCoordination}
@@ -92,16 +81,8 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
 
   SplitLogManagerDetails details;
 
-  // When lastRecoveringNodeCreationTime is older than the following threshold, we'll check
-  // whether to GC stale recovering znodes
-  private volatile long lastRecoveringNodeCreationTime = 0;
-
   public boolean ignoreZKDeleteForTesting = false;
 
-  private RecoveryMode recoveryMode;
-
-  private boolean isDrainingDone = false;
-
   public ZKSplitLogManagerCoordination(Configuration conf, ZooKeeperWatcher watcher) {
     super(watcher);
     this.conf = conf;
@@ -124,7 +105,6 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
     this.zkretries = conf.getLong("hbase.splitlog.zk.retries", DEFAULT_ZK_RETRIES);
     this.resubmitThreshold = conf.getLong("hbase.splitlog.max.resubmit", DEFAULT_MAX_RESUBMIT);
     this.timeout = conf.getInt(HConstants.HBASE_SPLITLOG_MANAGER_TIMEOUT, DEFAULT_TIMEOUT);
-    setRecoveryMode(true);
     if (this.watcher != null) {
       this.watcher.registerListener(this);
       lookForOrphans();
@@ -222,7 +202,7 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
     }
     LOG.info("resubmitting task " + path);
     task.incarnation.incrementAndGet();
-    boolean result = resubmit(this.details.getServerName(), path, version);
+    boolean result = resubmit(path, version);
     if (!result) {
       task.heartbeatNoDetails(EnvironmentEdgeManager.currentTime());
       return false;
@@ -254,7 +234,7 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
     // might miss the watch-trigger that creation of RESCAN node provides.
     // Since the TimeoutMonitor will keep resubmitting UNASSIGNED tasks
     // therefore this behavior is safe.
-    SplitLogTask slt = new SplitLogTask.Done(this.details.getServerName(), getRecoveryMode());
+    SplitLogTask slt = new SplitLogTask.Done(this.details.getServerName());
     this.watcher
         .getRecoverableZooKeeper()
         .getZooKeeper()
@@ -278,83 +258,6 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
     SplitLogCounters.tot_mgr_get_data_queued.increment();
   }
 
-  /**
-   * It removes recovering regions under /hbase/recovering-regions/[encoded region name] so that the
-   * region server hosting the region can allow reads to the recovered region
-   * @param recoveredServerNameSet servers which are just recovered
-   * @param isMetaRecovery whether current recovery is for the meta region on
-   *          <code>serverNames</code>
-   */
-  @Override
-  public void removeRecoveringRegions(final Set<String> recoveredServerNameSet,
-      Boolean isMetaRecovery)
-  throws IOException {
-    final String metaEncodeRegionName = RegionInfoBuilder.FIRST_META_REGIONINFO.getEncodedName();
-    int count = 0;
-    try {
-      List<String> tasks = ZKUtil.listChildrenNoWatch(watcher, watcher.znodePaths.splitLogZNode);
-      if (tasks != null) {
-        int listSize = tasks.size();
-        for (int i = 0; i < listSize; i++) {
-          if (!ZKSplitLog.isRescanNode(tasks.get(i))) {
-            count++;
-          }
-        }
-      }
-      if (count == 0 && this.details.getMaster().isInitialized()
-          && !this.details.getMaster().getServerManager().areDeadServersInProgress()) {
-        // No splitting work items left
-        ZKSplitLog.deleteRecoveringRegionZNodes(watcher, null);
-        // reset lastRecoveringNodeCreationTime because we cleared all recovering znodes at
-        // this point.
-        lastRecoveringNodeCreationTime = Long.MAX_VALUE;
-      } else if (!recoveredServerNameSet.isEmpty()) {
-        // Remove recovering regions which don't have any RS associated with it
-        List<String> regions = ZKUtil.listChildrenNoWatch(watcher,
-          watcher.znodePaths.recoveringRegionsZNode);
-        if (regions != null) {
-          int listSize = regions.size();
-          if (LOG.isDebugEnabled()) {
-            LOG.debug("Processing recovering " + regions + " and servers "  +
-                recoveredServerNameSet + ", isMetaRecovery=" + isMetaRecovery);
-          }
-          for (int i = 0; i < listSize; i++) {
-            String region = regions.get(i);
-            if (isMetaRecovery != null) {
-              if ((isMetaRecovery && !region.equalsIgnoreCase(metaEncodeRegionName))
-                  || (!isMetaRecovery && region.equalsIgnoreCase(metaEncodeRegionName))) {
-                // skip non-meta regions when recovering the meta region or
-                // skip the meta region when recovering user regions
-                continue;
-              }
-            }
-            String nodePath = ZKUtil.joinZNode(watcher.znodePaths.recoveringRegionsZNode, region);
-            List<String> failedServers = ZKUtil.listChildrenNoWatch(watcher, nodePath);
-            if (failedServers == null || failedServers.isEmpty()) {
-              ZKUtil.deleteNode(watcher, nodePath);
-              continue;
-            }
-            if (recoveredServerNameSet.containsAll(failedServers)) {
-              ZKUtil.deleteNodeRecursively(watcher, nodePath);
-            } else {
-              int tmpFailedServerSize = failedServers.size();
-              for (int j = 0; j < tmpFailedServerSize; j++) {
-                String failedServer = failedServers.get(j);
-                if (recoveredServerNameSet.contains(failedServer)) {
-                  String tmpPath = ZKUtil.joinZNode(nodePath, failedServer);
-                  ZKUtil.deleteNode(watcher, tmpPath);
-                }
-              }
-            }
-          }
-        }
-      }
-    } catch (KeeperException ke) {
-      LOG.warn("removeRecoveringRegionsFromZK got zookeeper exception. Will retry", ke);
-      throw new IOException(ke);
-    }
-  }
-
   private void deleteNode(String path, Long retries) {
     SplitLogCounters.tot_mgr_node_delete_queued.increment();
     // Once a task znode is ready for delete, that is it is in the TASK_DONE
@@ -415,7 +318,7 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
   }
 
   private void createNode(String path, Long retry_count) {
-    SplitLogTask slt = new SplitLogTask.Unassigned(details.getServerName(), getRecoveryMode());
+    SplitLogTask slt = new SplitLogTask.Unassigned(details.getServerName());
     ZKUtil.asyncCreate(this.watcher, path, slt.toByteArray(), new CreateAsyncCallback(),
       retry_count);
     SplitLogCounters.tot_mgr_node_create_queued.increment();
@@ -439,7 +342,6 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
     SplitLogCounters.tot_mgr_get_data_queued.increment();
   }
 
-
   private void getDataSetWatchSuccess(String path, byte[] data, int version)
       throws DeserializationException {
     if (data == null) {
@@ -589,77 +491,6 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
         + " rescan nodes");
   }
 
-  /**
-   * Create znodes /hbase/recovering-regions/[region_ids...]/[failed region server names ...] for
-   * all regions of the passed in region servers
-   * @param serverName the name of a region server
-   * @param userRegions user regiones assigned on the region server
-   */
-  @Override
-  public void markRegionsRecovering(final ServerName serverName, Set<RegionInfo> userRegions)
-      throws IOException, InterruptedIOException {
-    this.lastRecoveringNodeCreationTime = EnvironmentEdgeManager.currentTime();
-    for (RegionInfo region : userRegions) {
-      String regionEncodeName = region.getEncodedName();
-      long retries = this.zkretries;
-
-      do {
-        String nodePath = ZKUtil.joinZNode(watcher.znodePaths.recoveringRegionsZNode,
-          regionEncodeName);
-        long lastRecordedFlushedSequenceId = -1;
-        try {
-          long lastSequenceId =
-              this.details.getMaster().getServerManager()
-                  .getLastFlushedSequenceId(regionEncodeName.getBytes()).getLastFlushedSequenceId();
-
-          /*
-           * znode layout: .../region_id[last known flushed sequence id]/failed server[last known
-           * flushed sequence id for the server]
-           */
-          byte[] data = ZKUtil.getData(this.watcher, nodePath);
-          if (data == null) {
-            ZKUtil
-                .createSetData(this.watcher, nodePath, ZKUtil.positionToByteArray(lastSequenceId));
-          } else {
-            lastRecordedFlushedSequenceId =
-                ZKSplitLog.parseLastFlushedSequenceIdFrom(data);
-            if (lastRecordedFlushedSequenceId < lastSequenceId) {
-              // update last flushed sequence id in the region level
-              ZKUtil.setData(this.watcher, nodePath, ZKUtil.positionToByteArray(lastSequenceId));
-            }
-          }
-          // go one level deeper with server name
-          nodePath = ZKUtil.joinZNode(nodePath, serverName.getServerName());
-          if (lastSequenceId <= lastRecordedFlushedSequenceId) {
-            // the newly assigned RS failed even before any flush to the region
-            lastSequenceId = lastRecordedFlushedSequenceId;
-          }
-          ZKUtil.createSetData(this.watcher, nodePath,
-          ZKUtil.regionSequenceIdsToByteArray(lastSequenceId, null));
-          if (LOG.isDebugEnabled()) {
-            LOG.debug("Marked " + regionEncodeName + " recovering from " + serverName +
-              ": " + nodePath);
-          }
-          // break retry loop
-          break;
-        } catch (KeeperException e) {
-          // ignore ZooKeeper exceptions inside retry loop
-          if (retries <= 1) {
-            throw new IOException(e);
-          }
-          // wait a little bit for retry
-          try {
-            Thread.sleep(20);
-          } catch (InterruptedException e1) {
-            throw new InterruptedIOException();
-          }
-        } catch (InterruptedException e) {
-          throw new InterruptedIOException();
-        }
-      } while ((--retries) > 0);
-    }
-  }
-
   @Override
   public void nodeDataChanged(String path) {
     Task task;
@@ -672,216 +503,11 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
     }
   }
 
-  /**
-   * ZooKeeper implementation of
-   * {@link SplitLogManagerCoordination#removeStaleRecoveringRegions(Set)}
-   */
-  @Override
-  public void removeStaleRecoveringRegions(final Set<String> knownFailedServers)
-      throws IOException, InterruptedIOException {
-
-    try {
-      List<String> tasks = ZKUtil.listChildrenNoWatch(watcher, watcher.znodePaths.splitLogZNode);
-      if (tasks != null) {
-        int listSize = tasks.size();
-        for (int i = 0; i < listSize; i++) {
-          String t = tasks.get(i);
-          byte[] data;
-          try {
-            data = ZKUtil.getData(this.watcher,
-              ZKUtil.joinZNode(watcher.znodePaths.splitLogZNode, t));
-          } catch (InterruptedException e) {
-            throw new InterruptedIOException();
-          }
-          if (data != null) {
-            SplitLogTask slt = null;
-            try {
-              slt = SplitLogTask.parseFrom(data);
-            } catch (DeserializationException e) {
-              LOG.warn("Failed parse data for znode " + t, e);
-            }
-            if (slt != null && slt.isDone()) {
-              continue;
-            }
-          }
-          // decode the file name
-          t = ZKSplitLog.getFileName(t);
-          ServerName serverName = AbstractFSWALProvider
-              .getServerNameFromWALDirectoryName(new Path(t));
-          if (serverName != null) {
-            knownFailedServers.add(serverName.getServerName());
-          } else {
-            LOG.warn("Found invalid WAL log file name:" + t);
-          }
-        }
-      }
-
-      // remove recovering regions which doesn't have any RS associated with it
-      List<String> regions = ZKUtil.listChildrenNoWatch(watcher,
-        watcher.znodePaths.recoveringRegionsZNode);
-      if (regions != null) {
-        int listSize = regions.size();
-        for (int i = 0; i < listSize; i++) {
-          String nodePath = ZKUtil.joinZNode(watcher.znodePaths.recoveringRegionsZNode,
-            regions.get(i));
-          List<String> regionFailedServers = ZKUtil.listChildrenNoWatch(watcher, nodePath);
-          if (regionFailedServers == null || regionFailedServers.isEmpty()) {
-            ZKUtil.deleteNode(watcher, nodePath);
-            continue;
-          }
-          boolean needMoreRecovery = false;
-          int tmpFailedServerSize = regionFailedServers.size();
-          for (int j = 0; j < tmpFailedServerSize; j++) {
-            if (knownFailedServers.contains(regionFailedServers.get(j))) {
-              needMoreRecovery = true;
-              break;
-            }
-          }
-          if (!needMoreRecovery) {
-            ZKUtil.deleteNodeRecursively(watcher, nodePath);
-          }
-        }
-      }
-    } catch (KeeperException e) {
-      throw new IOException(e);
-    }
-  }
-
-  @Override
-  public synchronized boolean isReplaying() {
-    return this.recoveryMode == RecoveryMode.LOG_REPLAY;
-  }
-
-  @Override
-  public synchronized boolean isSplitting() {
-    return this.recoveryMode == RecoveryMode.LOG_SPLITTING;
-  }
-
-  private List<String> listSplitLogTasks() throws KeeperException {
-    List<String> taskOrRescanList = ZKUtil.listChildrenNoWatch(watcher,
-      watcher.znodePaths.splitLogZNode);
-    if (taskOrRescanList == null || taskOrRescanList.isEmpty()) {
-      return Collections.<String> emptyList();
-    }
-    List<String> taskList = new ArrayList<>();
-    for (String taskOrRescan : taskOrRescanList) {
-      // Remove rescan nodes
-      if (!ZKSplitLog.isRescanNode(taskOrRescan)) {
-        taskList.add(taskOrRescan);
-      }
-    }
-    return taskList;
-  }
-
-  /**
-   * This function is to set recovery mode from outstanding split log tasks from before or current
-   * configuration setting
-   * @param isForInitialization
-   * @throws IOException
-   */
-  @Override
-  public void setRecoveryMode(boolean isForInitialization) throws IOException {
-    synchronized(this) {
-      if (this.isDrainingDone) {
-        // when there is no outstanding splitlogtask after master start up, we already have up to
-        // date recovery mode
-        return;
-      }
-    }
-    if (this.watcher == null) {
-      // when watcher is null(testing code) and recovery mode can only be LOG_SPLITTING
-      synchronized(this) {
-        this.isDrainingDone = true;
-        this.recoveryMode = RecoveryMode.LOG_SPLITTING;
-      }
-      return;
-    }
-    boolean hasSplitLogTask = false;
-    boolean hasRecoveringRegions = false;
-    RecoveryMode previousRecoveryMode = RecoveryMode.UNKNOWN;
-    RecoveryMode recoveryModeInConfig =
-        (isDistributedLogReplay(conf)) ? RecoveryMode.LOG_REPLAY : RecoveryMode.LOG_SPLITTING;
-
-    // Firstly check if there are outstanding recovering regions
-    try {
-      List<String> regions = ZKUtil.listChildrenNoWatch(watcher,
-        watcher.znodePaths.recoveringRegionsZNode);
-      if (regions != null && !regions.isEmpty()) {
-        hasRecoveringRegions = true;
-        previousRecoveryMode = RecoveryMode.LOG_REPLAY;
-      }
-      if (previousRecoveryMode == RecoveryMode.UNKNOWN) {
-        // Secondly check if there are outstanding split log task
-        List<String> tasks = listSplitLogTasks();
-        if (!tasks.isEmpty()) {
-          hasSplitLogTask = true;
-          if (isForInitialization) {
-            // during initialization, try to get recovery mode from splitlogtask
-            int listSize = tasks.size();
-            for (int i = 0; i < listSize; i++) {
-              String task = tasks.get(i);
-              try {
-                byte[] data = ZKUtil.getData(this.watcher,
-                  ZKUtil.joinZNode(watcher.znodePaths.splitLogZNode, task));
-                if (data == null) continue;
-                SplitLogTask slt = SplitLogTask.parseFrom(data);
-                previousRecoveryMode = slt.getMode();
-                if (previousRecoveryMode == RecoveryMode.UNKNOWN) {
-                  // created by old code base where we don't set recovery mode in splitlogtask
-                  // we can safely set to LOG_SPLITTING because we're in master initialization code
-                  // before SSH is enabled & there is no outstanding recovering regions
-                  previousRecoveryMode = RecoveryMode.LOG_SPLITTING;
-                }
-                break;
-              } catch (DeserializationException e) {
-                LOG.warn("Failed parse data for znode " + task, e);
-              } catch (InterruptedException e) {
-                throw new InterruptedIOException();
-              }
-            }
-          }
-        }
-      }
-    } catch (KeeperException e) {
-      throw new IOException(e);
-    }
-
-    synchronized (this) {
-      if (this.isDrainingDone) {
-        return;
-      }
-      if (!hasSplitLogTask && !hasRecoveringRegions) {
-        this.isDrainingDone = true;
-        this.recoveryMode = recoveryModeInConfig;
-        return;
-      } else if (!isForInitialization) {
-        // splitlogtask hasn't drained yet, keep existing recovery mode
-        return;
-      }
-
-      if (previousRecoveryMode != RecoveryMode.UNKNOWN) {
-        this.isDrainingDone = (previousRecoveryMode == recoveryModeInConfig);
-        this.recoveryMode = previousRecoveryMode;
-      } else {
-        this.recoveryMode = recoveryModeInConfig;
-      }
-    }
-  }
-
-  /**
-   * Returns if distributed log replay is turned on or not
-   * @param conf
-   * @return true when distributed log replay is turned on
-   */
-  private boolean isDistributedLogReplay(Configuration conf) {
-    return false;
-  }
-
-  private boolean resubmit(ServerName serverName, String path, int version) {
+  private boolean resubmit(String path, int version) {
     try {
       // blocking zk call but this is done from the timeout thread
       SplitLogTask slt =
-          new SplitLogTask.Unassigned(this.details.getServerName(), getRecoveryMode());
+          new SplitLogTask.Unassigned(this.details.getServerName());
       if (ZKUtil.setData(this.watcher, path, slt.toByteArray(), version) == false) {
         LOG.debug("failed to resubmit task " + path + " version changed");
         return false;
@@ -1109,16 +735,6 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
     return details;
   }
 
-  @Override
-  public synchronized RecoveryMode getRecoveryMode() {
-    return recoveryMode;
-  }
-
-  @Override
-  public long getLastRecoveryTime() {
-    return lastRecoveringNodeCreationTime;
-  }
-
   /**
    * Temporary function that is used by unit tests only
    */

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
index 14e7796..e196248 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
@@ -19,10 +19,7 @@
 
 package org.apache.hadoop.hbase.coordination;
 
-import java.io.IOException;
-import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.LongAdder;
 
@@ -39,13 +36,9 @@ import org.apache.hadoop.hbase.SplitLogCounters;
 import org.apache.hadoop.hbase.SplitLogTask;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.hadoop.hbase.exceptions.DeserializationException;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIds;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos.SplitLogTask.RecoveryMode;
-import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.regionserver.SplitLogWorker;
 import org.apache.hadoop.hbase.regionserver.SplitLogWorker.TaskExecutor;
-import org.apache.hadoop.hbase.regionserver.handler.FinishRegionRecoveringHandler;
 import org.apache.hadoop.hbase.regionserver.handler.WALSplitterHandler;
 import org.apache.hadoop.hbase.util.CancelableProgressable;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
@@ -78,7 +71,6 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
 
   private TaskExecutor splitTaskExecutor;
 
-  private final Object taskReadyLock = new Object();
   private AtomicInteger taskReadySeq = new AtomicInteger(0);
   private volatile String currentTask = null;
   private int currentVersion;
@@ -103,10 +95,12 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
   @Override
   public void nodeChildrenChanged(String path) {
     if (path.equals(watcher.znodePaths.splitLogZNode)) {
-      if (LOG.isTraceEnabled()) LOG.trace("tasks arrived or departed on " + path);
-      synchronized (taskReadyLock) {
+      if (LOG.isTraceEnabled()) {
+        LOG.trace("tasks arrived or departed on " + path);
+      }
+      synchronized (taskReadySeq) {
         this.taskReadySeq.incrementAndGet();
-        taskReadyLock.notify();
+        taskReadySeq.notify();
       }
     }
   }
@@ -240,8 +234,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
       }
 
       currentVersion =
-          attemptToOwnTask(true, watcher, server.getServerName(), path,
-            slt.getMode(), stat.getVersion());
+          attemptToOwnTask(true, watcher, server.getServerName(), path, stat.getVersion());
       if (currentVersion < 0) {
         SplitLogCounters.tot_wkr_failed_to_grab_task_lost_race.increment();
         return;
@@ -253,7 +246,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
         splitTaskDetails.setTaskNode(currentTask);
         splitTaskDetails.setCurTaskZKVersion(new MutableInt(currentVersion));
 
-        endTask(new SplitLogTask.Done(server.getServerName(), slt.getMode()),
+        endTask(new SplitLogTask.Done(server.getServerName()),
           SplitLogCounters.tot_wkr_task_acquired_rescan, splitTaskDetails);
         return;
       }
@@ -262,7 +255,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
       SplitLogCounters.tot_wkr_task_acquired.increment();
       getDataSetWatchAsync();
 
-      submitTask(path, slt.getMode(), currentVersion, reportPeriod);
+      submitTask(path, currentVersion, reportPeriod);
 
       // after a successful submit, sleep a little bit to allow other RSs to grab the rest tasks
       try {
@@ -287,8 +280,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
    * @param curTask task to submit
    * @param curTaskZKVersion current version of task
    */
-  void submitTask(final String curTask, final RecoveryMode mode, final int curTaskZKVersion,
-      final int reportPeriod) {
+  void submitTask(final String curTask, final int curTaskZKVersion, final int reportPeriod) {
     final MutableInt zkVersion = new MutableInt(curTaskZKVersion);
 
     CancelableProgressable reporter = new CancelableProgressable() {
@@ -301,7 +293,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
           last_report_at = t;
           int latestZKVersion =
               attemptToOwnTask(false, watcher, server.getServerName(), curTask,
-                mode, zkVersion.intValue());
+                zkVersion.intValue());
           if (latestZKVersion < 0) {
             LOG.warn("Failed to heartbeat the task" + curTask);
             return false;
@@ -318,7 +310,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
 
     WALSplitterHandler hsh =
         new WALSplitterHandler(server, this, splitTaskDetails, reporter,
-            this.tasksInProgress, splitTaskExecutor, mode);
+            this.tasksInProgress, splitTaskExecutor);
     server.getExecutorService().submit(hsh);
   }
 
@@ -361,10 +353,10 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
    * @return non-negative integer value when task can be owned by current region server otherwise -1
    */
   protected static int attemptToOwnTask(boolean isFirstTime, ZooKeeperWatcher zkw,
-      ServerName server, String task, RecoveryMode mode, int taskZKVersion) {
+      ServerName server, String task, int taskZKVersion) {
     int latestZKVersion = FAILED_TO_OWN_TASK;
     try {
-      SplitLogTask slt = new SplitLogTask.Owned(server, mode);
+      SplitLogTask slt = new SplitLogTask.Owned(server);
       Stat stat = zkw.getRecoverableZooKeeper().setData(task, slt.toByteArray(), taskZKVersion);
       if (stat == null) {
         LOG.warn("zk.setData() returned null for path " + task);
@@ -398,7 +390,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
    * policy puts an upper-limit on the number of simultaneous log splitting that could be happening
    * in a cluster.
    * <p>
-   * Synchronization using <code>taskReadyLock</code> ensures that it will try to grab every task
+   * Synchronization using <code>taskReadySeq</code> ensures that it will try to grab every task
    * that has been put up
    * @throws InterruptedException
    */
@@ -406,7 +398,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
   public void taskLoop() throws InterruptedException {
     while (!shouldStop) {
       int seq_start = taskReadySeq.get();
-      List<String> paths = null;
+      List<String> paths;
       paths = getTaskList();
       if (paths == null) {
         LOG.warn("Could not get tasks, did someone remove " + watcher.znodePaths.splitLogZNode
@@ -438,41 +430,9 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
         }
       }
       SplitLogCounters.tot_wkr_task_grabing.increment();
-      synchronized (taskReadyLock) {
+      synchronized (taskReadySeq) {
         while (seq_start == taskReadySeq.get()) {
-          taskReadyLock.wait(checkInterval);
-          if (server != null) {
-            // check to see if we have stale recovering regions in our internal memory state
-            Map<String, HRegion> recoveringRegions = server.getRecoveringRegions();
-            if (!recoveringRegions.isEmpty()) {
-              // Make a local copy to prevent ConcurrentModificationException when other threads
-              // modify recoveringRegions
-              List<String> tmpCopy = new ArrayList<>(recoveringRegions.keySet());
-              int listSize = tmpCopy.size();
-              for (int i = 0; i < listSize; i++) {
-                String region = tmpCopy.get(i);
-                String nodePath = ZKUtil.joinZNode(watcher.znodePaths.recoveringRegionsZNode,
-                  region);
-                try {
-                  if (ZKUtil.checkExists(watcher, nodePath) == -1) {
-                    server.getExecutorService().submit(
-                      new FinishRegionRecoveringHandler(server, region, nodePath));
-                  } else {
-                    // current check is a defensive(or redundant) mechanism to prevent us from
-                    // having stale recovering regions in our internal RS memory state while
-                    // zookeeper(source of truth) says differently. We stop at the first good one
-                    // because we should not have a single instance such as this in normal case so
-                    // check the first one is good enough.
-                    break;
-                  }
-                } catch (KeeperException e) {
-                  // ignore zookeeper error
-                  LOG.debug("Got a zookeeper when trying to open a recovering region", e);
-                  break;
-                }
-              }
-            }
-          }
+          taskReadySeq.wait(checkInterval);
         }
       }
     }
@@ -550,12 +510,6 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
     return shouldStop;
   }
 
-  @Override
-  public RegionStoreSequenceIds getRegionFlushedSequenceId(String failedServerName, String key)
-      throws IOException {
-    return ZKSplitLog.getRegionFlushedSequenceId(watcher, failedServerName, key);
-  }
-
   /**
    * Asynchronous handler for zk get-data-set-watch on node results.
    */

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
index 83cd358..4b8e3b8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
@@ -119,12 +119,6 @@ public interface RegionObserver {
   default void postOpen(ObserverContext<RegionCoprocessorEnvironment> c) {}
 
   /**
-   * Called after the log replay on the region is over.
-   * @param c the environment provided by the region server
-   */
-  default void postLogReplay(ObserverContext<RegionCoprocessorEnvironment> c) {}
-
-  /**
    * Called before the memstore is flushed to disk.
    * @param c the environment provided by the region server
    * @param tracker tracker used to track the life cycle of a flush
@@ -965,6 +959,7 @@ public interface RegionObserver {
    * @param info the RegionInfo for this region
    * @param edits the file of recovered edits
    */
+  // todo: what about these?
   default void preReplayWALs(ObserverContext<? extends RegionCoprocessorEnvironment> ctx,
     RegionInfo info, Path edits) throws IOException {}
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/4132314f/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java
index f6074d9..891ea9b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java
@@ -19,7 +19,6 @@
 package org.apache.hadoop.hbase.master;
 
 import java.io.IOException;
-import java.io.InterruptedIOException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -37,7 +36,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.PathFilter;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.ServerName;
-import org.apache.hadoop.hbase.client.RegionInfo;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.hbase.util.FSUtils;
 import org.apache.hadoop.hbase.wal.AbstractFSWALProvider;
@@ -84,7 +82,6 @@ public class MasterWalManager {
   // create the split log lock
   private final Lock splitLogLock = new ReentrantLock();
   private final SplitLogManager splitLogManager;
-  private final boolean distributedLogReplay;
 
   // Is the fileystem ok?
   private volatile boolean fsOk = true;
@@ -101,7 +98,6 @@ public class MasterWalManager {
     this.rootDir = rootDir;
     this.services = services;
     this.splitLogManager = new SplitLogManager(services, conf);
-    this.distributedLogReplay = this.splitLogManager.isLogReplaying();
 
     this.oldLogDir = new Path(rootDir, HConstants.HREGION_OLDLOGDIR_NAME);
   }
@@ -279,36 +275,11 @@ public class MasterWalManager {
     return logDirs;
   }
 
-  /**
-   * Mark regions in recovering state when distributedLogReplay are set true
-   * @param serverName Failed region server whose wals to be replayed
-   * @param regions Set of regions to be recovered
-   */
-  public void prepareLogReplay(ServerName serverName, Set<RegionInfo> regions) throws IOException {
-    if (!this.distributedLogReplay) {
-      return;
-    }
-    // mark regions in recovering state
-    if (regions == null || regions.isEmpty()) {
-      return;
-    }
-    this.splitLogManager.markRegionsRecovering(serverName, regions);
-  }
-
   public void splitLog(final Set<ServerName> serverNames) throws IOException {
     splitLog(serverNames, NON_META_FILTER);
   }
 
   /**
-   * Wrapper function on {@link SplitLogManager#removeStaleRecoveringRegions(Set)}
-   * @param failedServers A set of known failed servers
-   */
-  void removeStaleRecoveringRegionsFromZK(final Set<ServerName> failedServers)
-      throws IOException, InterruptedIOException {
-    this.splitLogManager.removeStaleRecoveringRegions(failedServers);
-  }
-
-  /**
    * This method is the base split method that splits WAL files matching a filter. Callers should
    * pass the appropriate filter for meta and non-meta WALs.
    * @param serverNames logs belonging to these servers will be split; this will rename the log


Mime
View raw message