Skip to content

Commit

Permalink
adding support for non-1 num_tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Glamdring committed Mar 19, 2018
1 parent 588e54b commit 4f333d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions priam/src/main/java/com/netflix/priam/IConfiguration.java
Expand Up @@ -739,4 +739,6 @@ public interface IConfiguration {
* @return SNS Topic ARN to be used to send notification.
*/
public String getBackupNotificationTopicArn();

public int getNumTokens();
}
Expand Up @@ -230,7 +230,7 @@ public class PriamConfiguration implements IConfiguration {
private final int DEFAULT_RESTORE_THREADS = 8;
private final int DEFAULT_BACKUP_CHUNK_SIZE = 10;
private final int DEFAULT_BACKUP_RETENTION = 0;
private final int DEFAULT_VNODE_NUM_TOKENS = 1;
private final int DEFAULT_VNODE_NUM_TOKENS = 256;
private final int DEFAULT_HINTS_MAX_THREADS = 2; //default value from 1.2 yaml
private final int DEFAULT_HINTS_THROTTLE_KB = 1024; //default value from 1.2 yaml
private final String DEFAULT_INTERNODE_COMPRESSION = "all"; //default value from 1.2 yaml
Expand Down Expand Up @@ -795,6 +795,7 @@ public String getCassProcessName() {
return config.get(CONFIG_CASS_PROCESS_NAME, DEFAULT_CASS_PROCESS_NAME);
}

@Override
public int getNumTokens() {
return config.get(CONFIG_VNODE_NUM_TOKENS, DEFAULT_VNODE_NUM_TOKENS);
}
Expand Down
Expand Up @@ -124,8 +124,7 @@ public void writeAllProperties(String yamlLocation, String hostname, String seed

configfureSecurity(map);
configureGlobalCaches(config, map);
//force to 1 until vnodes are properly supported
map.put("num_tokens", 1);
map.put("num_tokens", config.getNumTokens());


addExtraCassParams(map);
Expand Down

0 comments on commit 4f333d3

Please sign in to comment.