Module org.elasticsearch.xcore
Class SettingsConfig.Builder
java.lang.Object
org.elasticsearch.xpack.core.transform.transforms.SettingsConfig.Builder
- Enclosing class:
SettingsConfig
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()Default builderBuilder(SettingsConfig base) Builder starting from existing settings as base, for the purpose of partially updating settings. -
Method Summary
Modifier and TypeMethodDescriptionbuild()setAlignCheckpoints(Boolean alignCheckpoints) Whether to align transform checkpoint ranges with date histogram interval.setDatesAsEpochMillis(Boolean datesAsEpochMillis) Whether to write the output of a date aggregation as millis since epoch or as formatted string (ISO format).setDeduceMappings(Boolean deduceMappings) Whether the destination index mappings should be deduced from the transform config.setMaxPageSearchSize(Integer maxPageSearchSize) Sets the paging maximum paging maxPageSearchSize that transform can use when pulling the data from the source index.setNumFailureRetries(Integer numFailureRetries) setRequestsPerSecond(Float documentsPerSecond) Sets the docs per second that transform can use when pulling the data from the source index.setUnattended(Boolean unattended) Whether to run the transform in unattended mode.Whether the point in time API should be used for search.update(SettingsConfig update) Update settings according to given settings config.
-
Constructor Details
-
Builder
public Builder()Default builder -
Builder
Builder starting from existing settings as base, for the purpose of partially updating settings.- Parameters:
base- base settings
-
-
Method Details
-
setMaxPageSearchSize
Sets the paging maximum paging maxPageSearchSize that transform can use when pulling the data from the source index. If OOM is triggered, the paging maxPageSearchSize is dynamically reduced so that the transform can continue to gather data.- Parameters:
maxPageSearchSize- Integer value between 10 and 10_000- Returns:
- the
SettingsConfig.Builderwith the paging maxPageSearchSize set.
-
setRequestsPerSecond
Sets the docs per second that transform can use when pulling the data from the source index. This setting throttles transform by issuing queries less often, however processing still happens in batches. A value of 0 disables throttling (default).- Parameters:
documentsPerSecond- Integer value- Returns:
- the
SettingsConfig.Builderwith requestsPerSecond set.
-
setDatesAsEpochMillis
Whether to write the output of a date aggregation as millis since epoch or as formatted string (ISO format). Transforms created before 7.11 write dates as epoch_millis. The new default is ISO string. You can use this setter to configure the old style writing as epoch millis. An explicit `null` resets to default.- Parameters:
datesAsEpochMillis- true if dates should be written as epoch_millis.- Returns:
- the
SettingsConfig.Builderwith datesAsEpochMilli set.
-
setAlignCheckpoints
Whether to align transform checkpoint ranges with date histogram interval. An explicit `null` resets to default.- Parameters:
alignCheckpoints- true if checkpoint ranges should be aligned with date histogram interval.- Returns:
- the
SettingsConfig.Builderwith alignCheckpoints set.
-
setUsePit
Whether the point in time API should be used for search. Point in time is a more resource friendly way to query. It is used per default. In case of problems you can disable the point in time API usage with this setting. An explicit `null` resets to default.- Parameters:
usePit- true if the point in time API should be used.- Returns:
- the
SettingsConfig.Builderwith usePit set.
-
setDeduceMappings
Whether the destination index mappings should be deduced from the transform config. It is used per default. An explicit `null` resets to default.- Parameters:
deduceMappings- true if the transform should try deducing mappings from the config.- Returns:
- the
SettingsConfig.Builderwith deduceMappings set.
-
setNumFailureRetries
-
setUnattended
Whether to run the transform in unattended mode. In unattended mode the transform does not immediately fail for errors that are classified as irrecoverable. An explicit `null` resets to default.- Parameters:
unattended- true if this is a unattended transform.- Returns:
- the
SettingsConfig.Builderwith unattended set.
-
update
Update settings according to given settings config.- Parameters:
update- update settings- Returns:
- the
SettingsConfig.Builderwith applied updates.
-
build
-