protected final Entry filterEntry(Entry entry) {
    // Always replicate if this edit is Replication Marker edit.
    if (entry != null && WALEdit.isReplicationMarkerEdit(entry.getEdit())) {
      return entry;
    }
    Entry filtered = filter.filter(entry);
    if (entry != null && (filtered == null || filtered.getEdit().size() == 0)) {
      LOG.trace("Filtered entry for replication: {}", entry);
      source.getSourceMetrics().incrLogEditsFiltered();
    }
    return filtered;
  }
Creates a reader worker for a given WAL queue. Reads WAL entries off a given queue, batches the
entries, and puts them on a batch queue.
@param fs            the files system to use
@param conf          configuration to use
@param logQueue      The WAL queue to read off of
@param startPosition position in the first WAL to start reading from
@param filter        The filter to use while reading
@param source        replication source
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java