Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Made marvel.agent.shard_stats.enabled dynamically updatable
Browse files Browse the repository at this point in the history
Relates to #20
  • Loading branch information
bleskes committed Mar 12, 2014
1 parent ead75e2 commit 0a5a63d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public AgentService(Settings settings, IndicesService indicesService,
nodeSettingsService.addListener(this);
dynamicSettings.addDynamicSetting(SETTINGS_INTERVAL);
dynamicSettings.addDynamicSetting(SETTINGS_INDICES + ".*"); // array settings
dynamicSettings.addDynamicSetting(SETTINGS_SHARD_STATS_ENABLED);
}

protected void applyIntervalSettings() {
Expand Down Expand Up @@ -202,6 +203,12 @@ public void onRefreshSettings(Settings settings) {
logger.info("sampling indices updated to [{}]", Strings.arrayToCommaDelimitedString(indices));
indicesToExport = indices;
}

Boolean shardsExport = settings.getAsBoolean(SETTINGS_SHARD_STATS_ENABLED, null);
if (shardsExport != null) {
logger.info("updating " + SETTINGS_SHARD_STATS_ENABLED + " to [" + shardsExport + "]");
exportShardStats = shardsExport;
}
}

class ExportingWorker implements Runnable {
Expand Down

0 comments on commit 0a5a63d

Please sign in to comment.