Skip to content

Commit

Permalink
[FLINK-3660][hotfix] Add missing default value in ConfigConstants
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger committed Oct 14, 2016
1 parent 436c333 commit 5dc624b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,12 @@ public final class ConfigConstants {
/** Default retry delay on location lookup failures. */
public static final int DEFAULT_QUERYABLE_STATE_CLIENT_LOOKUP_RETRY_DELAY = 1000;

// ----------------------------- Metrics ----------------------------

/** The default number of measured latencies to maintain at each operator */
public static final int DEFAULT_METRICS_LATENCY_HISTORY_SIZE = 128;


// ----------------------------- Environment Variables ----------------------------

/** The environment variable name which contains the location of the configuration directory */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void setup(StreamTask<?, ?> containingTask, StreamConfig config, Output<S
Configuration taskManagerConfig = container.getEnvironment().getTaskManagerInfo().getConfiguration();
int historySize = taskManagerConfig.getInteger(ConfigConstants.METRICS_LATENCY_HISTORY_SIZE, ConfigConstants.DEFAULT_METRICS_LATENCY_HISTORY_SIZE);
if (historySize <= 0) {
LOG.warn("{} has been set to a value below 0: {}. Using default.", ConfigConstants.METRICS_LATENCY_HISTORY_SIZE, historySize);
LOG.warn("{} has been set to a value equal or below 0: {}. Using default.", ConfigConstants.METRICS_LATENCY_HISTORY_SIZE, historySize);
historySize = ConfigConstants.DEFAULT_METRICS_LATENCY_HISTORY_SIZE;
}

Expand Down

0 comments on commit 5dc624b

Please sign in to comment.