From 235b9d759471d8b2d948613c8e50930855c865e1 Mon Sep 17 00:00:00 2001 From: zhangliang Date: Tue, 31 Oct 2023 21:15:09 +0800 Subject: [PATCH] Refactor structure of tracing module --- .../RDBTracingStorageConfiguration.java | 6 ++- .../RDBJobEventStorage.java | 43 +++---------------- .../rdb/listener/RDBTracingListener.java | 1 - .../RDBTracingStorageConverter.java | 6 ++- .../datasource/DataSourceRegistry.java | 11 ++++- .../datasource/JDBCParameterDecorator.java | 2 +- .../{ => sql}/RDBStorageSQLMapper.java | 2 +- .../{ => sql}/SQLPropertiesFactory.java | 4 +- .../type/TracingStorageDatabaseType.java | 2 +- .../impl/DB2TracingStorageDatabaseType.java | 4 +- .../DefaultTracingStorageDatabaseType.java | 4 +- .../impl/H2TracingStorageDatabaseType.java | 4 +- .../impl/MySQLTracingStorageDatabaseType.java | 4 +- .../OracleTracingStorageDatabaseType.java | 4 +- .../PostgreSQLTracingStorageDatabaseType.java | 4 +- .../SQLServerTracingStorageDatabaseType.java | 4 +- .../rdb/yaml/YamlDataSourceConfiguration.java | 4 +- .../YamlDataSourceConfigurationConverter.java | 4 +- ...el.tracing.storage.TracingStorageConverter | 2 +- ...b.storage.type.TracingStorageDatabaseType} | 12 +++--- .../RDBTracingStorageConfigurationTest.java | 2 +- .../RDBJobEventStorageTest.java | 29 +------------ .../rdb/listener/RDBTracingListenerTest.java | 5 +-- .../RDBTracingStorageConverterTest.java | 2 +- .../datasource/DataSourceRegistryTest.java | 3 +- ...cingStorageConfigurationConverterTest.java | 2 +- .../rdb/src/test/resources/logback-test.xml | 2 +- .../elasticjob/example/JavaMain.java | 2 +- .../kernel/executor/facade/JobFacade.java | 4 +- .../internal/schedule/JobScheduler.java | 2 +- .../{api => config}/TracingConfiguration.java | 2 +- .../TracingStorageConfiguration.java | 2 +- .../{ => event}/JobTracingEventBus.java | 5 +-- .../storage/TracingStorageConverter.java | 2 +- .../yaml/YamlTracingConfiguration.java | 2 +- .../YamlTracingConfigurationConverter.java | 4 +- .../yaml/YamlTracingStorageConfiguration.java | 2 +- .../kernel/executor/facade/JobFacadeTest.java | 2 +- .../{ => event}/JobTracingEventBusTest.java | 6 +-- .../TracingStorageConfigurationFixture.java | 2 +- .../TracingStorageFixtureConverter.java | 2 +- .../yaml/YamlJobEventCallerConfiguration.java | 2 +- ...lJobEventCallerConfigurationConverter.java | 2 +- ...YamlTracingConfigurationConverterTest.java | 2 +- kernel/src/test/resources/logback-test.xml | 2 +- .../job/ElasticJobBootstrapConfiguration.java | 2 +- .../ElasticJobTracingConfiguration.java | 2 +- .../boot/job/ElasticJobSpringBootTest.java | 2 +- .../tracing/TracingConfigurationTest.java | 2 +- .../parser/TracingBeanDefinitionParser.java | 2 +- 50 files changed, 89 insertions(+), 140 deletions(-) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{datasource => config}/RDBTracingStorageConfiguration.java (94%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{storage => listener}/RDBJobEventStorage.java (89%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{datasource => storage/converter}/RDBTracingStorageConverter.java (85%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/datasource/DataSourceRegistry.java (83%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/datasource/JDBCParameterDecorator.java (94%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/{ => sql}/RDBStorageSQLMapper.java (99%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/{ => sql}/SQLPropertiesFactory.java (95%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/type/TracingStorageDatabaseType.java (95%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/type/impl/DB2TracingStorageDatabaseType.java (86%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/type/impl/DefaultTracingStorageDatabaseType.java (86%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/type/impl/H2TracingStorageDatabaseType.java (86%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/type/impl/MySQLTracingStorageDatabaseType.java (86%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/type/impl/OracleTracingStorageDatabaseType.java (86%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/type/impl/PostgreSQLTracingStorageDatabaseType.java (86%) rename ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/type/impl/SQLServerTracingStorageDatabaseType.java (87%) rename ecosystem/tracing/rdb/src/main/resources/META-INF/services/{org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType => org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType} (56%) rename ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{datasource => config}/RDBTracingStorageConfigurationTest.java (99%) rename ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{storage => listener}/RDBJobEventStorageTest.java (75%) rename ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{datasource => storage/converter}/RDBTracingStorageConverterTest.java (97%) rename ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/{ => storage}/datasource/DataSourceRegistryTest.java (93%) rename kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/{api => config}/TracingConfiguration.java (96%) rename kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/{api => config}/TracingStorageConfiguration.java (93%) rename kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/{ => event}/JobTracingEventBus.java (94%) rename kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/{ => event}/JobTracingEventBusTest.java (91%) diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConfiguration.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/config/RDBTracingStorageConfiguration.java similarity index 94% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConfiguration.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/config/RDBTracingStorageConfiguration.java index 05ab36c50a..7d80065e9d 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConfiguration.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/config/RDBTracingStorageConfiguration.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.datasource; +package org.apache.shardingsphere.elasticjob.tracing.rdb.config; import com.google.common.base.CaseFormat; import com.google.common.base.Joiner; @@ -24,7 +24,9 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.datasource.DataSourceRegistry; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.datasource.JDBCParameterDecorator; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import javax.sql.DataSource; diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/RDBJobEventStorage.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBJobEventStorage.java similarity index 89% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/RDBJobEventStorage.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBJobEventStorage.java index f59ea96e66..25fd414a1f 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/RDBJobEventStorage.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBJobEventStorage.java @@ -15,17 +15,18 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.storage; +package org.apache.shardingsphere.elasticjob.tracing.rdb.listener; import com.google.common.base.Strings; import lombok.extern.slf4j.Slf4j; -import org.apache.shardingsphere.elasticjob.kernel.executor.ExecutionType; import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobExecutionEvent; import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobStatusTraceEvent; import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobStatusTraceEvent.State; import org.apache.shardingsphere.elasticjob.kernel.tracing.exception.WrapException; -import org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType; -import org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl.DefaultTracingStorageDatabaseType; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.sql.RDBStorageSQLMapper; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.sql.SQLPropertiesFactory; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl.DefaultTracingStorageDatabaseType; import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader; import javax.sql.DataSource; @@ -35,10 +36,6 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.List; import java.util.Map; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; @@ -88,14 +85,7 @@ public static RDBJobEventStorage getInstance(final DataSource dataSource) throws })); } - /** - * WrapException util method. - * - * @param supplier supplier - * @return RDBJobEventStorage - * @throws SQLException SQLException - */ - public static RDBJobEventStorage wrapException(final Supplier supplier) throws SQLException { + private static RDBJobEventStorage wrapException(final Supplier supplier) throws SQLException { try { return supplier.get(); } catch (final WrapException ex) { @@ -379,25 +369,4 @@ private String getOriginalTaskId(final String taskId) { private String truncateString(final String str) { return !Strings.isNullOrEmpty(str) && str.length() > 4000 ? str.substring(0, 4000) : str; } - - List getJobStatusTraceEvents(final String taskId) { - List result = new ArrayList<>(); - try ( - Connection connection = dataSource.getConnection(); - PreparedStatement preparedStatement = connection.prepareStatement(sqlMapper.getSelectForJobStatusTraceLog())) { - preparedStatement.setString(1, taskId); - try (ResultSet resultSet = preparedStatement.executeQuery()) { - while (resultSet.next()) { - JobStatusTraceEvent jobStatusTraceEvent = new JobStatusTraceEvent(resultSet.getString(1), resultSet.getString(2), resultSet.getString(3), resultSet.getString(4), - resultSet.getString(5), ExecutionType.valueOf(resultSet.getString(6)), resultSet.getString(7), - State.valueOf(resultSet.getString(8)), resultSet.getString(9), new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(resultSet.getString(10))); - result.add(jobStatusTraceEvent); - } - } - } catch (final SQLException | ParseException ex) { - // TODO log failure directly to output log, consider to be configurable in the future - log.error(ex.getMessage()); - } - return result; - } } diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBTracingListener.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBTracingListener.java index 2e1e3a31b2..be102f79a1 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBTracingListener.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBTracingListener.java @@ -20,7 +20,6 @@ import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobExecutionEvent; import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobStatusTraceEvent; import org.apache.shardingsphere.elasticjob.kernel.tracing.listener.TracingListener; -import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.RDBJobEventStorage; import javax.sql.DataSource; import java.sql.SQLException; diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConverter.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/converter/RDBTracingStorageConverter.java similarity index 85% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConverter.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/converter/RDBTracingStorageConverter.java index 4e1a84cee9..e9ef510a74 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConverter.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/converter/RDBTracingStorageConverter.java @@ -15,12 +15,14 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.datasource; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.converter; import lombok.extern.slf4j.Slf4j; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.exception.TracingStorageUnavailableException; import org.apache.shardingsphere.elasticjob.kernel.tracing.storage.TracingStorageConverter; +import org.apache.shardingsphere.elasticjob.tracing.rdb.config.RDBTracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.datasource.DataSourceRegistry; import javax.sql.DataSource; import java.sql.Connection; diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/DataSourceRegistry.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/datasource/DataSourceRegistry.java similarity index 83% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/DataSourceRegistry.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/datasource/DataSourceRegistry.java index bac1c1768f..a80e9fb880 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/DataSourceRegistry.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/datasource/DataSourceRegistry.java @@ -15,10 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.datasource; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.datasource; import lombok.AccessLevel; import lombok.NoArgsConstructor; +import org.apache.shardingsphere.elasticjob.tracing.rdb.config.RDBTracingStorageConfiguration; import javax.sql.DataSource; import java.util.concurrent.ConcurrentHashMap; @@ -50,7 +51,13 @@ public static DataSourceRegistry getInstance() { return instance; } - void registerDataSource(final RDBTracingStorageConfiguration dataSourceConfig, final DataSource dataSource) { + /** + * Register data source. + * + * @param dataSourceConfig data source configuration + * @param dataSource data source + */ + public void registerDataSource(final RDBTracingStorageConfiguration dataSourceConfig, final DataSource dataSource) { dataSources.putIfAbsent(dataSourceConfig, dataSource); } diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/JDBCParameterDecorator.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/datasource/JDBCParameterDecorator.java similarity index 94% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/JDBCParameterDecorator.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/datasource/JDBCParameterDecorator.java index e924b01eff..a56efce299 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/JDBCParameterDecorator.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/datasource/JDBCParameterDecorator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.datasource; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.datasource; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI; diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/RDBStorageSQLMapper.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/sql/RDBStorageSQLMapper.java similarity index 99% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/RDBStorageSQLMapper.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/sql/RDBStorageSQLMapper.java index 278b26d597..c223bed436 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/RDBStorageSQLMapper.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/sql/RDBStorageSQLMapper.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.storage; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.sql; import lombok.Getter; diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/SQLPropertiesFactory.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/sql/SQLPropertiesFactory.java similarity index 95% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/SQLPropertiesFactory.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/sql/SQLPropertiesFactory.java index 8732e74593..33607ec7d9 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/SQLPropertiesFactory.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/sql/SQLPropertiesFactory.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.storage; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.sql; import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.SneakyThrows; -import org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType; import java.io.IOException; import java.io.InputStream; diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/TracingStorageDatabaseType.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/TracingStorageDatabaseType.java similarity index 95% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/TracingStorageDatabaseType.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/TracingStorageDatabaseType.java index 2130cd02c2..af1dde60fe 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/TracingStorageDatabaseType.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/TracingStorageDatabaseType.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.type; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type; import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI; diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/DB2TracingStorageDatabaseType.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/DB2TracingStorageDatabaseType.java similarity index 86% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/DB2TracingStorageDatabaseType.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/DB2TracingStorageDatabaseType.java index 40dad660a4..93aa2f9395 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/DB2TracingStorageDatabaseType.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/DB2TracingStorageDatabaseType.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl; -import org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType; /** * Tracing storage database type for DB2. diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/DefaultTracingStorageDatabaseType.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/DefaultTracingStorageDatabaseType.java similarity index 86% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/DefaultTracingStorageDatabaseType.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/DefaultTracingStorageDatabaseType.java index 01a2ecd405..2c8ef3e54a 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/DefaultTracingStorageDatabaseType.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/DefaultTracingStorageDatabaseType.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl; -import org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType; /** * Default tracing storage database type. diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/H2TracingStorageDatabaseType.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/H2TracingStorageDatabaseType.java similarity index 86% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/H2TracingStorageDatabaseType.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/H2TracingStorageDatabaseType.java index 7402b0a474..3f6f129d9c 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/H2TracingStorageDatabaseType.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/H2TracingStorageDatabaseType.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl; -import org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType; /** * Tracing storage database type for H2. diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/MySQLTracingStorageDatabaseType.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/MySQLTracingStorageDatabaseType.java similarity index 86% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/MySQLTracingStorageDatabaseType.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/MySQLTracingStorageDatabaseType.java index 7d691a6a20..bbd234a2e7 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/MySQLTracingStorageDatabaseType.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/MySQLTracingStorageDatabaseType.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl; -import org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType; /** * Tracing storage database type for MySQL. diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/OracleTracingStorageDatabaseType.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/OracleTracingStorageDatabaseType.java similarity index 86% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/OracleTracingStorageDatabaseType.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/OracleTracingStorageDatabaseType.java index 804902a2d9..8729f3b309 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/OracleTracingStorageDatabaseType.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/OracleTracingStorageDatabaseType.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl; -import org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType; /** * Tracing storage database type for Oracle. diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/PostgreSQLTracingStorageDatabaseType.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/PostgreSQLTracingStorageDatabaseType.java similarity index 86% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/PostgreSQLTracingStorageDatabaseType.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/PostgreSQLTracingStorageDatabaseType.java index c0ade9b555..85a7e48726 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/PostgreSQLTracingStorageDatabaseType.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/PostgreSQLTracingStorageDatabaseType.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl; -import org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType; /** * Tracing storage database type for PostgreSQL. diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/SQLServerTracingStorageDatabaseType.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/SQLServerTracingStorageDatabaseType.java similarity index 87% rename from ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/SQLServerTracingStorageDatabaseType.java rename to ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/SQLServerTracingStorageDatabaseType.java index a93b9e3712..11e7500fb6 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/type/impl/SQLServerTracingStorageDatabaseType.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/type/impl/SQLServerTracingStorageDatabaseType.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl; -import org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType; +import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType; /** * Tracing storage database type for SQLServer. diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlDataSourceConfiguration.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlDataSourceConfiguration.java index 5fac3dd3ed..1c8a89471c 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlDataSourceConfiguration.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlDataSourceConfiguration.java @@ -19,9 +19,9 @@ import lombok.Getter; import lombok.Setter; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.yaml.YamlTracingStorageConfiguration; -import org.apache.shardingsphere.elasticjob.tracing.rdb.datasource.RDBTracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.tracing.rdb.config.RDBTracingStorageConfiguration; import javax.sql.DataSource; import java.util.LinkedHashMap; diff --git a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlDataSourceConfigurationConverter.java b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlDataSourceConfigurationConverter.java index 9a3bac92ee..d995f363d6 100644 --- a/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlDataSourceConfigurationConverter.java +++ b/ecosystem/tracing/rdb/src/main/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlDataSourceConfigurationConverter.java @@ -18,9 +18,9 @@ package org.apache.shardingsphere.elasticjob.tracing.rdb.yaml; import org.apache.shardingsphere.elasticjob.kernel.infra.yaml.config.YamlConfigurationConverter; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.yaml.YamlTracingStorageConfiguration; -import org.apache.shardingsphere.elasticjob.tracing.rdb.datasource.RDBTracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.tracing.rdb.config.RDBTracingStorageConfiguration; import javax.sql.DataSource; diff --git a/ecosystem/tracing/rdb/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.kernel.tracing.storage.TracingStorageConverter b/ecosystem/tracing/rdb/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.kernel.tracing.storage.TracingStorageConverter index dd622b61f1..a4db540327 100644 --- a/ecosystem/tracing/rdb/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.kernel.tracing.storage.TracingStorageConverter +++ b/ecosystem/tracing/rdb/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.kernel.tracing.storage.TracingStorageConverter @@ -15,4 +15,4 @@ # limitations under the License. # -org.apache.shardingsphere.elasticjob.tracing.rdb.datasource.RDBTracingStorageConverter +org.apache.shardingsphere.elasticjob.tracing.rdb.storage.converter.RDBTracingStorageConverter diff --git a/ecosystem/tracing/rdb/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType b/ecosystem/tracing/rdb/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType similarity index 56% rename from ecosystem/tracing/rdb/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType rename to ecosystem/tracing/rdb/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType index aa7a3c3f89..a2b209dc3c 100644 --- a/ecosystem/tracing/rdb/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.tracing.rdb.type.TracingStorageDatabaseType +++ b/ecosystem/tracing/rdb/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.TracingStorageDatabaseType @@ -15,9 +15,9 @@ # limitations under the License. # -org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl.MySQLTracingStorageDatabaseType -org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl.PostgreSQLTracingStorageDatabaseType -org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl.OracleTracingStorageDatabaseType -org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl.SQLServerTracingStorageDatabaseType -org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl.DB2TracingStorageDatabaseType -org.apache.shardingsphere.elasticjob.tracing.rdb.type.impl.H2TracingStorageDatabaseType +org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl.MySQLTracingStorageDatabaseType +org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl.PostgreSQLTracingStorageDatabaseType +org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl.OracleTracingStorageDatabaseType +org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl.SQLServerTracingStorageDatabaseType +org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl.DB2TracingStorageDatabaseType +org.apache.shardingsphere.elasticjob.tracing.rdb.storage.type.impl.H2TracingStorageDatabaseType diff --git a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConfigurationTest.java b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/config/RDBTracingStorageConfigurationTest.java similarity index 99% rename from ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConfigurationTest.java rename to ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/config/RDBTracingStorageConfigurationTest.java index 8fb2621c8e..2ba5f83811 100644 --- a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConfigurationTest.java +++ b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/config/RDBTracingStorageConfigurationTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.datasource; +package org.apache.shardingsphere.elasticjob.tracing.rdb.config; import com.zaxxer.hikari.HikariDataSource; import org.apache.commons.dbcp2.BasicDataSource; diff --git a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/RDBJobEventStorageTest.java b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBJobEventStorageTest.java similarity index 75% rename from ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/RDBJobEventStorageTest.java rename to ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBJobEventStorageTest.java index 3e0625511a..ee60102ed6 100644 --- a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/RDBJobEventStorageTest.java +++ b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBJobEventStorageTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.storage; +package org.apache.shardingsphere.elasticjob.tracing.rdb.listener; import org.apache.commons.dbcp2.BasicDataSource; import org.apache.shardingsphere.elasticjob.kernel.executor.ExecutionType; @@ -27,7 +27,6 @@ import org.junit.jupiter.api.Test; import java.sql.SQLException; -import java.util.List; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.startsWith; @@ -68,32 +67,6 @@ void assertAddJobStatusTraceEvent() { new JobStatusTraceEvent("test_job", "fake_task_id", "fake_slave_id", ExecutionType.READY, "0", State.TASK_RUNNING, "message is empty."))); } - @Test - void assertAddJobStatusTraceEventWhenFailoverWithTaskStagingState() { - JobStatusTraceEvent jobStatusTraceEvent = new JobStatusTraceEvent( - "test_job", "fake_failover_task_id", "fake_slave_id", ExecutionType.FAILOVER, "0", State.TASK_STAGING, "message is empty."); - jobStatusTraceEvent.setOriginalTaskId("original_fake_failover_task_id"); - assertThat(storage.getJobStatusTraceEvents("fake_failover_task_id").size(), is(0)); - storage.addJobStatusTraceEvent(jobStatusTraceEvent); - assertThat(storage.getJobStatusTraceEvents("fake_failover_task_id").size(), is(1)); - } - - @Test - void assertAddJobStatusTraceEventWhenFailoverWithTaskFailedState() { - JobStatusTraceEvent stagingJobStatusTraceEvent = new JobStatusTraceEvent( - "test_job", "fake_failed_failover_task_id", "fake_slave_id", ExecutionType.FAILOVER, "0", State.TASK_STAGING, "message is empty."); - stagingJobStatusTraceEvent.setOriginalTaskId("original_fake_failed_failover_task_id"); - storage.addJobStatusTraceEvent(stagingJobStatusTraceEvent); - JobStatusTraceEvent failedJobStatusTraceEvent = new JobStatusTraceEvent( - "test_job", "fake_failed_failover_task_id", "fake_slave_id", ExecutionType.FAILOVER, "0", State.TASK_FAILED, "message is empty."); - storage.addJobStatusTraceEvent(failedJobStatusTraceEvent); - List jobStatusTraceEvents = storage.getJobStatusTraceEvents("fake_failed_failover_task_id"); - assertThat(jobStatusTraceEvents.size(), is(2)); - for (JobStatusTraceEvent jobStatusTraceEvent : jobStatusTraceEvents) { - assertThat(jobStatusTraceEvent.getOriginalTaskId(), is("original_fake_failed_failover_task_id")); - } - } - @Test void assertUpdateJobExecutionEventWhenSuccess() { JobExecutionEvent startEvent = new JobExecutionEvent("localhost", "127.0.0.1", "fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0); diff --git a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBTracingListenerTest.java b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBTracingListenerTest.java index e75a1c5f53..05f9b9ab1c 100644 --- a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBTracingListenerTest.java +++ b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/listener/RDBTracingListenerTest.java @@ -19,13 +19,12 @@ import org.apache.commons.dbcp2.BasicDataSource; import org.apache.shardingsphere.elasticjob.kernel.executor.ExecutionType; -import org.apache.shardingsphere.elasticjob.kernel.tracing.JobTracingEventBus; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobTracingEventBus; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobExecutionEvent; import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobStatusTraceEvent; import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobStatusTraceEvent.State; import org.apache.shardingsphere.elasticjob.test.util.ReflectionUtils; -import org.apache.shardingsphere.elasticjob.tracing.rdb.storage.RDBJobEventStorage; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConverterTest.java b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/converter/RDBTracingStorageConverterTest.java similarity index 97% rename from ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConverterTest.java rename to ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/converter/RDBTracingStorageConverterTest.java index 6205e6b3be..ea8f7b2410 100644 --- a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/RDBTracingStorageConverterTest.java +++ b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/converter/RDBTracingStorageConverterTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.datasource; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.converter; import com.zaxxer.hikari.HikariDataSource; import org.apache.shardingsphere.elasticjob.kernel.tracing.exception.TracingStorageUnavailableException; diff --git a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/DataSourceRegistryTest.java b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/datasource/DataSourceRegistryTest.java similarity index 93% rename from ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/DataSourceRegistryTest.java rename to ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/datasource/DataSourceRegistryTest.java index 0ddc917638..1d0206381e 100644 --- a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/datasource/DataSourceRegistryTest.java +++ b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/datasource/DataSourceRegistryTest.java @@ -15,8 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.tracing.rdb.datasource; +package org.apache.shardingsphere.elasticjob.tracing.rdb.storage.datasource; +import org.apache.shardingsphere.elasticjob.tracing.rdb.config.RDBTracingStorageConfiguration; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; diff --git a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlRDBTracingStorageConfigurationConverterTest.java b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlRDBTracingStorageConfigurationConverterTest.java index 84d53aa9fe..aaabb93076 100644 --- a/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlRDBTracingStorageConfigurationConverterTest.java +++ b/ecosystem/tracing/rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/yaml/YamlRDBTracingStorageConfigurationConverterTest.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.elasticjob.tracing.rdb.yaml; -import org.apache.shardingsphere.elasticjob.tracing.rdb.datasource.RDBTracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.tracing.rdb.config.RDBTracingStorageConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.yaml.YamlTracingStorageConfiguration; import org.junit.jupiter.api.Test; diff --git a/ecosystem/tracing/rdb/src/test/resources/logback-test.xml b/ecosystem/tracing/rdb/src/test/resources/logback-test.xml index f9263f0a18..17a6dfd847 100644 --- a/ecosystem/tracing/rdb/src/test/resources/logback-test.xml +++ b/ecosystem/tracing/rdb/src/test/resources/logback-test.xml @@ -38,5 +38,5 @@ - + diff --git a/examples/elasticjob-example-java/src/main/java/org/apache/shardingsphere/elasticjob/example/JavaMain.java b/examples/elasticjob-example-java/src/main/java/org/apache/shardingsphere/elasticjob/example/JavaMain.java index a2ff666f76..d5502cf2ff 100644 --- a/examples/elasticjob-example-java/src/main/java/org/apache/shardingsphere/elasticjob/example/JavaMain.java +++ b/examples/elasticjob-example-java/src/main/java/org/apache/shardingsphere/elasticjob/example/JavaMain.java @@ -33,7 +33,7 @@ import org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperConfiguration; import org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperRegistryCenter; import org.apache.shardingsphere.elasticjob.script.props.ScriptJobProperties; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import javax.sql.DataSource; import java.io.IOException; diff --git a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/executor/facade/JobFacade.java b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/executor/facade/JobFacade.java index 0c50332aeb..98f93e8b09 100644 --- a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/executor/facade/JobFacade.java +++ b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/executor/facade/JobFacade.java @@ -31,8 +31,8 @@ import org.apache.shardingsphere.elasticjob.kernel.internal.sharding.ShardingService; import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter; import org.apache.shardingsphere.elasticjob.spi.executor.param.JobRuntimeService; -import org.apache.shardingsphere.elasticjob.kernel.tracing.JobTracingEventBus; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobTracingEventBus; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobExecutionEvent; import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobStatusTraceEvent; import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobStatusTraceEvent.State; diff --git a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/internal/schedule/JobScheduler.java b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/internal/schedule/JobScheduler.java index 2407d6b5e8..e49e63bf26 100644 --- a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/internal/schedule/JobScheduler.java +++ b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/internal/schedule/JobScheduler.java @@ -34,7 +34,7 @@ import org.apache.shardingsphere.elasticjob.kernel.internal.setup.JobClassNameProviderFactory; import org.apache.shardingsphere.elasticjob.kernel.internal.setup.SetUpFacade; import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import org.quartz.JobBuilder; import org.quartz.JobDetail; diff --git a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/api/TracingConfiguration.java b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/config/TracingConfiguration.java similarity index 96% rename from kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/api/TracingConfiguration.java rename to kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/config/TracingConfiguration.java index 9b656b6987..6a3cca05b0 100644 --- a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/api/TracingConfiguration.java +++ b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/config/TracingConfiguration.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.kernel.tracing.api; +package org.apache.shardingsphere.elasticjob.kernel.tracing.config; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/api/TracingStorageConfiguration.java b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/config/TracingStorageConfiguration.java similarity index 93% rename from kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/api/TracingStorageConfiguration.java rename to kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/config/TracingStorageConfiguration.java index ced7a878ae..615b393b7b 100644 --- a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/api/TracingStorageConfiguration.java +++ b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/config/TracingStorageConfiguration.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.kernel.tracing.api; +package org.apache.shardingsphere.elasticjob.kernel.tracing.config; /** * Tracing storage configuration. diff --git a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/JobTracingEventBus.java b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/event/JobTracingEventBus.java similarity index 94% rename from kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/JobTracingEventBus.java rename to kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/event/JobTracingEventBus.java index 78f3fae237..b0acf3b007 100644 --- a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/JobTracingEventBus.java +++ b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/event/JobTracingEventBus.java @@ -15,15 +15,14 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.kernel.tracing; +package org.apache.shardingsphere.elasticjob.kernel.tracing.event; import com.google.common.eventbus.AsyncEventBus; import com.google.common.eventbus.EventBus; import com.google.common.util.concurrent.MoreExecutors; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.concurrent.BasicThreadFactory; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; -import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobEvent; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.exception.TracingConfigurationException; import org.apache.shardingsphere.elasticjob.kernel.tracing.listener.TracingListenerConfiguration; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; diff --git a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/storage/TracingStorageConverter.java b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/storage/TracingStorageConverter.java index 6bb4e6ecf3..8eff9d0cae 100644 --- a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/storage/TracingStorageConverter.java +++ b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/storage/TracingStorageConverter.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.elasticjob.kernel.tracing.storage; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI; /** diff --git a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfiguration.java b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfiguration.java index 2c0f3d7042..bd1985b4b2 100644 --- a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfiguration.java +++ b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfiguration.java @@ -20,7 +20,7 @@ import lombok.Getter; import lombok.Setter; import org.apache.shardingsphere.elasticjob.kernel.infra.yaml.config.YamlConfiguration; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; /** * YAML configuration for {@link TracingConfiguration}. diff --git a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfigurationConverter.java b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfigurationConverter.java index 0cd84b84c0..989f99eec7 100644 --- a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfigurationConverter.java +++ b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfigurationConverter.java @@ -18,8 +18,8 @@ package org.apache.shardingsphere.elasticjob.kernel.tracing.yaml; import org.apache.shardingsphere.elasticjob.kernel.infra.yaml.config.YamlConfigurationConverter; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; /** diff --git a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingStorageConfiguration.java b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingStorageConfiguration.java index 8eb67fe665..c3201e6d57 100644 --- a/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingStorageConfiguration.java +++ b/kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingStorageConfiguration.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.elasticjob.kernel.tracing.yaml; import org.apache.shardingsphere.elasticjob.kernel.infra.yaml.config.YamlConfiguration; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; /** * YAML configuration for {@link TracingStorageConfiguration}. diff --git a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/executor/facade/JobFacadeTest.java b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/executor/facade/JobFacadeTest.java index c587ba8cef..8806af610f 100644 --- a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/executor/facade/JobFacadeTest.java +++ b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/executor/facade/JobFacadeTest.java @@ -27,7 +27,7 @@ import org.apache.shardingsphere.elasticjob.kernel.internal.sharding.ShardingService; import org.apache.shardingsphere.elasticjob.kernel.listener.fixture.ElasticJobListenerCaller; import org.apache.shardingsphere.elasticjob.kernel.listener.fixture.TestElasticJobListener; -import org.apache.shardingsphere.elasticjob.kernel.tracing.JobTracingEventBus; +import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobTracingEventBus; import org.apache.shardingsphere.elasticjob.spi.listener.param.ShardingContexts; import org.apache.shardingsphere.elasticjob.test.util.ReflectionUtils; import org.junit.jupiter.api.BeforeEach; diff --git a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/JobTracingEventBusTest.java b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/event/JobTracingEventBusTest.java similarity index 91% rename from kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/JobTracingEventBusTest.java rename to kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/event/JobTracingEventBusTest.java index 72e23cd874..6534a1288c 100644 --- a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/JobTracingEventBusTest.java +++ b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/event/JobTracingEventBusTest.java @@ -15,12 +15,10 @@ * limitations under the License. */ -package org.apache.shardingsphere.elasticjob.kernel.tracing; +package org.apache.shardingsphere.elasticjob.kernel.tracing.event; import com.google.common.eventbus.EventBus; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; -import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobEvent; -import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobExecutionEvent; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.fixture.config.TracingStorageFixture; import org.apache.shardingsphere.elasticjob.kernel.tracing.fixture.listener.TestTracingListener; import org.apache.shardingsphere.elasticjob.test.util.ReflectionUtils; diff --git a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/fixture/config/TracingStorageConfigurationFixture.java b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/fixture/config/TracingStorageConfigurationFixture.java index 93576263d5..95319dba1c 100644 --- a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/fixture/config/TracingStorageConfigurationFixture.java +++ b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/fixture/config/TracingStorageConfigurationFixture.java @@ -19,7 +19,7 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; @RequiredArgsConstructor @Getter diff --git a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/fixture/config/TracingStorageFixtureConverter.java b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/fixture/config/TracingStorageFixtureConverter.java index 8ea3d16dc1..d6b62721c7 100644 --- a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/fixture/config/TracingStorageFixtureConverter.java +++ b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/fixture/config/TracingStorageFixtureConverter.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.elasticjob.kernel.tracing.fixture.config; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.storage.TracingStorageConverter; public final class TracingStorageFixtureConverter implements TracingStorageConverter { diff --git a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlJobEventCallerConfiguration.java b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlJobEventCallerConfiguration.java index ae9fb238e1..c5c8502209 100644 --- a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlJobEventCallerConfiguration.java +++ b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlJobEventCallerConfiguration.java @@ -19,7 +19,7 @@ import lombok.Getter; import lombok.Setter; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.fixture.config.TracingStorageFixture; import org.apache.shardingsphere.elasticjob.kernel.tracing.fixture.config.TracingStorageConfigurationFixture; diff --git a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlJobEventCallerConfigurationConverter.java b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlJobEventCallerConfigurationConverter.java index 57f94c7f2b..011f938ff1 100644 --- a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlJobEventCallerConfigurationConverter.java +++ b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlJobEventCallerConfigurationConverter.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.elasticjob.kernel.tracing.yaml; import org.apache.shardingsphere.elasticjob.kernel.infra.yaml.config.YamlConfigurationConverter; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingStorageConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.fixture.config.TracingStorageFixture; import org.apache.shardingsphere.elasticjob.kernel.tracing.fixture.config.TracingStorageConfigurationFixture; diff --git a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfigurationConverterTest.java b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfigurationConverterTest.java index acb9312ada..d4f3d7d60b 100644 --- a/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfigurationConverterTest.java +++ b/kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/tracing/yaml/YamlTracingConfigurationConverterTest.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.elasticjob.kernel.tracing.yaml; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.apache.shardingsphere.elasticjob.kernel.tracing.fixture.config.TracingStorageFixture; import org.junit.jupiter.api.Test; diff --git a/kernel/src/test/resources/logback-test.xml b/kernel/src/test/resources/logback-test.xml index ea8aa37069..138f4b618a 100644 --- a/kernel/src/test/resources/logback-test.xml +++ b/kernel/src/test/resources/logback-test.xml @@ -39,6 +39,6 @@ - + diff --git a/spring/boot-starter/src/main/java/org/apache/shardingsphere/elasticjob/spring/boot/job/ElasticJobBootstrapConfiguration.java b/spring/boot-starter/src/main/java/org/apache/shardingsphere/elasticjob/spring/boot/job/ElasticJobBootstrapConfiguration.java index ff59083bdc..9441fa8d22 100644 --- a/spring/boot-starter/src/main/java/org/apache/shardingsphere/elasticjob/spring/boot/job/ElasticJobBootstrapConfiguration.java +++ b/spring/boot-starter/src/main/java/org/apache/shardingsphere/elasticjob/spring/boot/job/ElasticJobBootstrapConfiguration.java @@ -27,7 +27,7 @@ import org.apache.shardingsphere.elasticjob.bootstrap.type.ScheduleJobBootstrap; import org.apache.shardingsphere.elasticjob.spring.boot.tracing.TracingProperties; import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.SmartInitializingSingleton; import org.springframework.beans.factory.config.SingletonBeanRegistry; diff --git a/spring/boot-starter/src/main/java/org/apache/shardingsphere/elasticjob/spring/boot/tracing/ElasticJobTracingConfiguration.java b/spring/boot-starter/src/main/java/org/apache/shardingsphere/elasticjob/spring/boot/tracing/ElasticJobTracingConfiguration.java index 0df9b60ad5..9992500959 100644 --- a/spring/boot-starter/src/main/java/org/apache/shardingsphere/elasticjob/spring/boot/tracing/ElasticJobTracingConfiguration.java +++ b/spring/boot-starter/src/main/java/org/apache/shardingsphere/elasticjob/spring/boot/tracing/ElasticJobTracingConfiguration.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.elasticjob.spring.boot.tracing; import com.zaxxer.hikari.HikariDataSource; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.springframework.beans.BeanUtils; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; diff --git a/spring/boot-starter/src/test/java/org/apache/shardingsphere/elasticjob/spring/boot/job/ElasticJobSpringBootTest.java b/spring/boot-starter/src/test/java/org/apache/shardingsphere/elasticjob/spring/boot/job/ElasticJobSpringBootTest.java index c8f10ce0e0..f7a93fd208 100644 --- a/spring/boot-starter/src/test/java/org/apache/shardingsphere/elasticjob/spring/boot/job/ElasticJobSpringBootTest.java +++ b/spring/boot-starter/src/test/java/org/apache/shardingsphere/elasticjob/spring/boot/job/ElasticJobSpringBootTest.java @@ -29,7 +29,7 @@ import org.apache.shardingsphere.elasticjob.spring.boot.tracing.TracingProperties; import org.apache.shardingsphere.elasticjob.test.util.EmbedTestingServer; import org.apache.shardingsphere.elasticjob.test.util.ReflectionUtils; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.awaitility.Awaitility; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; diff --git a/spring/boot-starter/src/test/java/org/apache/shardingsphere/elasticjob/spring/boot/tracing/TracingConfigurationTest.java b/spring/boot-starter/src/test/java/org/apache/shardingsphere/elasticjob/spring/boot/tracing/TracingConfigurationTest.java index 5633e3dad9..abf0e0831a 100644 --- a/spring/boot-starter/src/test/java/org/apache/shardingsphere/elasticjob/spring/boot/tracing/TracingConfigurationTest.java +++ b/spring/boot-starter/src/test/java/org/apache/shardingsphere/elasticjob/spring/boot/tracing/TracingConfigurationTest.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.elasticjob.spring.boot.tracing; import org.apache.shardingsphere.elasticjob.test.util.EmbedTestingServer; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.ObjectProvider; diff --git a/spring/namespace/src/main/java/org/apache/shardingsphere/elasticjob/spring/namespace/tracing/parser/TracingBeanDefinitionParser.java b/spring/namespace/src/main/java/org/apache/shardingsphere/elasticjob/spring/namespace/tracing/parser/TracingBeanDefinitionParser.java index 1bce808152..5feadd6d88 100644 --- a/spring/namespace/src/main/java/org/apache/shardingsphere/elasticjob/spring/namespace/tracing/parser/TracingBeanDefinitionParser.java +++ b/spring/namespace/src/main/java/org/apache/shardingsphere/elasticjob/spring/namespace/tracing/parser/TracingBeanDefinitionParser.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.elasticjob.spring.namespace.tracing.parser; import org.apache.shardingsphere.elasticjob.spring.namespace.tracing.tag.TracingBeanDefinitionTag; -import org.apache.shardingsphere.elasticjob.kernel.tracing.api.TracingConfiguration; +import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;