@Test public void testChangelogEnabledWithCustomParameters() { Map<String, String> tableConfig = createTableDescriptor() .withChangelogStream("my-stream") .withChangelogReplicationFactor(100) .toConfig(createJobConfig()); Assert.assertEquals(3, tableConfig.size()); Assert.assertEquals("my-stream", String.format( tableConfig.get(String.format(StorageConfig.CHANGELOG_STREAM(), TABLE_ID)))); Assert.assertEquals("100", String.format( tableConfig.get(String.format(StorageConfig.CHANGELOG_REPLICATION_FACTOR(), TABLE_ID)))); }
BaseLocalStoreBackedTableDescriptor.INTERNAL_CHANGELOG_REPLICATION_FACTOR); if (changelogReplicationFactor != null) { storeConfig.put(String.format(StorageConfig.CHANGELOG_REPLICATION_FACTOR(), tableSpec.getId()), changelogReplicationFactor);
BaseLocalStoreBackedTableDescriptor.INTERNAL_CHANGELOG_REPLICATION_FACTOR); if (changelogReplicationFactor != null) { storeConfig.put(String.format(StorageConfig.CHANGELOG_REPLICATION_FACTOR(), tableSpec.getId()), changelogReplicationFactor);
assertEquals("fifo", RocksDbTableDescriptor.ROCKSDB_COMPACTION_STYLE, tableConfig); Assert.assertFalse(tableConfig.containsKey(String.format(StorageConfig.CHANGELOG_STREAM(), TABLE_ID))); Assert.assertFalse(tableConfig.containsKey(String.format(StorageConfig.CHANGELOG_REPLICATION_FACTOR(), TABLE_ID))); Assert.assertEquals("xyz", tableConfig.get("abc"));