Skip to content

Commit 7afce21

Browse files
author
ffffwh
committed
fix typo
1 parent 7b69ab5 commit 7afce21

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

api/handler/v2/job.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ func buildMysqlToKafkaJobDetailResp(nomadJob nomadApi.Job, nomadAllocations []no
14041404
case common.TaskTypeSrc:
14051405
srcTaskDetail = buildSrcTaskDetail(t.Name, internalTaskConfig, taskGroupToNomadAlloc[*tg.Name])
14061406
if nil == internalTaskConfig.KafkaConfig {
1407-
return models.KafkaDestTaskDetail{}, models.SrcTaskDetail{}, fmt.Errorf("can not find kafka task config from nomad")
1407+
return models.KafkaDestTaskDetail{}, models.SrcTaskDetail{}, fmt.Errorf("cannot find kafka task config from nomad")
14081408
}
14091409
destTaskDetail = buildKafkaDestTaskDetail(t.Name, *internalTaskConfig.KafkaConfig, taskGroupToNomadAlloc[*tg.Name])
14101410
break
@@ -1492,7 +1492,7 @@ func PauseJobV2(c echo.Context, filterJobType DtleJobType) error {
14921492
}
14931493

14941494
if len(nomadAllocs) == 0 {
1495-
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("can not find allocations of the job[%v]", reqParam.JobId)))
1495+
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("cannot find allocations of the job[%v]", reqParam.JobId)))
14961496
}
14971497

14981498
storeManager, err := common.NewStoreManager([]string{handler.ConsulAddr}, logger)
@@ -1598,7 +1598,7 @@ func ResumeJobV2(c echo.Context, filterJobType DtleJobType) error {
15981598
}
15991599

16001600
if len(nomadAllocs) == 0 {
1601-
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("job_id=%v; can not find allocations of the job", reqParam.JobId)))
1601+
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("job_id=%v; cannot find allocations of the job", reqParam.JobId)))
16021602
}
16031603

16041604
// update metadata first
@@ -1847,7 +1847,7 @@ func ReverseStartJobV2(c echo.Context, filterJobType DtleJobType) error {
18471847
}
18481848

18491849
if len(nomadAllocs) == 0 {
1850-
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("can not find allocations of the job[%v]", reqParam.JobId)))
1850+
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("cannot find allocations of the job[%v]", reqParam.JobId)))
18511851
}
18521852

18531853
storeManager, err := common.NewStoreManager([]string{handler.ConsulAddr}, logger)

api/handler/v2/monitor.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func GetTaskProgressV2(c echo.Context) error {
5050
break
5151
}
5252
if "" == nodeId {
53-
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("can not find out which node the allocation is running on")))
53+
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("cannot find out which node the allocation is running on")))
5454
}
5555
url = handler.BuildUrl(fmt.Sprintf("/v1/node/%v", nodeId))
5656
logger.Info("invoke nomad api begin", "url", url)
@@ -108,7 +108,7 @@ func GetTaskProgressV2(c echo.Context) error {
108108
if nil != err {
109109
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("get task stats failed: %v. allocation_id=%v task_name=%v", err, reqParam.AllocationId, reqParam.TaskName)))
110110
} else if !ok {
111-
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("can not find the task. allocation_id=%v task_name=%v", reqParam.AllocationId, reqParam.TaskName)))
111+
return c.JSON(http.StatusInternalServerError, models.BuildBaseResp(fmt.Errorf("cannot find the task. allocation_id=%v task_name=%v", reqParam.AllocationId, reqParam.TaskName)))
112112
}
113113

114114
// build response struct
@@ -176,15 +176,15 @@ func GetTaskProgressV2(c echo.Context) error {
176176
func getApiAddrFromAgentConfig(agentConfig map[string]interface{}) (ip, port string, err error) {
177177
plugins, ok := agentConfig["Plugins"].([]interface{})
178178
if !ok {
179-
return "", "", fmt.Errorf("can not find plugin config")
179+
return "", "", fmt.Errorf("cannot find plugin config")
180180
}
181181

182182
for _, p := range plugins {
183183
plugin := p.(map[string]interface{})
184184
if plugin["Name"] == g.PluginName {
185185
driverConfig, ok := plugin["Config"].(map[string]interface{})
186186
if !ok {
187-
return "", "", fmt.Errorf("can not find driver config within dtle plugin config")
187+
return "", "", fmt.Errorf("cannot find driver config within dtle plugin config")
188188
}
189189
addr := driverConfig["api_addr"].(string)
190190
if ip, port, err = net.SplitHostPort(addr); nil != err {
@@ -196,5 +196,5 @@ func getApiAddrFromAgentConfig(agentConfig map[string]interface{}) (ip, port str
196196
}
197197
}
198198

199-
return "", "", fmt.Errorf("can not find dtle config")
199+
return "", "", fmt.Errorf("cannot find dtle config")
200200
}

driver/mysql/applier_incr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ func (a *ApplierIncr) prepareIfNilAndExecute(item *dmlExecItem, workerIdx int) (
511511
}
512512

513513
if err != nil {
514-
a.logger.Error("error at exec", "gno", item.gno, "err", err)
514+
a.logger.Error("error at exec", "gno", item.gno, "err", err, "worker", workerIdx)
515515
return err
516516
}
517517

driver/mysql/base/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ func GetTableColumnsSqle(sqleContext *sqle.Context, schema string,
443443
table string) (r *common.ColumnList, fkParents []*ast.TableName, err error) {
444444
tableInfo, exists := sqleContext.GetTable(schema, table)
445445
if !exists {
446-
return nil, nil, fmt.Errorf("table does not exists in sqle context. table: %v.%v", schema, table)
446+
return nil, nil, fmt.Errorf("table does not exist in sqle context. table: %v.%v", schema, table)
447447
}
448448

449449
cStmt := tableInfo.MergedTable

0 commit comments

Comments
 (0)