Module org.elasticsearch.xcore
Class TransformConfig
java.lang.Object
org.elasticsearch.xpack.core.transform.transforms.TransformConfig
- All Implemented Interfaces:
Diffable<TransformConfig>,SimpleDiffable<TransformConfig>,Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public final class TransformConfig
extends Object
implements SimpleDiffable<TransformConfig>, Writeable, org.elasticsearch.xcontent.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
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.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 org.elasticsearch.xcontent.ParseFieldstatic final StringFields 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, org.elasticsearch.core.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) -
Method Summary
Modifier and TypeMethodDescriptionstatic TransformConfig.Builderbuilder()checkForDeprecations(org.elasticsearch.xcontent.NamedXContentRegistry namedXContentRegistry) Parses the transform configuration for deprecationsstatic StringdocumentId(String transformId) booleanstatic TransformConfigfromXContent(org.elasticsearch.xcontent.XContentParser parser, String optionalTransformId, boolean lenient) Determines the minimum version of a cluster in multi-cluster setup that is needed to successfully run this transform config.org.elasticsearch.core.TimeValuegetId()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()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) validate(ActionRequestValidationException validationException) 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
public static final org.elasticsearch.xcontent.ParseField HEADERS
-
-
Constructor Details
-
TransformConfig
public TransformConfig(String id, SourceConfig source, DestConfig dest, org.elasticsearch.core.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
- Throws:
IOException
-
-
Method Details
-
documentId
-
getId
-
getSource
-
getDestination
-
getFrequency
public org.elasticsearch.core.TimeValue getFrequency() -
getSyncConfig
-
getHeaders
-
setHeaders
-
getVersion
-
setVersion
-
getCreateTime
-
setCreateTime
-
getPivotConfig
-
getLatestConfig
-
getDescription
-
getSettings
-
getMetadata
-
getRetentionPolicyConfig
-
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) -
checkForDeprecations
public List<DeprecationIssue> checkForDeprecations(org.elasticsearch.xcontent.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 org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
fromXContent
public static TransformConfig fromXContent(org.elasticsearch.xcontent.XContentParser parser, @Nullable String optionalTransformId, boolean lenient) -
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
-