diff --git a/pom.xml b/pom.xml
index 04f37d7e4..d0c7e0860 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,6 +20,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+
+ cn.sliew
+ carp-spring-boot-parent
+ 0.0.19
+ cn.sliewscaleph2.0.6-SNAPSHOT
@@ -120,43 +125,27 @@
truetrue
- 3.3.0
- 2023.0.1
- 3.0.3
- 3.5.60.1.11.4.2.Final0.2.01.18.242.2
- 4.4.01.0.1
- 5.8.27
- 3.12.0
- 1.9.4
- 1.9
- 1.19
- 2.11.0
- 1.5.00.9.04.0.021.1.0.0
- 8.0.280.3.25.1.26
- 42.3.30.22.11.29.01.4.34.10.0
- 32.1.3-jre8.3.8
- 0.0.14
+ 0.0.201.0.131.0.23.3.43.1.3
- 1.1.0-M13.21.54.1.82.Final1.18.1
@@ -166,7 +155,6 @@
3.1.70.4.142.44.0.Alpha
- 3.27.24.3.20.4.11.5.2
@@ -175,40 +163,6 @@
-
- org.springframework.cloud
- spring-cloud-dependencies
- ${spring.cloud.version}
- pom
- import
-
-
- org.springframework.boot
- spring-boot-dependencies
- ${spring.boot.version}
- pom
- import
-
-
-
-
-
-
-
-
-
- io.micrometer
- micrometer-bom
- ${micrometer.version}
-
-
- com.github.xiaoymin
- knife4j-dependencies
- ${knife4j.version}
- pom
- import
-
-
${project.groupId}scaleph-common
@@ -394,39 +348,6 @@
${project.version}
-
-
- org.mybatis
- mybatis-spring
- ${mybatis.version}
-
-
- com.baomidou
- mybatis-plus-boot-starter
- ${mybatis.plus.version}
-
-
- org.mybatis
- mybatis-spring
-
-
-
-
- com.baomidou
- mybatis-plus-core
- ${mybatis.plus.version}
-
-
- com.baomidou
- mybatis-plus-generator
- ${mybatis.plus.version}
-
-
- org.apache.velocity
- velocity-engine-core
- ${velocity.engine.version}
-
-
org.apache.kafkakafka-clients
@@ -450,42 +371,6 @@
${org.mapstruct.version}
-
- cn.hutool
- hutool-all
- ${hutool.version}
-
-
- org.apache.commons
- commons-lang3
- ${commons.lang3.version}
-
-
- commons-beanutils
- commons-beanutils
- ${commons.beanutils.version}
-
-
- org.apache.commons
- commons-text
- ${commons.text.version}
-
-
- org.apache.commons
- commons-compress
- ${commons.compress.version}
-
-
- commons-io
- commons-io
- ${commons.io.version}
-
-
- commons-cli
- commons-cli
- ${commons.cli.version}
-
-
com.github.zafarkhajajava-semver
@@ -498,16 +383,6 @@
${disruptor.version}
-
- cn.sliew
- carp-framework-common
- ${carp.version}
-
-
- cn.sliew
- carp-framework-dag
- ${carp.version}
- cn.sliewcarp-module-security-spring
@@ -528,6 +403,7 @@
carp-module-datasource${carp.version}
+
cn.sliewmilky-common
@@ -544,73 +420,6 @@
${milky.version}
-
- com.google.guava
- guava
- ${guava.version}
-
-
-
- org.apache.hadoop
- hadoop-common
- ${hadoop.version}
-
-
- org.slf4j
- slf4j-api
-
-
- org.slf4j
- slf4j-reload4j
-
-
- org.slf4j
- slf4j-log4j12
-
-
- commons-logging
- commons-logging
-
-
- ch.qos.reload4j
- reload4j
-
-
- javax.servlet
- javax.servlet-api
-
-
- javax.servlet.jsp
- jsp-api
-
-
-
-
- org.apache.hadoop
- hadoop-hdfs-client
- ${hadoop.version}
-
-
- org.apache.hadoop
- hadoop-hdfs
- ${hadoop.version}
-
-
- org.apache.hadoop
- hadoop-aliyun
- ${hadoop.version}
-
-
- org.apache.hadoop
- hadoop-aws
- ${hadoop.version}
-
-
- org.apache.hive
- hive-metastore
- ${hive.version}
-
-
org.apache.flinkflink-clients
@@ -666,28 +475,6 @@
${flink.version}
-
- org.apache.pekko
- pekko-actor-typed_${scala.binary.version}
- ${pekko.version}
-
-
- org.apache.pekko
- pekko-cluster-typed_${scala.binary.version}
- ${pekko.version}
-
-
- org.apache.pekko
- pekko-stream_${scala.binary.version}
- ${pekko.version}
-
-
- org.apache.pekko
- pekko-serialization-jackson_${scala.binary.version}
- ${pekko.version}
-
-
-
com.typesafeconfig
@@ -705,53 +492,6 @@
${okhttp.version}
-
- io.minio
- minio
- ${minio.version}
-
-
-
- ru.yandex.clickhouse
- clickhouse-jdbc
- ${clickhouse-jdbc.version}
-
-
-
- mysql
- mysql-connector-java
- ${mysql.version}
- runtime
-
-
- org.postgresql
- postgresql
- ${postgresql.version}
- test
- com.oracle.database.jdbcojdbc8
@@ -787,18 +527,6 @@
${kogito.version}
-
- org.redisson
- redisson-spring-boot-starter
- ${redisson.version}
-
-
-
- com.alibaba.cola
- cola-component-statemachine
- ${cola.version}
-
-
org.furyiofury-core
diff --git a/scaleph-api/src/main/java/cn/sliew/scaleph/api/config/CarpDataSourceConfig.java b/scaleph-api/src/main/java/cn/sliew/scaleph/api/config/CarpDataSourceConfig.java
new file mode 100644
index 000000000..c526568d0
--- /dev/null
+++ b/scaleph-api/src/main/java/cn/sliew/scaleph/api/config/CarpDataSourceConfig.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package cn.sliew.scaleph.api.config;
+
+import cn.sliew.carp.framework.mybatis.DataSourceConstants;
+import cn.sliew.carp.framework.mybatis.config.CarpMybatisConfig;
+import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties;
+import com.baomidou.mybatisplus.core.MybatisConfiguration;
+import com.baomidou.mybatisplus.core.config.GlobalConfig;
+import com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler;
+import com.baomidou.mybatisplus.core.toolkit.GlobalConfigUtils;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
+import com.zaxxer.hikari.HikariDataSource;
+import org.apache.ibatis.logging.slf4j.Slf4jImpl;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.jdbc.DataSourceBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+
+import javax.sql.DataSource;
+
+@Configuration
+public class CarpDataSourceConfig {
+
+ @Autowired
+ private MybatisPlusInterceptor mybatisPlusInterceptor;
+
+ @Primary
+ @Bean(DataSourceConstants.DATA_SOURCE_FACTORY)
+ @ConfigurationProperties(prefix = "spring.datasource.carp")
+ public DataSource carpDataSource() {
+ return DataSourceBuilder.create().type(HikariDataSource.class)
+ .build();
+ }
+
+ @Primary
+ @Bean(DataSourceConstants.TRANSACTION_MANAGER_FACTORY)
+ public DataSourceTransactionManager carpTransactionManager() {
+ return new DataSourceTransactionManager(carpDataSource());
+ }
+
+ @Primary
+ @Bean(DataSourceConstants.SQL_SESSION_FACTORY)
+ public SqlSessionFactory carpSqlSessionFactory() throws Exception {
+ MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean();
+ GlobalConfig globalConfig = GlobalConfigUtils.defaults();
+ globalConfig.setMetaObjectHandler(new CarpMybatisConfig.CarpMetaHandler());
+
+ MybatisPlusProperties props = new MybatisPlusProperties();
+ props.setMapperLocations(new String[]{DataSourceConstants.MAPPER_XML_PATH});
+ factoryBean.setMapperLocations(props.resolveMapperLocations());
+
+ MybatisConfiguration configuration = new MybatisConfiguration();
+ configuration.setDefaultEnumTypeHandler(MybatisEnumTypeHandler.class);
+ configuration.setMapUnderscoreToCamelCase(true);
+ configuration.setLogImpl(Slf4jImpl.class);
+ factoryBean.setConfiguration(configuration);
+ factoryBean.setGlobalConfig(globalConfig);
+ factoryBean.setDataSource(carpDataSource());
+ factoryBean.setPlugins(mybatisPlusInterceptor);
+ return factoryBean.getObject();
+ }
+
+}
\ No newline at end of file
diff --git a/scaleph-common/src/main/java/cn/sliew/scaleph/common/dict/seatunnel/SeaTunnelPluginMapping.java b/scaleph-common/src/main/java/cn/sliew/scaleph/common/dict/seatunnel/SeaTunnelPluginMapping.java
index 8c1e1dcd7..4548f99e6 100644
--- a/scaleph-common/src/main/java/cn/sliew/scaleph/common/dict/seatunnel/SeaTunnelPluginMapping.java
+++ b/scaleph-common/src/main/java/cn/sliew/scaleph/common/dict/seatunnel/SeaTunnelPluginMapping.java
@@ -125,6 +125,7 @@ public enum SeaTunnelPluginMapping {
SOURCE_STARROCKS(SEATUNNEL, SOURCE, STARROCKS, "connector-starrocks", UNKNOWN, BATCH, SCHEMA_PROJECTION, PARALLELISM, SUPPORT_USER_DEFINED_SPLIT),
SINK_STARROCKS(SEATUNNEL, SINK, STARROCKS, "connector-starrocks", ALPHA),
SOURCE_HUDI(SEATUNNEL, SOURCE, HUDI, "connector-hudi", BETA, BATCH, EXACTLY_ONCE, PARALLELISM),
+ SINK_HUDI(SEATUNNEL, SINK, HUDI, "connector-hudi", BETA),
SOURCE_ICEBERG(SEATUNNEL, SOURCE, ICEBERG, "connector-iceberg", BETA, BATCH, STREAM, EXACTLY_ONCE, SCHEMA_PROJECTION, PARALLELISM),
SINK_ICEBERG(SEATUNNEL, SINK, ICEBERG, "connector-iceberg", UNKNOWN, CDC),
SOURCE_PAIMON(SEATUNNEL, SOURCE, PAIMON, "connector-paimon", UNKNOWN, BATCH),
diff --git a/scaleph-dao/pom.xml b/scaleph-dao/pom.xml
index 84dce38bd..62d3c458d 100644
--- a/scaleph-dao/pom.xml
+++ b/scaleph-dao/pom.xml
@@ -48,14 +48,8 @@
- mysql
- mysql-connector-java
-
-
- com.google.protobuf
- protobuf-java
-
-
+ com.mysql
+ mysql-connector-j
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/gravitino/GravitinoInitializer.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/gravitino/GravitinoInitializer.java
index 621123541..d8754c445 100644
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/gravitino/GravitinoInitializer.java
+++ b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/gravitino/GravitinoInitializer.java
@@ -19,16 +19,15 @@
package cn.sliew.scaleph.ds.gravitino;
import cn.sliew.carp.framework.common.dict.datasource.DataSourceType;
+import cn.sliew.carp.module.datasource.modal.DataSourceInfo;
+import cn.sliew.carp.module.datasource.modal.jdbc.MySQLDataSourceProperties;
import cn.sliew.carp.module.datasource.service.CarpDsInfoService;
import cn.sliew.carp.module.datasource.service.dto.DsInfoDTO;
import cn.sliew.milky.common.util.JacksonUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.modal.jdbc.JdbcDataSource;
import com.datastrato.gravitino.Catalog;
import com.datastrato.gravitino.NameIdentifier;
import com.datastrato.gravitino.client.GravitinoAdminClient;
import com.datastrato.gravitino.client.GravitinoMetalake;
-import com.fasterxml.jackson.databind.node.ObjectNode;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -107,12 +106,13 @@ private void doInitDataSource(String metalakeName, DataSourceType type, DsInfoDT
}
private void initMySQL(GravitinoMetalake metalake, NameIdentifier catalogName, DsInfoDTO dsInfoDTO) {
- JdbcDataSource dataSource = (JdbcDataSource) AbstractDataSource.fromDsInfo((ObjectNode) JacksonUtil.toJsonNode(dsInfoDTO));
+ DataSourceInfo dataSourceInfo = JacksonUtil.toObject(JacksonUtil.toJsonNode(dsInfoDTO), DataSourceInfo.class);
+ MySQLDataSourceProperties props = (MySQLDataSourceProperties) dataSourceInfo.getProps();
Map properties = new HashMap<>();
- properties.put("jdbc-driver", dataSource.getDriverClassName());
- properties.put("jdbc-url", dataSource.getUrl());
- properties.put("jdbc-user", dataSource.getUser());
- properties.put("jdbc-password", dataSource.getPassword());
- metalake.createCatalog(catalogName, Catalog.Type.RELATIONAL, "jdbc-mysql", dataSource.getRemark(), properties);
+ properties.put("jdbc-driver", props.getDriverClassName());
+ properties.put("jdbc-url", props.getUrl());
+ properties.put("jdbc-user", props.getUser());
+ properties.put("jdbc-password", props.getPassword());
+ metalake.createCatalog(catalogName, Catalog.Type.RELATIONAL, "jdbc-mysql", dataSourceInfo.getRemark(), properties);
}
}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/AbstractDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/AbstractDataSource.java
deleted file mode 100644
index 906657eeb..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/AbstractDataSource.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal;
-
-import cn.sliew.milky.common.util.JacksonUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.jackson.polymorphic.Polymorphic;
-import cn.sliew.scaleph.common.jackson.polymorphic.PolymorphicResolver;
-import cn.sliew.scaleph.ds.modal.file.*;
-import cn.sliew.scaleph.ds.modal.jdbc.*;
-import cn.sliew.scaleph.ds.modal.mq.DataHubDataSource;
-import cn.sliew.scaleph.ds.modal.mq.KafkaDataSource;
-import cn.sliew.scaleph.ds.modal.mq.PulsarDataSource;
-import cn.sliew.scaleph.ds.modal.nosql.CassandraDataSource;
-import cn.sliew.scaleph.ds.modal.nosql.ElasticsearchDataSource;
-import cn.sliew.scaleph.ds.modal.nosql.MongoDBDataSource;
-import cn.sliew.scaleph.ds.modal.nosql.RedisDataSource;
-import cn.sliew.scaleph.ds.modal.olap.*;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import lombok.Data;
-
-import java.util.Iterator;
-import java.util.List;
-
-@Data
-@JsonTypeIdResolver(AbstractDataSource.DataSourceResolver.class)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public abstract class AbstractDataSource implements Polymorphic {
-
- @NotNull
- @Schema(description = "data source type id")
- private Long dsTypeId;
-
- @Schema(description = "version")
- private String version;
-
- @NotBlank
- @Schema(description = "name")
- private String name;
-
- @Schema(description = "remark")
- private String remark;
-
- @Schema(description = "additional props")
- private List additionalProps;
-
- public abstract DataSourceType getType();
-
- public abstract DsInfoDTO toDsInfo();
-
- public static AbstractDataSource fromDsInfo(ObjectNode jsonNode) {
- jsonNode.putPOJO("type", jsonNode.path("dsType").path("type").path("value"));
- if (jsonNode.has("props")) {
- ObjectNode props = (ObjectNode) jsonNode.get("props");
- Iterator fieldNames = props.fieldNames();
- while (fieldNames.hasNext()) {
- String name = fieldNames.next();
- jsonNode.putPOJO(name, props.get(name));
- }
- }
- return JacksonUtil.toObject(jsonNode, AbstractDataSource.class);
- }
-
- public static final class DataSourceResolver extends PolymorphicResolver {
- public DataSourceResolver() {
- bindDefault(MySQLDataSource.class);
-
- bind(DataSourceType.MYSQL, MySQLDataSource.class);
- bind(DataSourceType.ORACLE, OracleDataSource.class);
- bind(DataSourceType.POSTGRESQL, PostgreSQLDataSource.class);
- bind(DataSourceType.SQLSERVER, SQLServerDataSource.class);
- bind(DataSourceType.DMDB, DmDBDataSource.class);
- bind(DataSourceType.GBASE8A, GBase8aDataSource.class);
- bind(DataSourceType.GREENPLUM, GreenplumDataSource.class);
- bind(DataSourceType.PHOENIX, PhoenixDataSource.class);
-
- bind(DataSourceType.REDIS, RedisDataSource.class);
- bind(DataSourceType.ELASTICSEARCH, ElasticsearchDataSource.class);
- bind(DataSourceType.MONGODB, MongoDBDataSource.class);
- bind(DataSourceType.CASSANDRA, CassandraDataSource.class);
-
- bind(DataSourceType.KAFKA, KafkaDataSource.class);
- bind(DataSourceType.PULSAR, PulsarDataSource.class);
- bind(DataSourceType.DATAHUB, DataHubDataSource.class);
-
- bind(DataSourceType.FTP, FtpDataSource.class);
- bind(DataSourceType.SFTP, SftpDataSource.class);
- bind(DataSourceType.OSS, OSSDataSource.class);
- bind(DataSourceType.OSSJINDO, OSSJindoDataSource.class);
- bind(DataSourceType.S3, S3DataSource.class);
- bind(DataSourceType.HDFS, HDFSDataSource.class);
-
- bind(DataSourceType.HIVE, HiveDataSource.class);
-
- bind(DataSourceType.CLICKHOUSE, ClickHouseDataSource.class);
- bind(DataSourceType.KUDU, KuduDataSource.class);
- bind(DataSourceType.DORIS, DorisDataSource.class);
- bind(DataSourceType.STARROCKS, StarRocksDataSource.class);
- bind(DataSourceType.MAXCOMPUTE, MaxComputeDataSource.class);
-
- bind(DataSourceType.IOTDB, IoTDBDataSource.class);
- bind(DataSourceType.NEO4J, Neo4jDataSource.class);
-
- bind(DataSourceType.SOCKET, SocketDataSource.class);
- bind(DataSourceType.HTTP, HttpDataSource.class);
- bind(DataSourceType.INFLUXDB, InfluxDBDataSource.class);
- }
-
- @Override
- protected String typeFromSubtype(Object obj) {
- return subTypes.inverse().get(obj.getClass()).getValue();
- }
-
- @Override
- protected Class> subTypeFromType(String id) {
- Class> subType = subTypes.get(DataSourceType.of(id));
- return subType != null ? subType : defaultClass;
- }
- }
-
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/HttpDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/HttpDataSource.java
deleted file mode 100644
index bd793dffc..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/HttpDataSource.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HttpDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "http method")
- private String method;
-
- @NotBlank
- @Schema(description = "http url")
- private String url;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.HTTP;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("method", method, "url", url);
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/InfluxDBDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/InfluxDBDataSource.java
deleted file mode 100644
index 92077cb82..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/InfluxDBDataSource.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.util.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class InfluxDBDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "InfluxDB url")
- private String url;
-
- @Schema(description = "InfluxDB username")
- private String username;
-
- @Schema(description = "InfluxDB password")
- private String password;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.INFLUXDB;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = new HashMap<>();
- props.put("url", url);
- if (StringUtils.hasText(username)) {
- props.put("username", username);
- }
- if (StringUtils.hasText(password)) {
- props.put("password", CodecUtil.encrypt(password));
- }
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/IoTDBDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/IoTDBDataSource.java
deleted file mode 100644
index 165925b84..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/IoTDBDataSource.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class IoTDBDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "node urls")
- private String nodeUrls;
-
- @NotBlank
- @Schema(description = "username")
- private String username;
-
- @NotBlank
- @Schema(description = "password")
- private String password;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.IOTDB;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("nodeUrls", nodeUrls, "username", username, "password", CodecUtil.encrypt(password));
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/Neo4jDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/Neo4jDataSource.java
deleted file mode 100644
index d6de3b990..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/Neo4jDataSource.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.util.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static cn.sliew.milky.common.check.Ensures.checkState;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class Neo4jDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "uri")
- private String uri;
-
- @Schema(description = "username")
- private String username;
-
- @Schema(description = "password")
- private String password;
-
- @Schema(description = "Bearer Token")
- private String bearerToken;
-
- @Schema(description = "Kerberos Ticket")
- private String kerberosTicket;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.NEO4J;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = new HashMap<>();
- props.put("uri", uri);
- if (StringUtils.hasText(username)) {
- checkState(StringUtils.hasText(password), () -> "password must provide where username specified");
- props.put("username", username);
- props.put("password", CodecUtil.encrypt(password));
- }
- if (StringUtils.hasText(bearerToken)) {
- props.put("bearerToken", bearerToken);
- }
- if (StringUtils.hasText(kerberosTicket)) {
- props.put("kerberosTicket", kerberosTicket);
- }
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/SocketDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/SocketDataSource.java
deleted file mode 100644
index 9e6bd8ca7..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/SocketDataSource.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SocketDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "host")
- private String host;
-
- @NotNull
- @Schema(description = "port")
- private Integer port;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.SOCKET;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("host", host, "port", port);
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/FtpDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/FtpDataSource.java
deleted file mode 100644
index 59f357b21..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/FtpDataSource.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.file;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class FtpDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "host")
- private String host;
-
- @NotNull
- @Schema(description = "port")
- private Integer port;
-
- @NotBlank
- @Schema(description = "username")
- private String username;
-
- @NotBlank
- @Schema(description = "password")
- private String password;
-
- @Schema(description = "connection mode。support active_local or passive_local")
- private String connectionMode;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.FTP;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- String encryptedPass = CodecUtil.encrypt(password);
- Map props = Map.of("host", host, "port", port, "username", username, "password", encryptedPass, "connectionMode", connectionMode);
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/HDFSDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/HDFSDataSource.java
deleted file mode 100644
index 3d3055714..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/HDFSDataSource.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.file;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.util.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HDFSDataSource extends AbstractDataSource {
-
- @Schema(description = "hdfs hdfs-site.xml path")
- private String hdfsSitePath;
-
- @NotBlank
- @Schema(description = "hdfs fs.defaultFS property")
- private String fsDefaultFS;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.HDFS;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = new HashMap<>();
- props.put("fsDefaultFS", fsDefaultFS);
- if (StringUtils.hasText(hdfsSitePath)) {
- props.put("hdfsSitePath", hdfsSitePath);
- }
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/OSSDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/OSSDataSource.java
deleted file mode 100644
index f53d953b2..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/OSSDataSource.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.file;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class OSSDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "endpoint")
- private String endpoint;
-
- @NotBlank
- @Schema(description = "bucket")
- private String bucket;
-
- @NotBlank
- @Schema(description = "access key")
- private String accessKey;
-
- @NotBlank
- @Schema(description = "access secret")
- private String accessSecret;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.OSS;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("endpoint", endpoint, "bucket", bucket, "accessKey", CodecUtil.encrypt(accessKey), "accessSecret", CodecUtil.encrypt(accessSecret));
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/OSSJindoDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/OSSJindoDataSource.java
deleted file mode 100644
index 40bf6004b..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/OSSJindoDataSource.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.file;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class OSSJindoDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "endpoint")
- private String endpoint;
-
- @NotBlank
- @Schema(description = "bucket")
- private String bucket;
-
- @NotBlank
- @Schema(description = "access key")
- private String accessKey;
-
- @NotBlank
- @Schema(description = "access secret")
- private String accessSecret;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.OSS;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("endpoint", endpoint, "bucket", bucket, "accessKey", CodecUtil.encrypt(accessKey), "accessSecret", CodecUtil.encrypt(accessSecret));
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/S3DataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/S3DataSource.java
deleted file mode 100644
index ca380138c..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/S3DataSource.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.file;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class S3DataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "bucket")
- private String bucket;
-
- @NotBlank
- @Schema(description = "access key")
- private String accessKey;
-
- @NotBlank
- @Schema(description = "access secret")
- private String accessSecret;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.S3;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("bucket", bucket, "accessKey", CodecUtil.encrypt(accessKey), "accessSecret", CodecUtil.encrypt(accessSecret));
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/SftpDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/SftpDataSource.java
deleted file mode 100644
index a3dd973a5..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/file/SftpDataSource.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.file;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SftpDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "host")
- private String host;
-
- @NotNull
- @Schema(description = "port")
- private Integer port;
-
- @NotBlank
- @Schema(description = "username")
- private String username;
-
- @NotBlank
- @Schema(description = "password")
- private String password;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.SFTP;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- String encryptedPass = CodecUtil.encrypt(password);
- Map props = Map.of("host", host, "port", port, "username", username, "password", encryptedPass);
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/DmDBDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/DmDBDataSource.java
deleted file mode 100644
index 3a70367c0..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/DmDBDataSource.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.jdbc;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DmDBDataSource extends JdbcDataSource {
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.DMDB;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/GBase8aDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/GBase8aDataSource.java
deleted file mode 100644
index 078a23076..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/GBase8aDataSource.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.jdbc;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GBase8aDataSource extends JdbcDataSource {
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.GBASE8A;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/GreenplumDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/GreenplumDataSource.java
deleted file mode 100644
index e315d0d82..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/GreenplumDataSource.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.jdbc;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class GreenplumDataSource extends JdbcDataSource {
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.GREENPLUM;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/JdbcDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/JdbcDataSource.java
deleted file mode 100644
index 0a88fa00c..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/JdbcDataSource.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.jdbc;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.jackson.sensitive.Sensitive;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public abstract class JdbcDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "driver class name")
- private String driverClassName;
-
- @NotBlank
- @Schema(description = "jdbc url")
- private String url;
-
- @Schema(description = "user")
- private String user;
-
- /**
- * {@link Sensitive} not affect Map props
- *
- * @see Sensitive
- */
- @Schema(description = "password")
- private String password;
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- String encryptedPass = CodecUtil.encrypt(password);
- Map props = Map.of("driverClassName", driverClassName, "url", url, "user", user, "password", encryptedPass);
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/MySQLDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/MySQLDataSource.java
deleted file mode 100644
index aa24bf412..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/MySQLDataSource.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.jdbc;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class MySQLDataSource extends JdbcDataSource {
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.MYSQL;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/OracleDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/OracleDataSource.java
deleted file mode 100644
index 60c3cb747..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/OracleDataSource.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.jdbc;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class OracleDataSource extends JdbcDataSource {
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.ORACLE;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/PhoenixDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/PhoenixDataSource.java
deleted file mode 100644
index 6f4de78a7..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/PhoenixDataSource.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.jdbc;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PhoenixDataSource extends JdbcDataSource {
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.PHOENIX;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/PostgreSQLDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/PostgreSQLDataSource.java
deleted file mode 100644
index fea3ef3bd..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/PostgreSQLDataSource.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.jdbc;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PostgreSQLDataSource extends JdbcDataSource {
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.POSTGRESQL;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/SQLServerDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/SQLServerDataSource.java
deleted file mode 100644
index 7c6f8f14a..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/jdbc/SQLServerDataSource.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.jdbc;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class SQLServerDataSource extends JdbcDataSource {
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.SQLSERVER;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/mq/DataHubDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/mq/DataHubDataSource.java
deleted file mode 100644
index b9ebaa8e4..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/mq/DataHubDataSource.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.mq;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DataHubDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "endpoint")
- private String endpoint;
-
- @NotBlank
- @Schema(description = "access id")
- private String accessId;
-
- @NotBlank
- @Schema(description = "access key")
- private String accessKey;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.DATAHUB;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("endpoint", endpoint, "accessId", CodecUtil.encrypt(accessId), "accessKey", CodecUtil.encrypt(accessKey));
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/mq/KafkaDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/mq/KafkaDataSource.java
deleted file mode 100644
index bce172db5..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/mq/KafkaDataSource.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.mq;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class KafkaDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "kafka bootstrap servers")
- private String bootstrapServers;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.KAFKA;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("bootstrapServers", bootstrapServers);
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/mq/PulsarDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/mq/PulsarDataSource.java
deleted file mode 100644
index f8e6a2ec6..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/mq/PulsarDataSource.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.mq;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.util.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PulsarDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "admin web service url")
- private String webServiceUrl;
-
- @NotBlank
- @Schema(description = "client service url")
- private String clientServiceUrl;
-
- @Schema(description = "authentication plugin")
- private String authPlugin;
-
- @Schema(description = "authentication plugin parameters")
- private String authParams;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.PULSAR;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = new HashMap<>();
- props.put("webServiceUrl", webServiceUrl);
- props.put("clientServiceUrl", clientServiceUrl);
- if (StringUtils.hasText(authPlugin)) {
- props.put("authPlugin", authPlugin);
- }
- if (StringUtils.hasText(authParams)) {
- props.put("authParams", CodecUtil.encrypt(authParams));
- }
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/CassandraDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/CassandraDataSource.java
deleted file mode 100644
index 235b5b53b..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/CassandraDataSource.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.nosql;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.util.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CassandraDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "host")
- private String host;
-
- @NotBlank
- @Schema(description = "keyspace")
- private String keyspace;
-
- @Schema(description = "username")
- private String username;
-
- @Schema(description = "password")
- private String password;
-
- @Schema(description = "datacenter")
- private String datacenter;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.CASSANDRA;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = new HashMap<>();
- props.put("host", host);
- props.put("keyspace", keyspace);
- if (StringUtils.hasText(username)) {
- props.put("username", username);
- }
- if (StringUtils.hasText(password)) {
- props.put("password", CodecUtil.encrypt(password));
- }
- if (StringUtils.hasText(datacenter)) {
- props.put("datacenter", datacenter);
- }
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/ElasticsearchDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/ElasticsearchDataSource.java
deleted file mode 100644
index 19d12c066..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/ElasticsearchDataSource.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.nosql;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.util.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static cn.sliew.milky.common.check.Ensures.checkState;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class ElasticsearchDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "hosts")
- private String hosts;
-
- @Schema(description = "username")
- private String username;
-
- @Schema(description = "password")
- private String password;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.ELASTICSEARCH;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = new HashMap<>();
- props.put("hosts", hosts);
- if (StringUtils.hasText(username)) {
- checkState(StringUtils.hasText(password), () -> "password must provide where username specified");
- props.put("username", username);
- props.put("password", CodecUtil.encrypt(password));
- }
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/MongoDBDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/MongoDBDataSource.java
deleted file mode 100644
index 5a50d4877..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/MongoDBDataSource.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.nosql;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class MongoDBDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "uri")
- private String uri;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.MONGODB;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("uri", CodecUtil.encrypt(uri));
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/RedisDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/RedisDataSource.java
deleted file mode 100644
index 9756f2987..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/nosql/RedisDataSource.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.nosql;
-
-import cn.sliew.milky.common.util.JacksonUtil;
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.ds.RedisMode;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.util.CollectionUtils;
-import org.springframework.util.StringUtils;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class RedisDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "host")
- private String host;
-
- @NotNull
- @Schema(description = "port")
- private Integer port;
-
- @Schema(description = "user")
- private String user;
-
- @Schema(description = "password")
- private String password;
-
- @Schema(description = "redis mode, single or cluster")
- private RedisMode mode;
-
- @Schema(description = "redis nodes information, used in cluster mode")
- private List nodes;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.REDIS;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = new HashMap<>();
- props.put("host", host);
- props.put("port", port);
- if (StringUtils.hasText(user)) {
- props.put("user", user);
- }
- if (StringUtils.hasText(password)) {
- props.put("password", CodecUtil.encrypt(password));
- }
- if (mode != null) {
- props.put("mode", mode.getValue());
- }
- if (CollectionUtils.isEmpty(nodes) == false) {
- props.put("nodes", JacksonUtil.toJsonString(nodes));
- }
- dto.setProps(props);
- return dto;
- }
-
- @Data
- public static class Node {
-
- private String node;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/ClickHouseDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/ClickHouseDataSource.java
deleted file mode 100644
index 721720c44..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/ClickHouseDataSource.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.olap;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class ClickHouseDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "clickhouse host")
- private String host;
-
- @NotBlank
- @Schema(description = "clickhouse database")
- private String database;
-
- @NotBlank
- @Schema(description = "clickhouse username")
- private String username;
-
- @NotBlank
- @Schema(description = "clickhouse password")
- private String password;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.CLICKHOUSE;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("host", host, "database", database, "username", username, "password", CodecUtil.encrypt(password));
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/DorisDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/DorisDataSource.java
deleted file mode 100644
index ca0f49bd7..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/DorisDataSource.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.olap;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.util.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DorisDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "Node Urls")
- private String nodeUrls;
-
- @NotBlank
- @Schema(description = "username")
- private String username;
-
- @Schema(description = "password")
- private String password;
-
- @NotNull
- @Schema(description = "fenodes query port")
- private Integer queryPort;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.DORIS;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = new HashMap<>();
- props.put("nodeUrls", nodeUrls);
- if (StringUtils.hasText(username)) {
- props.put("username", username);
- }
- if (StringUtils.hasText(password)) {
- props.put("password", CodecUtil.encrypt(password));
- }
- if (queryPort != null) {
- props.put("queryPort", queryPort);
- }
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/HiveDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/HiveDataSource.java
deleted file mode 100644
index ab0e1f5dc..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/HiveDataSource.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.olap;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.util.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class HiveDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "hive metastore uri")
- private String metastoreUri;
-
- @Schema(description = "path of hdfs-site.xml")
- private String hdfsSitePath;
-
- @Schema(description = "kerberos keytab path")
- private String kerberosKeytabPath;
-
- @Schema(description = "kerberos principal")
- private String kerberosPrincipal;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.HIVE;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = new HashMap<>();
- props.put("metastoreUri", metastoreUri);
- if (StringUtils.hasText(hdfsSitePath)) {
- props.put("hdfsSitePath", hdfsSitePath);
- }
- if (StringUtils.hasText(kerberosKeytabPath)) {
- props.put("kerberosKeytabPath", kerberosKeytabPath);
- }
- if (StringUtils.hasText(kerberosPrincipal)) {
- props.put("kerberosPrincipal", kerberosPrincipal);
- }
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/KuduDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/KuduDataSource.java
deleted file mode 100644
index 2729afbbd..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/KuduDataSource.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.olap;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class KuduDataSource extends AbstractDataSource {
-
- @Schema(description = "kudu masters")
- private String masters;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.KUDU;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("masters", masters);
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/MaxComputeDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/MaxComputeDataSource.java
deleted file mode 100644
index 1f0c31ca7..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/MaxComputeDataSource.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.olap;
-
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class MaxComputeDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "endpoint")
- private String endpoint;
-
- @NotBlank
- @Schema(description = "accessId")
- private String accessId;
-
- @NotBlank
- @Schema(description = "accesskey")
- private String accesskey;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.MAXCOMPUTE;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = Map.of("endpoint", endpoint, "accessId", accessId, "accesskey", accesskey);
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/StarRocksDataSource.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/StarRocksDataSource.java
deleted file mode 100644
index 0d0bd8885..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/modal/olap/StarRocksDataSource.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.modal.olap;
-
-import cn.sliew.scaleph.common.codec.CodecUtil;
-import cn.sliew.scaleph.common.dict.job.DataSourceType;
-import cn.sliew.scaleph.common.util.BeanUtil;
-import cn.sliew.scaleph.ds.modal.AbstractDataSource;
-import cn.sliew.scaleph.ds.service.dto.DsInfoDTO;
-import cn.sliew.scaleph.ds.service.dto.DsTypeDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.util.StringUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class StarRocksDataSource extends AbstractDataSource {
-
- @NotBlank
- @Schema(description = "Node Urls")
- private String nodeUrls;
-
- @NotBlank
- @Schema(description = "Base url")
- private String baseUrl;
-
- @NotBlank
- @Schema(description = "username")
- private String username;
-
- @NotBlank
- @Schema(description = "password")
- private String password;
-
- @Override
- public DataSourceType getType() {
- return DataSourceType.STARROCKS;
- }
-
- @Override
- public DsInfoDTO toDsInfo() {
- DsInfoDTO dto = BeanUtil.copy(this, new DsInfoDTO());
- DsTypeDTO dsType = new DsTypeDTO();
- dsType.setId(getDsTypeId());
- dsType.setType(getType());
- dto.setDsType(dsType);
- Map props = new HashMap<>();
- props.put("nodeUrls", nodeUrls);
- if (StringUtils.hasText(username)) {
- props.put("username", username);
- }
- if (StringUtils.hasText(password)) {
- props.put("password", CodecUtil.encrypt(password));
- }
- dto.setProps(props);
- return dto;
- }
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/service/dto/DsCategoryDTO.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/service/dto/DsCategoryDTO.java
deleted file mode 100644
index d42dffe55..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/service/dto/DsCategoryDTO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.service.dto;
-
-import cn.sliew.scaleph.dao.entity.BaseDO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-@Data
-@EqualsAndHashCode
-@Schema(name = "DsCategory对象", description = "data source category")
-public class DsCategoryDTO extends BaseDO {
-
- private static final long serialVersionUID = 1L;
-
- @Schema(description = "name")
- private String name;
-
- @Schema(description = "order")
- private Integer order;
-
- @Schema(description = "remark")
- private String remark;
-
-}
diff --git a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/service/dto/DsInfoDTO.java b/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/service/dto/DsInfoDTO.java
deleted file mode 100644
index 932fda76e..000000000
--- a/scaleph-datasource/src/main/java/cn/sliew/scaleph/ds/service/dto/DsInfoDTO.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.sliew.scaleph.ds.service.dto;
-
-import cn.sliew.scaleph.ds.modal.PropValuePair;
-import cn.sliew.scaleph.system.model.BaseDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- *