diff --git a/dm/ctl/ctl.go b/dm/ctl/ctl.go index a297fa8a4f..146ceb1346 100644 --- a/dm/ctl/ctl.go +++ b/dm/ctl/ctl.go @@ -49,7 +49,7 @@ func Start(args []string) { } // --worker worker1 -w worker2 --worker=worker3,worker4 -w=worker5,worker6 - rootCmd.PersistentFlags().StringSliceVarP(&commandMasterFlags.workers, "worker", "w", []string{}, "dm-worker ID") + rootCmd.PersistentFlags().StringSliceVarP(&commandMasterFlags.workers, "worker", "w", []string{}, "DM-worker ID") rootCmd.AddCommand( master.NewStartTaskCmd(), master.NewStopTaskCmd(), diff --git a/dm/ctl/master/break_ddl_lock.go b/dm/ctl/master/break_ddl_lock.go index 99a1c86a9d..544fd5409f 100644 --- a/dm/ctl/master/break_ddl_lock.go +++ b/dm/ctl/master/break_ddl_lock.go @@ -28,7 +28,7 @@ import ( func NewBreakDDLLockCmd() *cobra.Command { cmd := &cobra.Command{ Use: "break-ddl-lock <-w worker ...> [--remove-id] [--exec] [--skip]", - Short: "force to break dm-worker's DDL lock", + Short: "forcefully break DM-worker's DDL lock", Run: breakDDLLockFunc, } cmd.Flags().StringP("remove-id", "i", "", "DDLLockInfo's ID which need to remove") @@ -51,7 +51,7 @@ func breakDDLLockFunc(cmd *cobra.Command, _ []string) { return } if len(workers) == 0 { - fmt.Println("must specify at least one dm-worker (`-w` / `--worker`)") + fmt.Println("must specify at least one DM-worker (`-w` / `--worker`)") return } diff --git a/dm/ctl/master/check_task.go b/dm/ctl/master/check_task.go index 1b6a4759b4..72a2902d1c 100644 --- a/dm/ctl/master/check_task.go +++ b/dm/ctl/master/check_task.go @@ -29,7 +29,7 @@ import ( func NewCheckTaskCmd() *cobra.Command { cmd := &cobra.Command{ Use: "check-task ", - Short: "check a task with config file", + Short: "check the config file of the task", Run: checkTaskFunc, } return cmd diff --git a/dm/ctl/master/migrate_relay.go b/dm/ctl/master/migrate_relay.go index 7ce9bec80a..9e3fd39c15 100644 --- a/dm/ctl/master/migrate_relay.go +++ b/dm/ctl/master/migrate_relay.go @@ -31,7 +31,7 @@ import ( func NewMigrateRelayCmd() *cobra.Command { cmd := &cobra.Command{ Use: "migrate-relay ", - Short: "migrate dm-worker's relay unit", + Short: "migrate DM-worker's relay unit", Run: migrateRelayFunc, } return cmd diff --git a/dm/ctl/master/pause_relay.go b/dm/ctl/master/pause_relay.go index ccd0630568..9d81259e84 100644 --- a/dm/ctl/master/pause_relay.go +++ b/dm/ctl/master/pause_relay.go @@ -27,7 +27,7 @@ import ( func NewPauseRelayCmd() *cobra.Command { cmd := &cobra.Command{ Use: "pause-relay <-w worker ...>", - Short: "pause dm-worker's relay unit", + Short: "pause DM-worker's relay unit", Run: pauseRelayFunc, } return cmd @@ -46,7 +46,7 @@ func pauseRelayFunc(cmd *cobra.Command, _ []string) { return } if len(workers) == 0 { - fmt.Println("must specify at least one dm-worker (`-w` / `--worker`)") + fmt.Println("must specify at least one DM-worker (`-w` / `--worker`)") return } diff --git a/dm/ctl/master/pause_task.go b/dm/ctl/master/pause_task.go index b1204b42c1..222f943eae 100644 --- a/dm/ctl/master/pause_task.go +++ b/dm/ctl/master/pause_task.go @@ -27,7 +27,7 @@ import ( func NewPauseTaskCmd() *cobra.Command { cmd := &cobra.Command{ Use: "pause-task [-w worker ...] ", - Short: "pause a running task with name", + Short: "pause a specified running task", Run: pauseTaskFunc, } return cmd diff --git a/dm/ctl/master/purge_relay.go b/dm/ctl/master/purge_relay.go index 052a0cae80..0bb8208e95 100644 --- a/dm/ctl/master/purge_relay.go +++ b/dm/ctl/master/purge_relay.go @@ -41,13 +41,13 @@ func NewPurgeRelayCmd() *cobra.Command { //Use: "purge-relay <-w worker> [--inactive] [--time] [--filename] [--sub-dir]", //Short: "purge dm-worker's relay log files, choose 1 of 2 methods", Use: "purge-relay <-w worker> [--filename] [--sub-dir]", - Short: "purge dm-worker's relay log files according to specified filename", + Short: "purge relay log files of the DM-worker according to the specified filename", Run: purgeRelayFunc, } //cmd.Flags().BoolP("inactive", "i", false, "whether try to purge all inactive relay log files") //cmd.Flags().StringP("time", "t", "", fmt.Sprintf("whether try to purge relay log files before this time, the format is \"%s\"(_ between date and time)", timeFormat)) - cmd.Flags().StringP("filename", "f", "", "whether try to purge relay log files before this filename, the format is \"mysql-bin.000006\"") - cmd.Flags().StringP("sub-dir", "s", "", "specify relay sub directory for --filename, if not specified, the latest one will be used, the format is \"2ae76434-f79f-11e8-bde2-0242ac130008.000001\"") + cmd.Flags().StringP("filename", "f", "", "name of the terminal file before which to purge relay log files. Sample format: \"mysql-bin.000006\"") + cmd.Flags().StringP("sub-dir", "s", "", "specify relay sub directory for --filename. If not specified, the latest one will be used. Sample format: \"2ae76434-f79f-11e8-bde2-0242ac130008.000001\"") return cmd } @@ -65,7 +65,7 @@ func purgeRelayFunc(cmd *cobra.Command, _ []string) { return } if len(workers) == 0 { - fmt.Println("must specify at least one dm-worker (`-w` / `--worker`)") + fmt.Println("must specify at least one DM-worker (`-w` / `--worker`)") return } @@ -121,7 +121,7 @@ func purgeRelayFunc(cmd *cobra.Command, _ []string) { //} if len(filename) > 0 && len(workers) > 1 { - fmt.Println("for --filename, can only specify one dm-worker per time") + fmt.Println("for --filename, can only specify one DM-worker per time") return } if len(subDir) > 0 { diff --git a/dm/ctl/master/query_error.go b/dm/ctl/master/query_error.go index 396a9195b7..868433377c 100644 --- a/dm/ctl/master/query_error.go +++ b/dm/ctl/master/query_error.go @@ -28,7 +28,7 @@ import ( func NewQueryErrorCmd() *cobra.Command { cmd := &cobra.Command{ Use: "query-error [-w worker ...] [task-name]", - Short: "query task's error", + Short: "query task error", Run: queryErrorFunc, } return cmd diff --git a/dm/ctl/master/query_status.go b/dm/ctl/master/query_status.go index 569fe90215..bbf32d17fe 100644 --- a/dm/ctl/master/query_status.go +++ b/dm/ctl/master/query_status.go @@ -28,7 +28,7 @@ import ( func NewQueryStatusCmd() *cobra.Command { cmd := &cobra.Command{ Use: "query-status [-w worker ...] [task-name]", - Short: "query task's status", + Short: "query task status", Run: queryStatusFunc, } return cmd diff --git a/dm/ctl/master/resume_relay.go b/dm/ctl/master/resume_relay.go index c708ff6f72..9e70d330fe 100644 --- a/dm/ctl/master/resume_relay.go +++ b/dm/ctl/master/resume_relay.go @@ -27,7 +27,7 @@ import ( func NewResumeRelayCmd() *cobra.Command { cmd := &cobra.Command{ Use: "resume-relay <-w worker ...>", - Short: "resume dm-worker's relay unit", + Short: "resume DM-worker's relay unit", Run: resumeRelayFunc, } return cmd @@ -46,7 +46,7 @@ func resumeRelayFunc(cmd *cobra.Command, _ []string) { return } if len(workers) == 0 { - fmt.Println("must specify at least one dm-worker (`-w` / `--worker`)") + fmt.Println("must specify at least one DM-worker (`-w` / `--worker`)") return } diff --git a/dm/ctl/master/resume_task.go b/dm/ctl/master/resume_task.go index 5319adbf23..2a98e64dd4 100644 --- a/dm/ctl/master/resume_task.go +++ b/dm/ctl/master/resume_task.go @@ -27,7 +27,7 @@ import ( func NewResumeTaskCmd() *cobra.Command { cmd := &cobra.Command{ Use: "resume-task [-w worker ...] ", - Short: "resume a paused task with name", + Short: "resume a specified paused task", Run: resumeTaskFunc, } return cmd diff --git a/dm/ctl/master/sql_inject.go b/dm/ctl/master/sql_inject.go index cfd1d2d825..27aad2c985 100644 --- a/dm/ctl/master/sql_inject.go +++ b/dm/ctl/master/sql_inject.go @@ -29,7 +29,7 @@ import ( func NewSQLInjectCmd() *cobra.Command { cmd := &cobra.Command{ Use: "sql-inject <-w worker> ", - Short: "sql-inject injects (limited) sqls into syncer as binlog event", + Short: "inject (limited) SQLs into binlog replication unit as binlog events", Run: sqlInjectFunc, } return cmd diff --git a/dm/ctl/master/sql_replace.go b/dm/ctl/master/sql_replace.go index 10c55f7822..fff5bebef6 100644 --- a/dm/ctl/master/sql_replace.go +++ b/dm/ctl/master/sql_replace.go @@ -29,7 +29,7 @@ import ( func NewSQLReplaceCmd() *cobra.Command { cmd := &cobra.Command{ Use: "sql-replace <-w worker> [-b binlog-pos] [-s sql-pattern] [--sharding] ", - Short: "sql-replace replaces SQL in specific binlog-pos or sql-pattern matched with other SQLs, each SQL must ends with semicolon;", + Short: "replace SQLs matched by a specific binlog position (binlog-pos) or a SQL pattern (sql-pattern); each SQL must end with a semicolon", Run: sqlReplaceFunc, } cmd.Flags().StringP("binlog-pos", "b", "", "position used to match binlog event if matched the sql-replace operation will be applied. The format like \"mysql-bin|000001.000003:3270\"") diff --git a/dm/ctl/master/sql_skip.go b/dm/ctl/master/sql_skip.go index 7c83a8f107..768528e1e1 100644 --- a/dm/ctl/master/sql_skip.go +++ b/dm/ctl/master/sql_skip.go @@ -29,7 +29,7 @@ import ( func NewSQLSkipCmd() *cobra.Command { cmd := &cobra.Command{ Use: "sql-skip <-w worker> [-b binlog-pos] [-s sql-pattern] [--sharding] ", - Short: "sql-skip skips binlog event in specific binlog-pos or sql-pattern matched", + Short: "skip the binlog event matched by a specific binlog position (binlog-pos) or a SQL pattern (sql-pattern)", Run: sqlSkipFunc, } cmd.Flags().StringP("binlog-pos", "b", "", "position used to match binlog event if matched the sql-skip operation will be applied. The format like \"mysql-bin|000001.000003:3270\"") diff --git a/dm/ctl/master/start_task.go b/dm/ctl/master/start_task.go index 0e385435b1..79c2d1fc03 100644 --- a/dm/ctl/master/start_task.go +++ b/dm/ctl/master/start_task.go @@ -29,7 +29,7 @@ import ( func NewStartTaskCmd() *cobra.Command { cmd := &cobra.Command{ Use: "start-task [-w worker ...] ", - Short: "start a task with config file", + Short: "start a task as defined in the config file", Run: startTaskFunc, } return cmd diff --git a/dm/ctl/master/stop_task.go b/dm/ctl/master/stop_task.go index 785281b359..55aa9ec1e4 100644 --- a/dm/ctl/master/stop_task.go +++ b/dm/ctl/master/stop_task.go @@ -27,7 +27,7 @@ import ( func NewStopTaskCmd() *cobra.Command { cmd := &cobra.Command{ Use: "stop-task [-w worker ...] ", - Short: "stop a task with name", + Short: "stop a specified task", Run: stopTaskFunc, } return cmd diff --git a/dm/ctl/master/switch_relay_master.go b/dm/ctl/master/switch_relay_master.go index 31ed840bf9..f1991e9fd7 100644 --- a/dm/ctl/master/switch_relay_master.go +++ b/dm/ctl/master/switch_relay_master.go @@ -28,7 +28,7 @@ import ( func NewSwitchRelayMasterCmd() *cobra.Command { cmd := &cobra.Command{ Use: "switch-relay-master <-w worker ...>", - Short: "switch master server of dm-worker's relay unit", + Short: "switch the master server of the DM-worker's relay unit", Run: switchRelayMasterFunc, } return cmd @@ -47,7 +47,7 @@ func switchRelayMasterFunc(cmd *cobra.Command, _ []string) { return } if len(workers) == 0 { - fmt.Println("must specify at least one dm-worker (`-w` / `--worker`)") + fmt.Println("must specify at least one DM-worker (`-w` / `--worker`)") return } diff --git a/dm/ctl/master/unlock_ddl_lock.go b/dm/ctl/master/unlock_ddl_lock.go index 6e9f6e695f..2cf5adf739 100644 --- a/dm/ctl/master/unlock_ddl_lock.go +++ b/dm/ctl/master/unlock_ddl_lock.go @@ -28,10 +28,10 @@ import ( func NewUnlockDDLLockCmd() *cobra.Command { cmd := &cobra.Command{ Use: "unlock-ddl-lock [-w worker ...] ", - Short: "force to unlock DDL lock", + Short: "forcefully unlock DDL lock", Run: unlockDDLLockFunc, } - cmd.Flags().StringP("owner", "o", "", "dm-worker to replace the default owner") + cmd.Flags().StringP("owner", "o", "", "DM-worker to replace the default owner") cmd.Flags().BoolP("force-remove", "f", false, "force to remove DDL lock") return cmd } diff --git a/dm/ctl/master/update_masterconfig.go b/dm/ctl/master/update_masterconfig.go index d70111a3b7..82fdb1cb4f 100644 --- a/dm/ctl/master/update_masterconfig.go +++ b/dm/ctl/master/update_masterconfig.go @@ -28,7 +28,7 @@ import ( func NewUpdateMasterConfigCmd() *cobra.Command { cmd := &cobra.Command{ Use: "update-master-config ", - Short: "update configure of DM-master", + Short: "update the config of the DM-master", Run: updateMasterConfigFunc, } return cmd diff --git a/dm/ctl/master/update_relay.go b/dm/ctl/master/update_relay.go index e409ad0a47..ddc0acda19 100644 --- a/dm/ctl/master/update_relay.go +++ b/dm/ctl/master/update_relay.go @@ -28,7 +28,7 @@ import ( func NewUpdateRelayCmd() *cobra.Command { cmd := &cobra.Command{ Use: "update-relay [-w worker ...] ", - Short: "update dm-worker's relay unit configure", + Short: "update the relay unit config of the DM-worker", Run: updateRelayFunc, } return cmd @@ -49,7 +49,7 @@ func updateRelayFunc(cmd *cobra.Command, _ []string) { workers, _ := common.GetWorkerArgs(cmd) if len(workers) != 1 { - fmt.Println("must specify one dm-worker (`-w` / `--worker`)") + fmt.Println("must specify one DM-worker (`-w` / `--worker`)") return } diff --git a/dm/ctl/master/update_task.go b/dm/ctl/master/update_task.go index 09bc934487..47452d2776 100644 --- a/dm/ctl/master/update_task.go +++ b/dm/ctl/master/update_task.go @@ -29,7 +29,7 @@ import ( func NewUpdateTaskCmd() *cobra.Command { cmd := &cobra.Command{ Use: "update-task [-w worker ...] ", - Short: "update a task's config for routes, filters, column-mappings, black-white-list", + Short: "update a task's config for routes, filters, column-mappings, or black-white-list", Run: updateTaskFunc, } return cmd diff --git a/tests/dmctl_advance/check_list/break_ddl_lock.sh b/tests/dmctl_advance/check_list/break_ddl_lock.sh index 3dc93fa5e4..2fec4a297b 100644 --- a/tests/dmctl_advance/check_list/break_ddl_lock.sh +++ b/tests/dmctl_advance/check_list/break_ddl_lock.sh @@ -9,7 +9,7 @@ function break_ddl_lock_wrong_arg() { function break_ddl_lock_without_worker() { run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ "break-ddl-lock test" \ - "must specify at least one dm-worker (\`-w\` \/ \`--worker\`)" 1 + "must specify at least one DM-worker (\`-w\` \/ \`--worker\`)" 1 } function break_ddl_lock_shoud_specify_at_least_one() { diff --git a/tests/dmctl_advance/check_list/switch_relay_master.sh b/tests/dmctl_advance/check_list/switch_relay_master.sh index 637ac2d56f..59a13a16b8 100644 --- a/tests/dmctl_advance/check_list/switch_relay_master.sh +++ b/tests/dmctl_advance/check_list/switch_relay_master.sh @@ -9,7 +9,7 @@ function switch_relay_master_wrong_arg() { function switch_relay_master_without_worker() { run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ "switch-relay-master" \ - "must specify at least one dm-worker (\`-w\` \/ \`--worker\`)" 1 + "must specify at least one DM-worker (\`-w\` \/ \`--worker\`)" 1 } function switch_relay_master_while_master_down() { diff --git a/tests/dmctl_basic/check_list/pause_relay.sh b/tests/dmctl_basic/check_list/pause_relay.sh index 47b9b49705..1f492c85e9 100644 --- a/tests/dmctl_basic/check_list/pause_relay.sh +++ b/tests/dmctl_basic/check_list/pause_relay.sh @@ -9,7 +9,7 @@ function pause_relay_wrong_arg() { function pause_relay_wihout_worker() { run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ "pause-relay" \ - "must specify at least one dm-worker" 1 + "must specify at least one DM-worker" 1 } function pause_relay_while_master_down() { diff --git a/tests/dmctl_basic/check_list/purge_relay.sh b/tests/dmctl_basic/check_list/purge_relay.sh index 93a52656aa..37bbd46b34 100644 --- a/tests/dmctl_basic/check_list/purge_relay.sh +++ b/tests/dmctl_basic/check_list/purge_relay.sh @@ -9,13 +9,13 @@ function purge_relay_wrong_arg() { function purge_relay_wihout_worker() { run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ "purge-relay" \ - "must specify at least one dm-worker (\`-w\` \/ \`--worker\`)" 1 + "must specify at least one DM-worker (\`-w\` \/ \`--worker\`)" 1 } function purge_relay_filename_with_multi_workers() { run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ "purge-relay --filename bin-000001 -w 127.0.0.1:$WORKER1_PORT -w 127.0.0.1:$WORKER2_PORT" \ - "for --filename, can only specify one dm-worker per time" 1 + "for --filename, can only specify one DM-worker per time" 1 } function purge_relay_while_master_down() { diff --git a/tests/dmctl_basic/check_list/resume_relay.sh b/tests/dmctl_basic/check_list/resume_relay.sh index 2e7caf784a..6d8bfa3ffa 100644 --- a/tests/dmctl_basic/check_list/resume_relay.sh +++ b/tests/dmctl_basic/check_list/resume_relay.sh @@ -33,7 +33,7 @@ function resume_relay_wrong_arg() { function resume_relay_wihout_worker() { run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ "resume-relay" \ - "must specify at least one dm-worker" 1 + "must specify at least one DM-worker" 1 } function resume_relay_while_master_down() { diff --git a/tests/dmctl_basic/check_list/update_relay.sh b/tests/dmctl_basic/check_list/update_relay.sh index f004dd78fd..7718d72a0a 100644 --- a/tests/dmctl_basic/check_list/update_relay.sh +++ b/tests/dmctl_basic/check_list/update_relay.sh @@ -16,7 +16,7 @@ function update_relay_should_specify_one_dm_worker() { task_conf=$1 run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ "update-relay $task_conf" \ - "must specify one dm-worker (\`-w\` \/ \`--worker\`)" 1 + "must specify one DM-worker (\`-w\` \/ \`--worker\`)" 1 } function update_relay_while_master_down() {