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

rm vars not referenced #69

Merged
merged 3 commits into from
Oct 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions src/main/java/com/jwplayer/southpaw/Southpaw.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,24 +144,31 @@ public class Southpaw {
protected static class Config {
public static final String BACKUP_TIME_S_CONFIG = "backup.time.s";
public static final int BACKUP_TIME_S_DEFAULT = 1800;
public static final String BACKUP_TIME_S_DOC = "Time interval (roughly) between backups";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok with removing these unused vars, but can we instead convert these to docstrings for the config values

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved these values to their respective fields

public static final String COMMIT_TIME_S_CONFIG = "commit.time.s";
public static final int COMMIT_TIME_S_DEFAULT = 0;
public static final String COMMIT_TIME_S_DOC = "Time interval (roughly) between commits";
public static final String CREATE_RECORDS_TRIGGER_CONFIG = "create.records.trigger";
public static final int CREATE_RECORDS_TRIGGER_DEFAULT = 250000;
public static final String CREATE_RECORDS_TRIGGER_DOC =
"Config for when to create denormalized records once the number of records to create has exceeded " +
"a certain amount";
public static final String TOPIC_LAG_TRIGGER_CONFIG = "topic.lag.trigger";
public static final String TOPIC_LAG_TRIGGER_DEFAULT = "1000";
public static final String TOPIC_LAG_TRIGGER_DOC =
"Config for when to switch from one topic to the next (or to stop processing a topic entirely), " +
"when lag drops below this value.";

/**
* Time interval (roughly) between backups
*/
public int backupTimeS;

/**
* Time interval (roughly) between commits
*/
public int commitTimeS;

/**
* Config for when to create denormalized records once the number of records to create has exceeded a certain amount
*/
public int createRecordsTrigger;

/**
* Config for when to switch from one topic to the next (or to stop processing a topic entirely), when lag drops below this value
*/
public int topicLagTrigger;

public Config(Map<String, Object> rawConfig) throws ClassNotFoundException {
Expand Down Expand Up @@ -763,7 +770,6 @@ protected static Relation[] loadRelations(List<URI> uris) throws IOException, UR
public static void main(String args[]) throws Exception {
String BUILD = "build";
String CONFIG = "config";
String DEBUG = "debug";
String DELETE_BACKUP = "delete-backup";
String DELETE_STATE = "delete-state";
String HELP = "help";
Expand Down