зеркало из https://github.com/github/vitess-gh.git
Merge pull request #1514 from michael-berlin/export_automation_plumb_destination_pack_count
Expose the vtworker *Clone parameter "destination_pack_count" in the respective automation tasks.
This commit is contained in:
Коммит
11c08ca717
|
@ -23,6 +23,9 @@ func (t *SplitCloneTask) Run(parameters map[string]string) ([]*automationpb.Task
|
|||
if excludeTables := parameters["exclude_tables"]; excludeTables != "" {
|
||||
args = append(args, "--exclude_tables="+excludeTables)
|
||||
}
|
||||
if destinationPackCount := parameters["destination_pack_count"]; destinationPackCount != "" {
|
||||
args = append(args, "--destination_pack_count="+destinationPackCount)
|
||||
}
|
||||
args = append(args, topoproto.KeyspaceShardString(parameters["keyspace"], parameters["source_shard"]))
|
||||
output, err := ExecuteVtworker(context.TODO(), parameters["vtworker_endpoint"], args)
|
||||
|
||||
|
@ -41,5 +44,5 @@ func (t *SplitCloneTask) RequiredParameters() []string {
|
|||
|
||||
// OptionalParameters is part of the Task interface.
|
||||
func (t *SplitCloneTask) OptionalParameters() []string {
|
||||
return []string{"exclude_tables"}
|
||||
return []string{"exclude_tables", "destination_pack_count"}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,9 @@ func (t *VerticalSplitCloneTask) Run(parameters map[string]string) ([]*automatio
|
|||
// '--destination_writer_count', '1',
|
||||
args := []string{"VerticalSplitClone"}
|
||||
args = append(args, "--tables="+parameters["tables"])
|
||||
if destinationPackCount := parameters["destination_pack_count"]; destinationPackCount != "" {
|
||||
args = append(args, "--destination_pack_count="+destinationPackCount)
|
||||
}
|
||||
args = append(args, topoproto.KeyspaceShardString(parameters["dest_keyspace"], parameters["shard"]))
|
||||
output, err := ExecuteVtworker(context.TODO(), parameters["vtworker_endpoint"], args)
|
||||
|
||||
|
@ -40,5 +43,5 @@ func (t *VerticalSplitCloneTask) RequiredParameters() []string {
|
|||
|
||||
// OptionalParameters is part of the Task interface.
|
||||
func (t *VerticalSplitCloneTask) OptionalParameters() []string {
|
||||
return []string{""}
|
||||
return []string{"destination_pack_count"}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче