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.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Name of configuration to set with name of implementing WALEntrySinkFilter class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
init
(Connection connection) Called after Construction.
-
Field Details
-
WAL_ENTRY_FILTER_KEY
Name of configuration to set with name of implementing WALEntrySinkFilter class.- See Also:
-
-
Method Details
-
init
Called after Construction. Use passed Connection to keep any context the filter might need. -
filter
- 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.
-