Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

worker not task should concern temporal directory to save the dumped files #893

Open
july2993 opened this issue Aug 13, 2020 · 0 comments
Open
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/ help wanted This issue wanted some help from contributor type/feature-request This issue is a feature request

Comments

@july2993
Copy link
Contributor

july2993 commented Aug 13, 2020

Feature Request

Is your feature request related to a problem? Please describe:

ref: https://docs.pingcap.com/tidb-data-migration/dev/task-configuration-file-full

# Configuration arguments of the Loader processing unit.
loaders:
  global:                            # The configuration name of the processing unit.
    pool-size: 16                    # The number of threads that execute Mydumper SQL files concurrently in Loader (16 by default).
    # The directory output by Mydumper that Loader reads ("./dumped_data" by default). Directories for different tasks of the same instance must be different (Mydumper outputs the SQL file based on the directory).
    dir: "./dumped_data"

A task is a data migration job might scheduled to some worker, above is a slice of task configuration, we could see there's a dir in task configuration.

But we do not know which worker this task will be run on. Different workers may be deployed in different environment, and dir is not general for all of them.

Describe the feature you'd like:

Remove the dir item in task config.

And add a temporal directory config item in worker config if need, or we only support saving in a directory by convention.

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

  1. loader config in task config file:
    Loaders map[string]*LoaderConfig `yaml:"loaders" toml:"loaders" json:"loaders"`
  2. worker config:
    type Config struct {
  3. loader config in subtask config file, which the worker indeed use:
    LoaderConfig // Loader configuration

One implementation is move dir to 2. , and successfully initiate it in 3.

@july2993 july2993 added the help wanted This issue wanted some help from contributor label Aug 13, 2020
@csuzhangxc csuzhangxc added the type/feature-request This issue is a feature request label Aug 25, 2020
@lance6716 lance6716 added the Hacktoberfest https://hacktoberfest.digitalocean.com/ label Sep 29, 2020
@lance6716 lance6716 changed the title task should not need to concern the temporal directory to save the dumped files worker not task should concern temporal directory to save the dumped files Sep 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/ help wanted This issue wanted some help from contributor type/feature-request This issue is a feature request
Projects
None yet
Development

No branches or pull requests

3 participants