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:
Michael Stack 2012-08-17 23:30:19 +00:00
parent e4635cedad
commit 1908123fbe
6 changed files with 11 additions and 9 deletions

View File

@ -48,7 +48,7 @@ public class LongTermArchivingHFileCleaner extends BaseHFileCleanerDelegate {
private FileSystem fs; private FileSystem fs;
@Override @Override
public boolean isFileDeleteable(Path file) { public boolean isFileDeletable(Path file) {
try { try {
FileStatus[] deleteStatus = FSUtils.listStatus(this.fs, file, null); FileStatus[] deleteStatus = FSUtils.listStatus(this.fs, file, null);

View File

@ -40,17 +40,19 @@ import org.apache.hadoop.hbase.BaseConfigurable;
public abstract class BaseLogCleanerDelegate extends BaseConfigurable implements FileCleanerDelegate { public abstract class BaseLogCleanerDelegate extends BaseConfigurable implements FileCleanerDelegate {
@Override @Override
public boolean isFileDeleteable(Path file) { public boolean isFileDeletable(Path file) {
return isLogDeletable(file); return isLogDeletable(file);
} }
/** /**
* Should the master delete the log or keep it? * Should the master delete the log or keep it?
* <p> * <p>
* Implementing classes should override {@link #isFileDeleteable(Path)} instead. * Implementing classes should override {@link #isFileDeletable(Path)} instead.
* @param filePath full path to log. * @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 @Deprecated
public abstract boolean isLogDeletable(Path filePath); public boolean isLogDeletable(Path filePath) {
return false;
}
} }

View File

@ -210,7 +210,7 @@ public abstract class CleanerChore<T extends FileCleanerDelegate> extends Chore
return; return;
} }
if (!cleaner.isFileDeleteable(filePath)) { if (!cleaner.isFileDeletable(filePath)) {
// this file is not deletable, then we are done // this file is not deletable, then we are done
LOG.debug(filePath + " is not deletable according to:" + cleaner); LOG.debug(filePath + " is not deletable according to:" + cleaner);
return; return;

View File

@ -35,6 +35,6 @@ public interface FileCleanerDelegate extends Configurable, Stoppable {
* @param file full path to the file to check * @param file full path to the file to check
* @return <tt>true</tt> if the file is deletable, <tt>false</tt> if not * @return <tt>true</tt> if the file is deletable, <tt>false</tt> if not
*/ */
public boolean isFileDeleteable(Path file); public boolean isFileDeletable(Path file);
} }

View File

@ -50,7 +50,7 @@ public class TimeToLiveHFileCleaner extends BaseHFileCleanerDelegate {
} }
@Override @Override
public boolean isFileDeleteable(Path filePath) { public boolean isFileDeletable(Path filePath) {
if (!instantiateFS()) { if (!instantiateFS()) {
return false; return false;
} }

View File

@ -31,7 +31,7 @@ public class CheckedArchivingHFileCleaner extends BaseHFileCleanerDelegate {
private static boolean checked; private static boolean checked;
@Override @Override
public boolean isFileDeleteable(Path file) { public boolean isFileDeletable(Path file) {
checked = true; checked = true;
return true; return true;
} }