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:
Michael Berlin 2016-02-22 12:24:43 -08:00
Родитель 014aa049b3 80161bd8a1
Коммит 11c08ca717
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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"}
}