Skip to content

Commit f70b0cb

Browse files
authored
fix: consistent behavior of customwalentry filter across hbase1.x and hbase2.x (#3562)
* fix: consistent behavior of customwalentry filter * import static * fix: proper TODO * delete the config key
1 parent 188738d commit f70b0cb

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

hbase-migration-tools/bigtable-hbase-replication/bigtable-hbase-2.x-replication/src/main/java/com/google/cloud/bigtable/hbase2_x/replication/HbaseToCloudBigtableReplicationEndpoint.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package com.google.cloud.bigtable.hbase2_x.replication;
1818
// TODO reverse the package names for 1.x and 2.x to com.google.cloud.bigtable.replication.hbase1_x
1919

20-
import static com.google.cloud.bigtable.hbase.replication.configuration.HBaseToCloudBigtableReplicationConfiguration.BIGTABLE_REPLICATION_WALENTRYFILTER_CONFIG_KEY;
20+
import static org.apache.hadoop.hbase.replication.BaseReplicationEndpoint.REPLICATION_WALENTRYFILTER_CONFIG_KEY;
2121

2222
import com.google.bigtable.repackaged.com.google.api.core.InternalExtensionOnly;
2323
import com.google.bigtable.repackaged.com.google.common.util.concurrent.AbstractService;
@@ -103,10 +103,7 @@ public WALEntryFilter getWALEntryfilter() {
103103
}
104104
if (context != null && context.getPeerConfig() != null) {
105105
String filterNameCSV =
106-
context
107-
.getPeerConfig()
108-
.getConfiguration()
109-
.get(BIGTABLE_REPLICATION_WALENTRYFILTER_CONFIG_KEY);
106+
context.getPeerConfig().getConfiguration().get(REPLICATION_WALENTRYFILTER_CONFIG_KEY);
110107
if (filterNameCSV != null && !filterNameCSV.isEmpty()) {
111108
String[] filterNames = filterNameCSV.split(",");
112109
for (String filterName : filterNames) {

hbase-migration-tools/bigtable-hbase-replication/bigtable-hbase-replication-core/src/main/java/com/google/cloud/bigtable/hbase/replication/configuration/HBaseToCloudBigtableReplicationConfiguration.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,4 @@ private HBaseToCloudBigtableReplicationConfiguration() {}
5959
// batch capacity by counts and bytes. These capacity are set by `replication.source.nb.capacity`
6060
// and `replication.source.size.capacity` config keys.
6161
public static final long DEFAULT_BATCH_SIZE_IN_BYTES = 500_000;
62-
// TODO: Plumb this config key to HBase1.x
63-
// Allow for config-driven WALEntryFilters for any bigtable replication peer
64-
public static final String BIGTABLE_REPLICATION_WALENTRYFILTER_CONFIG_KEY =
65-
"google.bigtable.replication..source.custom.walentryfilters";
6662
}

0 commit comments

Comments
 (0)