hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-19578 MasterProcWALs cleaning is incorrect
Date Thu, 21 Dec 2017 17:39:03 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 00b0288c9 -> 35728acd2


HBASE-19578 MasterProcWALs cleaning is incorrect

Signed-off-by: tedyu <yuzhihong@gmail.com>


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

Branch: refs/heads/master
Commit: 35728acd217dcfa52a2f274a064ba6e847835b9f
Parents: 00b0288
Author: Peter Somogyi <psomogyi@cloudera.com>
Authored: Thu Dec 21 13:15:05 2017 +0100
Committer: tedyu <yuzhihong@gmail.com>
Committed: Thu Dec 21 09:38:25 2017 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java      | 2 +-
 .../hadoop/hbase/master/procedure/MasterProcedureUtil.java       | 2 +-
 .../org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/35728acd/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java
b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java
index 1e9ef6e..6226350 100644
--- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java
+++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java
@@ -160,7 +160,7 @@ public class ProcedureWALFile implements Comparable<ProcedureWALFile>
{
     boolean archived = false;
     if (walArchiveDir != null) {
       Path archivedFile = new Path(walArchiveDir, logFile.getName());
-      LOG.info("ARCHIVED (TODO: FILES ARE NOT PURGED FROM ARCHIVE!) " + logFile + " to "
+ archivedFile);
+      LOG.info("Archiving " + logFile + " to " + archivedFile);
       if (!fs.rename(logFile, archivedFile)) {
         LOG.warn("Failed archive of " + logFile + ", deleting");
       } else {

http://git-wip-us.apache.org/repos/asf/hbase/blob/35728acd/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureUtil.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureUtil.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureUtil.java
index b87f437..4afd711 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureUtil.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureUtil.java
@@ -147,7 +147,7 @@ public final class MasterProcedureUtil {
    * Pattern used to validate a Procedure WAL file name see
    * {@link #validateProcedureWALFilename(String)} for description.
    */
-  private static final Pattern pattern = Pattern.compile(".*pv-\\d{20}.log");
+  private static final Pattern pattern = Pattern.compile(".*pv2-\\d{20}.log");
 
   /**
    * A Procedure WAL file name is of the format: pv-&lt;wal-id&gt;.log where wal-id
is 20 digits.

http://git-wip-us.apache.org/repos/asf/hbase/blob/35728acd/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java
index 43fc6a4..2d517c4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java
@@ -134,7 +134,7 @@ public class TestLogsCleaner {
 
     // Case 2: 5 Procedure WALs that are old which would be deleted
     for (int i = 1; i < 6; i++) {
-      Path fileName = new Path(oldProcedureWALDir, String.format("pv-%020d.log", i));
+      Path fileName = new Path(oldProcedureWALDir, String.format("pv2-%020d.log", i));
       fs.createNewFile(fileName);
     }
 
@@ -155,7 +155,7 @@ public class TestLogsCleaner {
 
     // Case 5: 5 Procedure WALs that are new, will stay
     for (int i = 6; i < 11; i++) {
-      Path fileName = new Path(oldProcedureWALDir, String.format("pv-%020d.log", i));
+      Path fileName = new Path(oldProcedureWALDir, String.format("pv2-%020d.log", i));
       fs.createNewFile(fileName);
     }
 


Mime
View raw message