Class SettingsConfig.Builder

java.lang.Object
org.elasticsearch.xpack.core.transform.transforms.SettingsConfig.Builder
Enclosing class:
SettingsConfig

public static class SettingsConfig.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
      Default builder
    • Builder

      public Builder(SettingsConfig base)
      Builder starting from existing settings as base, for the purpose of partially updating settings.
      Parameters:
      base - base settings
  • Method Details

    • setMaxPageSearchSize

      public SettingsConfig.Builder setMaxPageSearchSize(Integer maxPageSearchSize)
      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.Builder with the paging maxPageSearchSize set.
    • setRequestsPerSecond

      public SettingsConfig.Builder setRequestsPerSecond(Float documentsPerSecond)
      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.Builder with requestsPerSecond set.
    • setDatesAsEpochMillis

      public SettingsConfig.Builder setDatesAsEpochMillis(Boolean datesAsEpochMillis)
      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.Builder with datesAsEpochMilli set.
    • setAlignCheckpoints

      public SettingsConfig.Builder setAlignCheckpoints(Boolean alignCheckpoints)
      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.Builder with alignCheckpoints set.
    • setUsePit

      public SettingsConfig.Builder setUsePit(Boolean usePit)
      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.Builder with usePit set.
    • setDeduceMappings

      public SettingsConfig.Builder setDeduceMappings(Boolean deduceMappings)
      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.Builder with deduceMappings set.
    • setNumFailureRetries

      public SettingsConfig.Builder setNumFailureRetries(Integer numFailureRetries)
    • setUnattended

      public SettingsConfig.Builder setUnattended(Boolean unattended)
      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.Builder with unattended set.
    • update

      public SettingsConfig.Builder update(SettingsConfig update)
      Update settings according to given settings config.
      Parameters:
      update - update settings
      Returns:
      the SettingsConfig.Builder with applied updates.
    • build

      public SettingsConfig build()