Skip to content

Commit

Permalink
Change plugin setting name from 'opensearch.' to 'pluigns.' (#27)
Browse files Browse the repository at this point in the history
Signed-off-by: Tianli Feng <ftianli@amazon.com>
  • Loading branch information
Tianli Feng committed May 20, 2021
1 parent 45c12ad commit 1eb8e28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,32 @@

public class JobSchedulerSettings {
public static final Setting<TimeValue> REQUEST_TIMEOUT = Setting.positiveTimeSetting(
"opensearch.jobscheduler.request_timeout",
"plugins.jobscheduler.request_timeout",
LegacyOpenDistroJobSchedulerSettings.REQUEST_TIMEOUT,
Setting.Property.NodeScope, Setting.Property.Dynamic);

public static final Setting<TimeValue> SWEEP_BACKOFF_MILLIS = Setting.positiveTimeSetting(
"opensearch.jobscheduler.sweeper.backoff_millis",
"plugins.jobscheduler.sweeper.backoff_millis",
LegacyOpenDistroJobSchedulerSettings.SWEEP_BACKOFF_MILLIS,
Setting.Property.NodeScope, Setting.Property.Dynamic);

public static final Setting<Integer> SWEEP_BACKOFF_RETRY_COUNT = Setting.intSetting(
"opensearch.jobscheduler.retry_count",
"plugins.jobscheduler.retry_count",
LegacyOpenDistroJobSchedulerSettings.SWEEP_BACKOFF_RETRY_COUNT,
Setting.Property.NodeScope, Setting.Property.Dynamic);

public static final Setting<TimeValue> SWEEP_PERIOD = Setting.positiveTimeSetting(
"opensearch.jobscheduler.sweeper.period",
"plugins.jobscheduler.sweeper.period",
LegacyOpenDistroJobSchedulerSettings.SWEEP_PERIOD,
Setting.Property.NodeScope, Setting.Property.Dynamic);

public static final Setting<Integer> SWEEP_PAGE_SIZE = Setting.intSetting(
"opensearch.jobscheduler.sweeper.page_size",
"plugins.jobscheduler.sweeper.page_size",
LegacyOpenDistroJobSchedulerSettings.SWEEP_PAGE_SIZE,
Setting.Property.NodeScope, Setting.Property.Dynamic);

public static final Setting<Double> JITTER_LIMIT = Setting.doubleSetting(
"opensearch.jobscheduler.jitter_limit",
"plugins.jobscheduler.jitter_limit",
LegacyOpenDistroJobSchedulerSettings.JITTER_LIMIT,
Setting.Property.NodeScope, Setting.Property.Dynamic);
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void testLegacyOpenDistroSettingsFallback() {
}

public void testSettingsGetValue() {
Settings settings = Settings.builder().put("opensearch.jobscheduler.request_timeout", "42s").build();
Settings settings = Settings.builder().put("plugins.jobscheduler.request_timeout", "42s").build();
assertEquals(JobSchedulerSettings.REQUEST_TIMEOUT.get(settings), TimeValue.timeValueSeconds(42));
assertEquals(LegacyOpenDistroJobSchedulerSettings.REQUEST_TIMEOUT.get(settings), TimeValue.timeValueSeconds(10));
}
Expand Down

0 comments on commit 1eb8e28

Please sign in to comment.