Documentation
¶
Overview ¶
Migrate to data tiers routing. Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers. Optionally, delete one legacy index template. Using node roles enables ILM to automatically move the indices between data tiers.
Migrating away from custom node attributes routing can be manually performed. This API provides an automated way of performing three out of the four manual steps listed in the migration guide:
1. Stop setting the custom hot attribute on new indices. 1. Remove custom allocation settings from existing ILM policies. 1. Replace custom allocation settings from existing indices with the corresponding tier preference.
ILM must be stopped before performing the migration. Use the stop ILM and get ILM status APIs to wait until the reported operation mode is `STOPPED`.
Index ¶
- Variables
- type MigrateToDataTiers
- func (r MigrateToDataTiers) Do(providedCtx context.Context) (*Response, error)
- func (r *MigrateToDataTiers) DryRun(dryrun bool) *MigrateToDataTiers
- func (r *MigrateToDataTiers) ErrorTrace(errortrace bool) *MigrateToDataTiers
- func (r *MigrateToDataTiers) FilterPath(filterpaths ...string) *MigrateToDataTiers
- func (r *MigrateToDataTiers) Header(key, value string) *MigrateToDataTiers
- func (r *MigrateToDataTiers) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *MigrateToDataTiers) Human(human bool) *MigrateToDataTiers
- func (r *MigrateToDataTiers) LegacyTemplateToDelete(legacytemplatetodelete string) *MigrateToDataTiers
- func (r *MigrateToDataTiers) NodeAttribute(nodeattribute string) *MigrateToDataTiers
- func (r MigrateToDataTiers) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *MigrateToDataTiers) Pretty(pretty bool) *MigrateToDataTiers
- func (r *MigrateToDataTiers) Raw(raw io.Reader) *MigrateToDataTiers
- func (r *MigrateToDataTiers) Request(req *Request) *MigrateToDataTiers
- type NewMigrateToDataTiers
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type MigrateToDataTiers ¶
type MigrateToDataTiers struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *MigrateToDataTiers
Migrate to data tiers routing. Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers. Optionally, delete one legacy index template. Using node roles enables ILM to automatically move the indices between data tiers.
Migrating away from custom node attributes routing can be manually performed. This API provides an automated way of performing three out of the four manual steps listed in the migration guide:
1. Stop setting the custom hot attribute on new indices. 1. Remove custom allocation settings from existing ILM policies. 1. Replace custom allocation settings from existing indices with the corresponding tier preference.
ILM must be stopped before performing the migration. Use the stop ILM and get ILM status APIs to wait until the reported operation mode is `STOPPED`.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html
func (MigrateToDataTiers) Do ¶
func (r MigrateToDataTiers) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a migratetodatatiers.Response
func (*MigrateToDataTiers) DryRun ¶
func (r *MigrateToDataTiers) DryRun(dryrun bool) *MigrateToDataTiers
DryRun If true, simulates the migration from node attributes based allocation filters to data tiers, but does not perform the migration. This provides a way to retrieve the indices and ILM policies that need to be migrated. API name: dry_run
func (*MigrateToDataTiers) ErrorTrace ¶ added in v8.14.0
func (r *MigrateToDataTiers) ErrorTrace(errortrace bool) *MigrateToDataTiers
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*MigrateToDataTiers) FilterPath ¶ added in v8.14.0
func (r *MigrateToDataTiers) FilterPath(filterpaths ...string) *MigrateToDataTiers
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*MigrateToDataTiers) Header ¶
func (r *MigrateToDataTiers) Header(key, value string) *MigrateToDataTiers
Header set a key, value pair in the MigrateToDataTiers headers map.
func (*MigrateToDataTiers) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*MigrateToDataTiers) Human ¶ added in v8.14.0
func (r *MigrateToDataTiers) Human(human bool) *MigrateToDataTiers
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (*MigrateToDataTiers) LegacyTemplateToDelete ¶ added in v8.9.0
func (r *MigrateToDataTiers) LegacyTemplateToDelete(legacytemplatetodelete string) *MigrateToDataTiers
API name: legacy_template_to_delete
func (*MigrateToDataTiers) NodeAttribute ¶ added in v8.9.0
func (r *MigrateToDataTiers) NodeAttribute(nodeattribute string) *MigrateToDataTiers
API name: node_attribute
func (MigrateToDataTiers) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*MigrateToDataTiers) Pretty ¶ added in v8.14.0
func (r *MigrateToDataTiers) Pretty(pretty bool) *MigrateToDataTiers
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*MigrateToDataTiers) Raw ¶
func (r *MigrateToDataTiers) Raw(raw io.Reader) *MigrateToDataTiers
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*MigrateToDataTiers) Request ¶
func (r *MigrateToDataTiers) Request(req *Request) *MigrateToDataTiers
Request allows to set the request property with the appropriate payload.
type NewMigrateToDataTiers ¶
type NewMigrateToDataTiers func() *MigrateToDataTiers
NewMigrateToDataTiers type alias for index.
func NewMigrateToDataTiersFunc ¶
func NewMigrateToDataTiersFunc(tp elastictransport.Interface) NewMigrateToDataTiers
NewMigrateToDataTiersFunc returns a new instance of MigrateToDataTiers with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Request ¶
type Request struct { LegacyTemplateToDelete *string `json:"legacy_template_to_delete,omitempty"` NodeAttribute *string `json:"node_attribute,omitempty"` }
Request holds the request body struct for the package migratetodatatiers
type Response ¶ added in v8.7.0
type Response struct { DryRun bool `json:"dry_run"` MigratedComponentTemplates []string `json:"migrated_component_templates"` MigratedComposableTemplates []string `json:"migrated_composable_templates"` MigratedIlmPolicies []string `json:"migrated_ilm_policies"` MigratedIndices []string `json:"migrated_indices"` MigratedLegacyTemplates []string `json:"migrated_legacy_templates"` RemovedLegacyTemplate string `json:"removed_legacy_template"` }
Response holds the response body struct for the package migratetodatatiers