Module org.elasticsearch.xcore
Class TransformConfig
java.lang.Object
org.elasticsearch.xpack.core.transform.transforms.TransformConfig
- All Implemented Interfaces:
Diffable<TransformConfig>,SimpleDiffable<TransformConfig>,Writeable,ToXContent,ToXContentObject
public final class TransformConfig
extends Object
implements SimpleDiffable<TransformConfig>, Writeable, ToXContentObject
This class holds the configuration details of a data frame transform
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumSpecifies all the possible transform functions.Nested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TransformConfigVersionVersion of the last time the config defaults have been changed.static final ParseFieldstatic final ParseFieldstatic final Stringstatic final TransportVersionstatic final FeatureFlagFields inherited from interface org.elasticsearch.cluster.SimpleDiffable
EMPTYFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionTransformConfig(String id, SourceConfig source, DestConfig dest, TimeValue frequency, SyncConfig syncConfig, Map<String, String> headers, PivotConfig pivotConfig, LatestConfig latestConfig, String description, SettingsConfig settings, Map<String, Object> metadata, RetentionPolicyConfig retentionPolicyConfig, Instant createTime, String version) TransformConfig(String id, SourceConfig source, DestConfig dest, TimeValue frequency, SyncConfig syncConfig, Map<String, String> headers, PivotConfig pivotConfig, LatestConfig latestConfig, String description, SettingsConfig settings, Map<String, Object> metadata, RetentionPolicyConfig retentionPolicyConfig, Instant createTime, String version, String credentialId) -
Method Summary
Modifier and TypeMethodDescriptionstatic TransformConfig.Builderbuilder()checkForDeprecations(NamedXContentRegistry namedXContentRegistry) Parses the transform configuration for deprecationsstatic StringdocumentId(String transformId) booleanstatic TransformConfigfromXContent(XContentParser parser, String optionalTransformId, boolean lenient, TransformParsingContext transformParsingContext) Determines the minimum version of a cluster in multi-cluster setup that is needed to successfully run this transform config.getId()inthashCode()static TransformConfig.Builderstatic TransformConfigrewriteForUpdate(TransformConfig transformConfig) Rewrites the transform config according to the latest format.setCreateTime(Instant createTime) setHeaders(Map<String, String> headers) setVersion(TransformConfigVersion version) booleantoString()toXContent(XContentBuilder builder, ToXContent.Params params) validate(ActionRequestValidationException validationException) validateNoCrossProjectWhenCrossProjectIsDisabled(CrossProjectModeDecider crossProjectModeDecider, ActionRequestValidationException validationException) withCredentialId(String credentialId) Returns a copy of this config with the givencredentialIdset.voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diffMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
CONFIG_VERSION_LAST_DEFAULTS_CHANGED
Version of the last time the config defaults have been changed. Whenever defaults change, we must re-write the config on update in a way it does not change behavior. -
NAME
- See Also:
-
HEADERS
-
CREDENTIAL_ID
-
TRANSFORM_CROSS_PROJECT
-
TRANSFORM_CLOUD_TOKEN
-
-
Constructor Details
-
TransformConfig
public TransformConfig(String id, SourceConfig source, DestConfig dest, TimeValue frequency, SyncConfig syncConfig, Map<String, String> headers, PivotConfig pivotConfig, LatestConfig latestConfig, String description, SettingsConfig settings, Map<String, Object> metadata, RetentionPolicyConfig retentionPolicyConfig, Instant createTime, String version) -
TransformConfig
public TransformConfig(String id, SourceConfig source, DestConfig dest, TimeValue frequency, SyncConfig syncConfig, Map<String, String> headers, PivotConfig pivotConfig, LatestConfig latestConfig, String description, SettingsConfig settings, Map<String, Object> metadata, RetentionPolicyConfig retentionPolicyConfig, Instant createTime, String version, @Nullable String credentialId) -
TransformConfig
- Throws:
IOException
-
-
Method Details
-
documentId
-
getId
-
getSource
-
getDestination
-
getFrequency
-
getSyncConfig
-
getHeaders
-
setHeaders
-
getVersion
-
setVersion
-
getCreateTime
-
setCreateTime
-
getPivotConfig
-
getLatestConfig
-
getDescription
-
getSettings
-
getMetadata
-
getRetentionPolicyConfig
-
getCredentialId
-
withCredentialId
Returns a copy of this config with the givencredentialIdset. Used by PUT/UPDATE flows after minting a new UIAM cloud credential, before writing the config to storage. -
getAdditionalSourceDestValidations
Determines the minimum version of a cluster in multi-cluster setup that is needed to successfully run this transform config.- Returns:
- version
-
validate
public ActionRequestValidationException validate(ActionRequestValidationException validationException) -
validateNoCrossProjectWhenCrossProjectIsDisabled
public ActionRequestValidationException validateNoCrossProjectWhenCrossProjectIsDisabled(CrossProjectModeDecider crossProjectModeDecider, ActionRequestValidationException validationException) -
checkForDeprecations
public List<DeprecationIssue> checkForDeprecations(NamedXContentRegistry namedXContentRegistry) throws IOException Parses the transform configuration for deprecations- Parameters:
namedXContentRegistry- XContent registry required for aggregations and query DSL- Returns:
- The deprecations of this transform
- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
fromXContent
public static TransformConfig fromXContent(XContentParser parser, @Nullable String optionalTransformId, boolean lenient, TransformParsingContext transformParsingContext) -
rewriteForUpdate
Rewrites the transform config according to the latest format. Operations cover: - move deprecated settings to its new place - change configuration options so it stays compatible (given a newer version)- Parameters:
transformConfig- original config- Returns:
- a rewritten transform config if a rewrite was necessary, otherwise the given transformConfig
-
shouldAutoMigrateMaxPageSearchSize
public boolean shouldAutoMigrateMaxPageSearchSize() -
migrateMaxPageSearchSize
-
builder
-