This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng 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 ae933b15457 Refactor ShardingSpherePipelineDataSourceCreator (#32490)
ae933b15457 is described below
commit ae933b154576732783509d8052ce8afa2282578b
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Aug 13 13:55:19 2024 +0800
Refactor ShardingSpherePipelineDataSourceCreator (#32490)
---
.../ShardingSpherePipelineDataSourceCreator.java | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
index 2b40cb06739..05e7d7a008c 100644
---
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
+++
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
@@ -46,6 +46,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Optional;
+import java.util.Properties;
import java.util.concurrent.atomic.AtomicInteger;
/**
@@ -78,18 +79,12 @@ public final class ShardingSpherePipelineDataSourceCreator
implements PipelineDa
}
private void updateConfigurationProperties(final YamlRootConfiguration
yamlRootConfig) {
- disableSystemSchemaMetadata(yamlRootConfig);
- enableStreamingQuery(yamlRootConfig);
- }
-
- private void disableSystemSchemaMetadata(final YamlRootConfiguration
yamlRootConfig) {
-
yamlRootConfig.getProps().put(TemporaryConfigurationPropertyKey.SYSTEM_SCHEMA_METADATA_ASSEMBLY_ENABLED.getKey(),
String.valueOf(Boolean.FALSE));
- }
-
- // TODO Another way is improving ExecuteQueryCallback.executeSQL to enable
streaming query, then remove it
- private void enableStreamingQuery(final YamlRootConfiguration
yamlRootConfig) {
+ Properties newProps = new Properties();
+
newProps.put(TemporaryConfigurationPropertyKey.SYSTEM_SCHEMA_METADATA_ASSEMBLY_ENABLED.getKey(),
String.valueOf(Boolean.FALSE));
+ // TODO Another way is improving ExecuteQueryCallback.executeSQL to
enable streaming query, then remove it
// Set a large enough value to enable ConnectionMode.MEMORY_STRICTLY,
make sure streaming query work.
-
yamlRootConfig.getProps().put(ConfigurationPropertyKey.MAX_CONNECTIONS_SIZE_PER_QUERY.getKey(),
100000);
+
newProps.put(ConfigurationPropertyKey.MAX_CONNECTIONS_SIZE_PER_QUERY.getKey(),
100000);
+ yamlRootConfig.setProps(newProps);
}
private void updateShardingRuleConfiguration(final YamlRootConfiguration
yamlRootConfig) {