HBASE-6055 Fix hfile/log cleaning delegate method naming
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1374478 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e4635cedad
commit
1908123fbe
|
@ -48,7 +48,7 @@ public class LongTermArchivingHFileCleaner extends BaseHFileCleanerDelegate {
|
|||
private FileSystem fs;
|
||||
|
||||
@Override
|
||||
public boolean isFileDeleteable(Path file) {
|
||||
public boolean isFileDeletable(Path file) {
|
||||
try {
|
||||
|
||||
FileStatus[] deleteStatus = FSUtils.listStatus(this.fs, file, null);
|
||||
|
|
|
@ -40,17 +40,19 @@ import org.apache.hadoop.hbase.BaseConfigurable;
|
|||
public abstract class BaseLogCleanerDelegate extends BaseConfigurable implements FileCleanerDelegate {
|
||||
|
||||
@Override
|
||||
public boolean isFileDeleteable(Path file) {
|
||||
public boolean isFileDeletable(Path file) {
|
||||
return isLogDeletable(file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Should the master delete the log or keep it?
|
||||
* <p>
|
||||
* Implementing classes should override {@link #isFileDeleteable(Path)} instead.
|
||||
* Implementing classes should override {@link #isFileDeletable(Path)} instead.
|
||||
* @param filePath full path to log.
|
||||
* @return true if the log is deletable, false if not
|
||||
* @return true if the log is deletable, false (default) if not
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract boolean isLogDeletable(Path filePath);
|
||||
public boolean isLogDeletable(Path filePath) {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -210,7 +210,7 @@ public abstract class CleanerChore<T extends FileCleanerDelegate> extends Chore
|
|||
return;
|
||||
}
|
||||
|
||||
if (!cleaner.isFileDeleteable(filePath)) {
|
||||
if (!cleaner.isFileDeletable(filePath)) {
|
||||
// this file is not deletable, then we are done
|
||||
LOG.debug(filePath + " is not deletable according to:" + cleaner);
|
||||
return;
|
||||
|
|
|
@ -35,6 +35,6 @@ public interface FileCleanerDelegate extends Configurable, Stoppable {
|
|||
* @param file full path to the file to check
|
||||
* @return <tt>true</tt> if the file is deletable, <tt>false</tt> if not
|
||||
*/
|
||||
public boolean isFileDeleteable(Path file);
|
||||
public boolean isFileDeletable(Path file);
|
||||
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class TimeToLiveHFileCleaner extends BaseHFileCleanerDelegate {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isFileDeleteable(Path filePath) {
|
||||
public boolean isFileDeletable(Path filePath) {
|
||||
if (!instantiateFS()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class CheckedArchivingHFileCleaner extends BaseHFileCleanerDelegate {
|
|||
private static boolean checked;
|
||||
|
||||
@Override
|
||||
public boolean isFileDeleteable(Path file) {
|
||||
public boolean isFileDeletable(Path file) {
|
||||
checked = true;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue