[improve](routine_load) add db and table name in create routine load job log (#27500)

This commit is contained in:
HHoflittlefish777
2023-11-25 23:41:34 +08:00
committed by GitHub
parent b08865982a
commit 04033dce01
4 changed files with 14 additions and 10 deletions

View File

@ -175,10 +175,12 @@ public class RoutineLoadManager implements Writable {
routineLoadJob.setOrigStmt(createRoutineLoadStmt.getOrigStmt());
routineLoadJob.setComment(createRoutineLoadStmt.getComment());
addRoutineLoadJob(routineLoadJob, createRoutineLoadStmt.getDBName());
addRoutineLoadJob(routineLoadJob, createRoutineLoadStmt.getDBName(),
createRoutineLoadStmt.getTableName());
}
public void addRoutineLoadJob(RoutineLoadJob routineLoadJob, String dbName) throws DdlException {
public void addRoutineLoadJob(RoutineLoadJob routineLoadJob, String dbName, String tableName)
throws DdlException {
writeLock();
try {
// check if db.routineLoadName has been used
@ -195,10 +197,12 @@ public class RoutineLoadManager implements Writable {
unprotectedAddJob(routineLoadJob);
Env.getCurrentEnv().getEditLog().logCreateRoutineLoadJob(routineLoadJob);
LOG.info("create routine load job: id: {}, name: {}", routineLoadJob.getId(), routineLoadJob.getName());
} finally {
writeUnlock();
}
LOG.info("create routine load job: id: {}, job name: {}, db name: {}, table name: {}",
routineLoadJob.getId(), routineLoadJob.getName(), dbName, tableName);
}
private void unprotectedAddJob(RoutineLoadJob routineLoadJob) {