@Override
  public void init(Map<String, Object> params) {
    super.init(params);
    try {
      if (MapUtils.isNotEmpty(params)) {
        Object master = params.get(HMaster.MASTER);
        if (master != null && master instanceof Server) {
          conn = ((Server) master).getConnection();
          shareConn = true;
        }
      }
      if (conn == null) {
        conn = ConnectionFactory.createConnection(getConf());
      }
      this.rqs = ReplicationStorageFactory.getReplicationQueueStorage(conn, getConf());
    } catch (IOException e) {
      LOG.error("Error while configuring " + this.getClass().getName(), e);
    }
  }
Implementation of a file cleaner that checks if a hfile is still scheduled for replication before
deleting it from hfile archive directory.
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationHFileCleaner.java