save cluster distribution in major magration task
This commit is contained in:
parent
3987c5db37
commit
9bd5682122
|
@ -75,6 +75,10 @@ func (h *APIHandler) createDataMigrationTask(w http.ResponseWriter, req *http.Re
|
||||||
totalDocs += index.Source.Docs
|
totalDocs += index.Source.Docs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
srcClusterCfg := elastic.GetConfig(clusterTaskConfig.Cluster.Source.Id)
|
||||||
|
clusterTaskConfig.Cluster.Source.Distribution = srcClusterCfg.Distribution
|
||||||
|
dstClusterCfg := elastic.GetConfig(clusterTaskConfig.Cluster.Target.Id)
|
||||||
|
clusterTaskConfig.Cluster.Target.Distribution = dstClusterCfg.Distribution
|
||||||
t := task2.Task{
|
t := task2.Task{
|
||||||
Metadata: task2.Metadata{
|
Metadata: task2.Metadata{
|
||||||
Type: "pipeline",
|
Type: "pipeline",
|
||||||
|
|
|
@ -84,6 +84,7 @@ func (ii *IndexInfo) GetUniqueIndexName() string{
|
||||||
type ClusterInfo struct {
|
type ClusterInfo struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
Distribution string `json:"distribution,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type TaskCompleteState struct {
|
type TaskCompleteState struct {
|
||||||
|
|
Loading…
Reference in New Issue