@Override
  public WAL.Entry filter(WAL.Entry entry) {
    entry = super.filter(entry);
    if (filterEmptyEntry && entry != null && entry.getEdit().isEmpty()) {
      return null;
    }
    return entry;
  }
A {@link ChainWALEntryFilter} for providing more flexible options
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ChainWALEmptyEntryFilter.java