@Override
  public void init(Map<String, Object> params) {
    MasterServices master = (MasterServices) MapUtils.getObject(params, HMaster.MASTER);
    if (master != null) {
      conn = master.getConnection();
      if (getConf() == null) {
        super.setConf(conn.getConfiguration());
      }
    }
    if (conn == null) {
      try {
        conn = ConnectionFactory.createConnection(getConf());
      } catch (IOException ioe) {
        throw new RuntimeException("Failed to create connection", ioe);
      }
    }
  }
Implementation of a log cleaner that checks if a log is still scheduled for incremental backup
before deleting it when its TTL is over.
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java