001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.apache.hadoop.hbase.master.cleaner;
019
020import org.apache.yetus.audience.InterfaceAudience;
021import org.apache.hadoop.fs.FileStatus;
022
023/**
024 * Base class for the log cleaning function inside the master. By default, three
025 * cleaners: <code>TimeToLiveLogCleaner</code>,
026 * <code>TimeToLiveProcedureWALCleaner</code> and
027 * <code>ReplicationLogCleaner</code> are called in order. So if other effects
028 * are needed, implement your own LogCleanerDelegate and add it to the
029 * configuration "hbase.master.logcleaner.plugins", which is a comma-separated
030 * list of fully qualified class names. LogsCleaner will add it to the chain.
031 * <p>
032 * HBase ships with LogsCleaner as the default implementation.
033 * <p>
034 * This interface extends Configurable, so setConf needs to be called once
035 * before using the cleaner. Since LogCleanerDelegates are created in
036 * LogsCleaner by reflection. Classes that implements this interface should
037 * provide a default constructor.
038 */
039@InterfaceAudience.Private
040public abstract class BaseLogCleanerDelegate extends BaseFileCleanerDelegate {
041
042  @Override
043  public boolean isFileDeletable(FileStatus fStat) {
044    return false;
045  }
046}