hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chia7...@apache.org
Subject hbase git commit: HBASE-19736 Remove BaseLogCleanerDelegate deprecated #isLogDeletable(FileStatus) and use #isFileDeletable(FileStatus) instead
Date Wed, 17 Jan 2018 13:28:52 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 48bb19012 -> f22cf7226


HBASE-19736 Remove BaseLogCleanerDelegate deprecated #isLogDeletable(FileStatus) and use #isFileDeletable(FileStatus)
instead

Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>


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

Branch: refs/heads/branch-2
Commit: f22cf7226eb1debe582c41a8de94c32778a3ac9e
Parents: 48bb190
Author: Reid Chan <reidddchan@outlook.com>
Authored: Tue Jan 9 17:51:05 2018 +0800
Committer: Chia-Ping Tsai <chia7712@gmail.com>
Committed: Wed Jan 17 21:25:20 2018 +0800

----------------------------------------------------------------------
 .../master/cleaner/BaseHFileCleanerDelegate.java   |  2 +-
 .../master/cleaner/BaseLogCleanerDelegate.java     | 17 +++--------------
 .../hbase/master/cleaner/TimeToLiveLogCleaner.java |  2 +-
 3 files changed, 5 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f22cf722/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/BaseHFileCleanerDelegate.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/BaseHFileCleanerDelegate.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/BaseHFileCleanerDelegate.java
index 8de59bd..d8a3f92 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/BaseHFileCleanerDelegate.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/BaseHFileCleanerDelegate.java
@@ -23,7 +23,7 @@ import org.apache.yetus.audience.InterfaceAudience;
  * Base class for the hfile cleaning function inside the master. By default, only the
  * {@link TimeToLiveHFileCleaner} is called.
  * <p>
- * If other effects are needed, implement your own LogCleanerDelegate and add it to the
+ * If other effects are needed, implement your own HFileCleanerDelegate and add it to the
  * configuration "hbase.master.hfilecleaner.plugins", which is a comma-separated list of
fully
  * qualified class names. The <code>HFileCleaner</code> will build the cleaner
chain in
  * order the order specified by the configuration.

http://git-wip-us.apache.org/repos/asf/hbase/blob/f22cf722/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/BaseLogCleanerDelegate.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/BaseLogCleanerDelegate.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/BaseLogCleanerDelegate.java
index b1f9d0b..fcfeb79 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/BaseLogCleanerDelegate.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/BaseLogCleanerDelegate.java
@@ -21,8 +21,9 @@ import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.hadoop.fs.FileStatus;
 
 /**
- * Base class for the log cleaning function inside the master. By default, two
- * cleaners: <code>TimeToLiveLogCleaner</code> and
+ * Base class for the log cleaning function inside the master. By default, three
+ * cleaners: <code>TimeToLiveLogCleaner</code>,
+ * <code>TimeToLiveProcedureWALCleaner</code> and
  * <code>ReplicationLogCleaner</code> are called in order. So if other effects
  * are needed, implement your own LogCleanerDelegate and add it to the
  * configuration "hbase.master.logcleaner.plugins", which is a comma-separated
@@ -40,18 +41,6 @@ public abstract class BaseLogCleanerDelegate extends BaseFileCleanerDelegate
{
 
   @Override
   public boolean isFileDeletable(FileStatus fStat) {
-    return isLogDeletable(fStat);
-  }
-
-  /**
-   * Should the master delete the log or keep it?
-   * <p>
-   * Implementing classes should override {@link #isFileDeletable(FileStatus)} instead.
-   * @param fStat file status of the file
-   * @return true if the log is deletable, false (default) if not
-   */
-  @Deprecated
-  public boolean isLogDeletable(FileStatus fStat) {
     return false;
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/f22cf722/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/TimeToLiveLogCleaner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/TimeToLiveLogCleaner.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/TimeToLiveLogCleaner.java
index 7385273..670bd88 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/TimeToLiveLogCleaner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/TimeToLiveLogCleaner.java
@@ -41,7 +41,7 @@ public class TimeToLiveLogCleaner extends BaseLogCleanerDelegate {
   private boolean stopped = false;
 
   @Override
-  public boolean isLogDeletable(FileStatus fStat) {
+  public boolean isFileDeletable(FileStatus fStat) {
     // Files are validated for the second time here,
     // if it causes a bottleneck this logic needs refactored
     if (!AbstractFSWALProvider.validateWALFilename(fStat.getPath().getName())) {


Mime
View raw message