Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAMZA-1802: Enable host affinity when RocksDB is present #600

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -21,6 +21,7 @@
import java.util.HashMap;
import java.util.Map;

import org.apache.samza.config.ClusterManagerConfig;
import org.apache.samza.config.JavaTableConfig;
import org.apache.samza.config.StorageConfig;
import org.apache.samza.table.TableSpec;
Expand Down Expand Up @@ -56,6 +57,9 @@ public Map<String, String> generateConfig(Map<String, String> config) {
tableConfig.put(realKey, v);
});

// Enable host affinity
tableConfig.put(ClusterManagerConfig.CLUSTER_MANAGER_HOST_AFFINITY_ENABLED, "true");

logger.info("Generated configuration for table " + tableSpec.getId());

return tableConfig;
Expand Down
Expand Up @@ -81,7 +81,7 @@ public void testWithTableDescriptorsProviderClass() throws Exception {
String tableRewriterName = "tableRewriter";
configs.put("tables.descriptors.provider.class", MySampleTableDescriptorsProvider.class.getName());
Config resultConfig = new MySampleTableConfigRewriter().rewrite(tableRewriterName, new MapConfig(configs));
Assert.assertTrue(resultConfig.size() == 17);
Assert.assertTrue(resultConfig.size() == 18);

String localTableId = "local-table-1";
String remoteTableId = "remote-table-1";
Expand Down