Interface WALEntrySinkFilter


@LimitedPrivate("Replication") @Evolving public interface WALEntrySinkFilter
Implementations are installed on a Replication Sink called from inside ReplicationSink#replicateEntries to filter replicated WALEntries based off WALEntry attributes. Currently only table name and replication write time are exposed (WALEntry is a private, internal class so we cannot pass it here). To install, set hbase.replication.sink.walentryfilter to the name of the implementing class. Implementing class must have a no-param Constructor.

This filter is of limited use. It is better to filter on the replication source rather than here after the edits have been shipped on the replication sink. That said, applications such as the hbase-indexer want to filter out any edits that were made before replication was enabled.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of configuration to set with name of implementing WALEntrySinkFilter class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    filter(TableName table, long writeTime)
     
    void
    Called after Construction.
  • Field Details

  • Method Details

    • init

      void init(AsyncConnection conn)
      Called after Construction. Use passed Connection to keep any context the filter might need.
    • filter

      boolean filter(TableName table, long writeTime)
      Parameters:
      table - Table edit is destined for.
      writeTime - Time at which the edit was created on the source.
      Returns:
      True if we are to filter out the edit.