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

Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Reid Chan 2018-01-09 17:51:05 +08:00 committed by Chia-Ping Tsai
parent d8d6ecdad1
commit 8a8be33c71
3 changed files with 5 additions and 16 deletions

View File

@ -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.

View File

@ -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;
}
}

View File

@ -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())) {