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.hadoop.fs.FileStatus;
021import org.apache.yetus.audience.InterfaceAudience;
022
023/**
024 * Base class for the log cleaning function inside the master. By default, three cleaners:
025 * <code>TimeToLiveLogCleaner</code>, <code>TimeToLiveProcedureWALCleaner</code> and
026 * <code>ReplicationLogCleaner</code> are called in order. So if other effects are needed, implement
027 * your own LogCleanerDelegate and add it to the configuration "hbase.master.logcleaner.plugins",
028 * which is a comma-separated list of fully qualified class names. LogsCleaner will add it to the
029 * chain.
030 * <p>
031 * HBase ships with LogsCleaner as the default implementation.
032 * <p>
033 * This interface extends Configurable, so setConf needs to be called once before using the cleaner.
034 * Since LogCleanerDelegates are created in LogsCleaner by reflection. Classes that implements this
035 * interface should provide a default constructor.
036 */
037@InterfaceAudience.Private
038public abstract class BaseLogCleanerDelegate extends BaseFileCleanerDelegate {
039
040  @Override
041  public boolean isFileDeletable(FileStatus fStat) {
042    return false;
043  }
044}