-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RoutineLoad] Support modify routine load job #4158
Conversation
RoutineLoadJob job = checkPrivAndGetJob(stmt.getDbName(), stmt.getLabel()); | ||
if (stmt.hasDataSourceProperty() | ||
&& !stmt.getDataSourceProperties().getType().equalsIgnoreCase(job.dataSourceType.name())) { | ||
throw new DdlException("The spciefied job type is not: " + stmt.getDataSourceProperties().getType()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
‘spciefied’ Wrong characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| KW_ALTER KW_DATABASE ident:dbName KW_RENAME ident:newDbName | ||
{: | ||
RESULT = new AlterDatabaseRename(dbName, newDbName); | ||
:} | ||
| KW_ALTER KW_ROUTINE KW_LOAD job_label:jobLabel opt_properties:properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| KW_ALTER KW_ROUTINE KW_LOAD job_label:jobLabel opt_properties:properties | |
| KW_ALTER KW_ROUTINE KW_LOAD job_label:jobLabel opt_properties:jobProperties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| KW_ALTER KW_DATABASE ident:dbName KW_RENAME ident:newDbName | ||
{: | ||
RESULT = new AlterDatabaseRename(dbName, newDbName); | ||
:} | ||
| KW_ALTER KW_ROUTINE KW_LOAD job_label:jobLabel opt_properties:jobProperties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe KW_ALTER KW_ROUTINE KW_LOAD KW_FOR job_label:jobLabel
is better. The other routine load stmt also has KW_FOR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
@@ -1397,4 +1401,36 @@ public void readFields(DataInput in) throws IOException { | |||
throw new IOException("error happens when parsing create routine load stmt: " + origStmt, e); | |||
} | |||
} | |||
|
|||
abstract public void modifyProperties(AlterRoutineLoadStmt stmt) throws DdlException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The job properties maybe could be modified in here instead of the subclass KafkaRoutineLoad
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could do this when we got second derived class from RoutineLoadJob
|
||
abstract public void modifyProperties(AlterRoutineLoadStmt stmt) throws DdlException; | ||
|
||
abstract public void replayModifyProperties(AlterRoutineLoadJobOperationLog log); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
docs/.vuepress/sidebar/zh-CN.js
Outdated
@@ -409,6 +409,7 @@ module.exports = [ | |||
title: "DML", | |||
directoryPath: "Data Manipulation/", | |||
children: [ | |||
"alter-routine-load", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put it between pause routine load and stop routine load.
a94cb00
to
4b42b7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Proposed changes
Support ALTER ROUTINE LOAD JOB stmt, for example:
Details can be found in
alter-routine-load.md
Types of changes
Checklist