This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 8a18cdf6446 Rename InventoryIncrementalRule to TransmissionRule
(#29148)
8a18cdf6446 is described below
commit 8a18cdf6446f5acda9c8bad6f3cf294dc402f77e
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Nov 24 12:14:12 2023 +0800
Rename InventoryIncrementalRule to TransmissionRule (#29148)
---
.../yaml/YamlTransmissionJobItemProgressSwapperTest.java | 2 +-
.../distsql/parser/src/main/antlr4/imports/cdc/RALStatement.g4 | 4 ++--
.../cdc/distsql/parser/core/CDCDistSQLStatementVisitor.java | 10 +++++-----
parser/distsql/engine/src/main/antlr4/imports/RALStatement.g4 | 4 ++--
.../parser/core/kernel/KernelDistSQLStatementVisitor.java | 10 +++++-----
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git
a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/job/progress/yaml/YamlTransmissionJobItemProgressSwapperTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/job/progress/yaml/YamlTransmissionJobItemProgressSwapperTest.java
index 2a28152394d..afafebc498e 100644
---
a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/job/progress/yaml/YamlTransmissionJobItemProgressSwapperTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/job/progress/yaml/YamlTransmissionJobItemProgressSwapperTest.java
@@ -53,7 +53,7 @@ class YamlTransmissionJobItemProgressSwapperTest {
}
@Test
- void assertSwapWithoutInventoryIncremental() {
+ void assertSwapWithoutTransmission() {
YamlTransmissionJobItemProgress yamlProgress =
YamlEngine.unmarshal(ConfigurationFileUtils.readFile("job-progress-failure.yaml"),
YamlTransmissionJobItemProgress.class);
TransmissionJobItemProgress progress =
SWAPPER.swapToObject(yamlProgress);
assertNotNull(progress.getInventory());
diff --git
a/kernel/data-pipeline/distsql/parser/src/main/antlr4/imports/cdc/RALStatement.g4
b/kernel/data-pipeline/distsql/parser/src/main/antlr4/imports/cdc/RALStatement.g4
index aed0a03e86c..81b46358a3e 100644
---
a/kernel/data-pipeline/distsql/parser/src/main/antlr4/imports/cdc/RALStatement.g4
+++
b/kernel/data-pipeline/distsql/parser/src/main/antlr4/imports/cdc/RALStatement.g4
@@ -24,10 +24,10 @@ showStreamingRule
;
alterStreamingRule
- : ALTER STREAMING RULE inventoryIncrementalRule?
+ : ALTER STREAMING RULE transmissionRule?
;
-inventoryIncrementalRule
+transmissionRule
: LP_ readDefinition? (COMMA_? writeDefinition)? (COMMA_? streamChannel)?
RP_
;
diff --git
a/kernel/data-pipeline/distsql/parser/src/main/java/org/apache/shardingsphere/cdc/distsql/parser/core/CDCDistSQLStatementVisitor.java
b/kernel/data-pipeline/distsql/parser/src/main/java/org/apache/shardingsphere/cdc/distsql/parser/core/CDCDistSQLStatementVisitor.java
index 44da72aa7b6..db11365fd67 100644
---
a/kernel/data-pipeline/distsql/parser/src/main/java/org/apache/shardingsphere/cdc/distsql/parser/core/CDCDistSQLStatementVisitor.java
+++
b/kernel/data-pipeline/distsql/parser/src/main/java/org/apache/shardingsphere/cdc/distsql/parser/core/CDCDistSQLStatementVisitor.java
@@ -27,7 +27,6 @@ import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParse
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.AlterStreamingRuleContext;
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.BatchSizeContext;
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.DropStreamingContext;
-import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.InventoryIncrementalRuleContext;
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.PropertiesDefinitionContext;
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.PropertyContext;
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.RateLimiterContext;
@@ -37,11 +36,12 @@ import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParse
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.ShowStreamingRuleContext;
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.ShowStreamingStatusContext;
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.StreamChannelContext;
+import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.TransmissionRuleContext;
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.WorkerThreadContext;
import
org.apache.shardingsphere.distsql.parser.autogen.CDCDistSQLStatementParser.WriteDefinitionContext;
import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
-import org.apache.shardingsphere.distsql.segment.TransmissionRuleSegment;
import org.apache.shardingsphere.distsql.segment.ReadOrWriteSegment;
+import org.apache.shardingsphere.distsql.segment.TransmissionRuleSegment;
import
org.apache.shardingsphere.distsql.statement.ral.updatable.AlterTransmissionRuleStatement;
import org.apache.shardingsphere.sql.parser.api.ASTNode;
import org.apache.shardingsphere.sql.parser.api.visitor.SQLVisitor;
@@ -80,13 +80,13 @@ public final class CDCDistSQLStatementVisitor extends
CDCDistSQLStatementBaseVis
@Override
public ASTNode visitAlterStreamingRule(final AlterStreamingRuleContext
ctx) {
- TransmissionRuleSegment segment = null ==
ctx.inventoryIncrementalRule() ? null
- : (TransmissionRuleSegment)
visit(ctx.inventoryIncrementalRule());
+ TransmissionRuleSegment segment = null == ctx.transmissionRule() ? null
+ : (TransmissionRuleSegment) visit(ctx.transmissionRule());
return new AlterTransmissionRuleStatement("STREAMING", segment);
}
@Override
- public ASTNode visitInventoryIncrementalRule(final
InventoryIncrementalRuleContext ctx) {
+ public ASTNode visitTransmissionRule(final TransmissionRuleContext ctx) {
TransmissionRuleSegment result = new TransmissionRuleSegment();
if (null != ctx.readDefinition()) {
result.setReadSegment((ReadOrWriteSegment)
visit(ctx.readDefinition()));
diff --git a/parser/distsql/engine/src/main/antlr4/imports/RALStatement.g4
b/parser/distsql/engine/src/main/antlr4/imports/RALStatement.g4
index f82a74ceb26..5ae66e65d41 100644
--- a/parser/distsql/engine/src/main/antlr4/imports/RALStatement.g4
+++ b/parser/distsql/engine/src/main/antlr4/imports/RALStatement.g4
@@ -104,7 +104,7 @@ showMigrationRule
;
alterMigrationRule
- : ALTER MIGRATION RULE inventoryIncrementalRule?
+ : ALTER MIGRATION RULE transmissionRule?
;
lockCluster
@@ -115,7 +115,7 @@ unlockCluster
: UNLOCK CLUSTER
;
-inventoryIncrementalRule
+transmissionRule
: LP_ readDefinition? (COMMA_? writeDefinition)? (COMMA_? streamChannel)?
RP_
;
diff --git
a/parser/distsql/engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/kernel/KernelDistSQLStatementVisitor.java
b/parser/distsql/engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/kernel/KernelDistSQLStatementVisitor.java
index 8c74c757c3c..bcdc578b123 100644
---
a/parser/distsql/engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/kernel/KernelDistSQLStatementVisitor.java
+++
b/parser/distsql/engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/kernel/KernelDistSQLStatementVisitor.java
@@ -38,7 +38,6 @@ import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementPa
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.ImportDatabaseConfigurationContext;
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.ImportMetaDataContext;
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.InstanceIdContext;
-import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.InventoryIncrementalRuleContext;
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.LabelComputeNodeContext;
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.LockClusterContext;
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.PasswordContext;
@@ -63,6 +62,7 @@ import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementPa
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.ShowTableMetadataContext;
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.StorageUnitDefinitionContext;
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.StreamChannelContext;
+import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.TransmissionRuleContext;
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.UnlabelComputeNodeContext;
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.UnlockClusterContext;
import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementParser.UnregisterStorageUnitContext;
@@ -71,8 +71,8 @@ import
org.apache.shardingsphere.distsql.parser.autogen.KernelDistSQLStatementPa
import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
import org.apache.shardingsphere.distsql.segment.DataSourceSegment;
import
org.apache.shardingsphere.distsql.segment.HostnameAndPortBasedDataSourceSegment;
-import org.apache.shardingsphere.distsql.segment.TransmissionRuleSegment;
import org.apache.shardingsphere.distsql.segment.ReadOrWriteSegment;
+import org.apache.shardingsphere.distsql.segment.TransmissionRuleSegment;
import org.apache.shardingsphere.distsql.segment.URLBasedDataSourceSegment;
import
org.apache.shardingsphere.distsql.statement.ral.queryable.ConvertYamlConfigurationStatement;
import
org.apache.shardingsphere.distsql.statement.ral.queryable.ExportDatabaseConfigurationStatement;
@@ -312,13 +312,13 @@ public final class KernelDistSQLStatementVisitor extends
KernelDistSQLStatementB
@Override
public ASTNode visitAlterMigrationRule(final AlterMigrationRuleContext
ctx) {
- TransmissionRuleSegment segment = null ==
ctx.inventoryIncrementalRule() ? null
- : (TransmissionRuleSegment)
visit(ctx.inventoryIncrementalRule());
+ TransmissionRuleSegment segment = null == ctx.transmissionRule() ? null
+ : (TransmissionRuleSegment) visit(ctx.transmissionRule());
return new AlterTransmissionRuleStatement("MIGRATION", segment);
}
@Override
- public ASTNode visitInventoryIncrementalRule(final
InventoryIncrementalRuleContext ctx) {
+ public ASTNode visitTransmissionRule(final TransmissionRuleContext ctx) {
TransmissionRuleSegment result = new TransmissionRuleSegment();
if (null != ctx.readDefinition()) {
result.setReadSegment((ReadOrWriteSegment)
visit(ctx.readDefinition()));