You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2014/12/27 18:41:59 UTC

hbase git commit: HBASE-12746 [1.0.0RC0] Distributed Log Replay is on (HBASE-12577 was insufficient) (Jeffrey Zhong)

Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 51116cf20 -> 2df74fbd4


HBASE-12746 [1.0.0RC0] Distributed Log Replay is on (HBASE-12577 was insufficient) (Jeffrey Zhong)


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

Branch: refs/heads/branch-1.0
Commit: 2df74fbd4a85de1e5325ba6ad8595f2081238e29
Parents: 51116cf
Author: stack <st...@apache.org>
Authored: Sat Dec 27 09:41:44 2014 -0800
Committer: stack <st...@apache.org>
Committed: Sat Dec 27 09:41:44 2014 -0800

----------------------------------------------------------------------
 hbase-common/src/main/resources/hbase-default.xml        | 11 ++++-------
 .../org/apache/hadoop/hbase/master/MasterFileSystem.java |  5 +++++
 .../apache/hadoop/hbase/master/TestSplitLogManager.java  |  1 +
 3 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2df74fbd/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 a966657..8590da3 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -274,13 +274,10 @@ possible configurations would overwhelm and obscure the important.
   </property>
   <property>
     <name>hbase.master.distributed.log.replay</name>
-    <value>true</value>
-    <description>Enable 'distributed log replay' as default engine splitting
-    WAL files on server crash.  This default is new in hbase 1.0.  To fall
-    back to the old mode 'distributed log splitter', set the value to
-    'false'.  'Disributed log replay' improves MTTR because it does not
-    write intermediate files.  'DLR' required that 'hfile.format.version'
-    be set to version 3 or higher. 
+    <value>false</value>
+    <description>True to enable 'distributed log replay' as default engine splitting
+    WAL files on server crash. 'Disributed log replay' improves MTTR because it does not
+    write intermediate files.
     </description>
   </property>
   <property>

http://git-wip-us.apache.org/repos/asf/hbase/blob/2df74fbd/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
index 7650b94..93bde36 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
@@ -237,6 +237,11 @@ public class MasterFileSystem {
           return serverNames;
         }
         for (FileStatus status : logFolders) {
+          FileStatus[] curLogFiles = FSUtils.listStatus(this.fs, status.getPath(), null);
+          if (curLogFiles == null || curLogFiles.length == 0) {
+            // Empty log folder. No recovery needed
+            continue;
+          }
           final ServerName serverName = DefaultWALProvider.getServerNameFromWALDirectoryName(
               status.getPath());
           if (null == serverName) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/2df74fbd/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
index f6a7953..80fb7bf 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
@@ -639,6 +639,7 @@ public class TestSplitLogManager {
     SplitLogCounters.resetCounters();
     Configuration testConf = HBaseConfiguration.create(TEST_UTIL.getConfiguration());
     testConf.setBoolean(HConstants.DISTRIBUTED_LOG_REPLAY_KEY, true);
+    ds = new DummyServer(zkw, testConf);
 
     zkw.getRecoverableZooKeeper().create(ZKSplitLog.getEncodedNodeName(zkw, "testRecovery"),
       new SplitLogTask.Unassigned(