You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2020/09/29 10:30:00 UTC
[shardingsphere] branch master updated: scaling-core detail
optimized (#7661)
This is an automated email from the ASF dual-hosted git repository.
menghaoran 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 ad155ff scaling-core detail optimized (#7661)
ad155ff is described below
commit ad155ff20a5ac182c912ec6cd2eefeb90215358d
Author: 邱鹿 Lucas <lu...@163.com>
AuthorDate: Tue Sep 29 18:29:37 2020 +0800
scaling-core detail optimized (#7661)
Co-authored-by: qiulu3 <Lucas209910>
---
.../scaling/core/config/ShardingSphereJDBCConfiguration.java | 9 +++------
.../shardingsphere/scaling/core/config/SyncConfiguration.java | 3 ---
.../scaling/core/exception/DataCheckFailException.java | 4 ----
3 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/config/ShardingSphereJDBCConfiguration.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/config/ShardingSphereJDBCConfiguration.java
index 3054a4f..444b633 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/config/ShardingSphereJDBCConfiguration.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/config/ShardingSphereJDBCConfiguration.java
@@ -24,12 +24,10 @@ import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.database.type.DatabaseTypes;
import org.apache.shardingsphere.scaling.core.utils.ConfigurationYamlConverter;
-import java.util.Map;
-
@Getter
@Setter
@EqualsAndHashCode(exclude = "databaseType")
-public class ShardingSphereJDBCConfiguration implements DataSourceConfiguration {
+public final class ShardingSphereJDBCConfiguration implements DataSourceConfiguration {
private String dataSource;
@@ -40,14 +38,13 @@ public class ShardingSphereJDBCConfiguration implements DataSourceConfiguration
public ShardingSphereJDBCConfiguration(final String dataSource, final String rule) {
this.dataSource = dataSource;
this.rule = rule;
- this.databaseType = getDatabaseType();
+ databaseType = getDatabaseType();
}
@Override
public DatabaseType getDatabaseType() {
if (null == databaseType) {
- Map<String, org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration> sourceDataSource = ConfigurationYamlConverter.loadDataSourceConfigurations(dataSource);
- databaseType = DatabaseTypes.getDatabaseTypeByURL(sourceDataSource.values().iterator().next().getProps().get("jdbcUrl").toString());
+ databaseType = DatabaseTypes.getDatabaseTypeByURL(ConfigurationYamlConverter.loadDataSourceConfigurations(dataSource).values().iterator().next().getProps().get("jdbcUrl").toString());
}
return databaseType;
}
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/config/SyncConfiguration.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/config/SyncConfiguration.java
index a2f9936..2b224aa 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/config/SyncConfiguration.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/config/SyncConfiguration.java
@@ -27,9 +27,6 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public final class SyncConfiguration {
- /**
- * The concurrency of writers.
- */
private final int concurrency;
private final DumperConfiguration dumperConfiguration;
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/exception/DataCheckFailException.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/exception/DataCheckFailException.java
index c43b316..97ceee3 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/exception/DataCheckFailException.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/exception/DataCheckFailException.java
@@ -22,10 +22,6 @@ package org.apache.shardingsphere.scaling.core.exception;
*/
public final class DataCheckFailException extends RuntimeException {
- public DataCheckFailException(final String message) {
- super(message);
- }
-
public DataCheckFailException(final String message, final Throwable cause) {
super(message, cause);
}