Uh oh!
There was an error while loading. Please reload this page.
HBASE-24817 Allow configuring WALEntry filters on ReplicationSource - #2198
Conversation
Apache-HBase
commented
Aug 4, 2020
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Aug 5, 2020
💔 -1 overall
This message was automatically generated. |
virajjasani
left a comment
There was a problem hiding this comment.
Few minor nits, +1 otherwise
| * the entry to be skipped for replication. | ||
| */ | ||
| public Entry filter(Entry entry); | ||
| Entry filter(Entry entry); |
There was a problem hiding this comment.
For system tables we return null Entry. Good to consider return type Optional<Entry> here?
Maybe as follow up task?
There was a problem hiding this comment.
This is how it works now.... no Optional. Will leave it in this patch. Thanks.
| // Test non-system WAL edit. | ||
| WAL.Entry e = new WAL.Entry(new WALKeyImpl(HConstants.EMPTY_BYTE_ARRAY, | ||
| TableName.valueOf("test"), -1), new WALEdit()); | ||
| assertTrue(wef.filter(e) == e); |
There was a problem hiding this comment.
nit: just in case if you like assertSame(e, wef.filter(e))
| @Override public void init(Context context) throws IOException { | ||
| this.ctx = context; | ||
| return; |
| if (queueSize > this.logQueueWarnThreshold) { | ||
| LOG.warn("{} WAL group {} queue size: {} exceeds value of " | ||
| + "replication.source.log.queue.warn: {}", logPeerId(), | ||
| + "replication.source.wal.queue.warn: {}", logPeerId(), |
There was a problem hiding this comment.
Are we changing this config name also in this patch?
There was a problem hiding this comment.
Good catch. Thanks. Let me restore.
Allow specifying base WALEntry filter on construction of ReplicationSource. Add means of being able to filter WALs by name. hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java Add constructor that allows passing a predicate for filtering *in* WALs and a list of filters for filtering *out* WALEntries. The latter was hardcoded to filter out system-table WALEntries. The former did not exist but we'll need it if Replication takes in more than just the default Provider.
saintstack
commented
Aug 5, 2020
The failures seem unrelated (too many and the few I checked pass locally) |
Apache-HBase
commented
Aug 5, 2020
🎊 +1 overall
This message was automatically generated. |
…2198) Allow specifying base WALEntry filter on construction of ReplicationSource. Add means of being able to filter WALs by name. hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java Add constructor that allows passing a predicate for filtering *in* WALs and a list of filters for filtering *out* WALEntries. The latter was hardcoded to filter out system-table WALEntries. The former did not exist but we'll need it if Replication takes in more than just the default Provider. Signed-off-by Anoop Sam John <anoopsamjohn@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…pache#2198) Allow specifying base WALEntry filter on construction of ReplicationSource. Add means of being able to filter WALs by name. hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java Add constructor that allows passing a predicate for filtering *in* WALs and a list of filters for filtering *out* WALEntries. The latter was hardcoded to filter out system-table WALEntries. The former did not exist but we'll need it if Replication takes in more than just the default Provider. Signed-off-by Anoop Sam John <anoopsamjohn@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
Allow specifying base WALEntry filter on construction of
ReplicationSource. Add means of being able to filter WALs by name.
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
Add constructor that allows passing a predicate for filtering in WALs
and a list of filters for filtering out WALEntries. The latter was
hardcoded to filter out system-table WALEntries. The former did not
exist but we'll need it if Replication takes in more than just the
default Provider.