You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zi...@apache.org on 2026/04/15 03:35:02 UTC
(dolphinscheduler) branch dev updated: [Improvement-18056] Clean up unused methods and classes in the dolphinschudler-registry module (#18165)
This is an automated email from the ASF dual-hosted git repository.
zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 5314ac0813 [Improvement-18056] Clean up unused methods and classes in the dolphinschudler-registry module (#18165)
5314ac0813 is described below
commit 5314ac0813c2145555c5ed79c6558901576957d3
Author: njnu-seafish <su...@sina.com>
AuthorDate: Wed Apr 15 11:34:56 2026 +0800
[Improvement-18056] Clean up unused methods and classes in the dolphinschudler-registry module (#18165)
---
.../registry/api/ConnectStrategy.java | 29 ----------------------
.../registry/api/RegistryClient.java | 6 -----
.../repository/JdbcRegistryDataRepository.java | 10 --------
.../repository/JdbcRegistryLockRepository.java | 9 -------
.../registry/jdbc/server/JdbcRegistryServer.java | 3 ---
5 files changed, 57 deletions(-)
diff --git a/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/ConnectStrategy.java b/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/ConnectStrategy.java
deleted file mode 100644
index 4617a4869f..0000000000
--- a/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/ConnectStrategy.java
+++ /dev/null
@@ -1,29 +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 org.apache.dolphinscheduler.registry.api;
-
-/**
- * This interface defined a method to be executed when the server disconnected from registry.
- */
-public interface ConnectStrategy {
-
- void disconnect();
-
- void reconnect();
-
-}
diff --git a/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java b/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java
index 92a8cd7be5..3c2606e2c2 100644
--- a/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java
+++ b/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java
@@ -31,7 +31,6 @@ import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils;
import java.io.IOException;
-import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
@@ -42,7 +41,6 @@ import java.util.Map;
import java.util.Optional;
import java.util.Set;
-import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@@ -77,10 +75,6 @@ public class RegistryClient {
}
- public void connectUntilTimeout(@NonNull Duration duration) throws RegistryException {
- registry.connectUntilTimeout(duration);
- }
-
public List<Server> getServerList(RegistryNodeType registryNodeType) {
Map<String, String> serverMaps = getServerMaps(registryNodeType);
diff --git a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/repository/JdbcRegistryDataRepository.java b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/repository/JdbcRegistryDataRepository.java
index 1a0040db6a..e91ee0a90e 100644
--- a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/repository/JdbcRegistryDataRepository.java
+++ b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/repository/JdbcRegistryDataRepository.java
@@ -19,11 +19,8 @@ package org.apache.dolphinscheduler.plugin.registry.jdbc.repository;
import org.apache.dolphinscheduler.plugin.registry.jdbc.mapper.JdbcRegistryDataMapper;
import org.apache.dolphinscheduler.plugin.registry.jdbc.model.DO.JdbcRegistryData;
-import org.apache.dolphinscheduler.plugin.registry.jdbc.model.DTO.DataType;
import org.apache.dolphinscheduler.plugin.registry.jdbc.model.DTO.JdbcRegistryDataDTO;
-import org.apache.commons.collections4.CollectionUtils;
-
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@@ -50,13 +47,6 @@ public class JdbcRegistryDataRepository {
.map(JdbcRegistryDataDTO::fromJdbcRegistryData);
}
- public void deleteEphemeralDateByClientIds(List<Long> clientIds) {
- if (CollectionUtils.isEmpty(clientIds)) {
- return;
- }
- jdbcRegistryDataMapper.deleteByClientIds(clientIds, DataType.EPHEMERAL.name());
- }
-
public void deleteByKey(String key) {
jdbcRegistryDataMapper.deleteByKey(key);
}
diff --git a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/repository/JdbcRegistryLockRepository.java b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/repository/JdbcRegistryLockRepository.java
index 7133b3e534..63d7f7f5be 100644
--- a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/repository/JdbcRegistryLockRepository.java
+++ b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/repository/JdbcRegistryLockRepository.java
@@ -23,8 +23,6 @@ import org.apache.dolphinscheduler.plugin.registry.jdbc.mapper.JdbcRegistryLockM
import org.apache.dolphinscheduler.plugin.registry.jdbc.model.DO.JdbcRegistryLock;
import org.apache.dolphinscheduler.plugin.registry.jdbc.model.DTO.JdbcRegistryLockDTO;
-import org.apache.commons.collections4.CollectionUtils;
-
import java.util.List;
import java.util.stream.Collectors;
@@ -44,13 +42,6 @@ public class JdbcRegistryLockRepository {
.collect(Collectors.toList());
}
- public void deleteByClientIds(List<Long> clientIds) {
- if (CollectionUtils.isEmpty(clientIds)) {
- return;
- }
- jdbcRegistryLockMapper.deleteByClientIds(clientIds);
- }
-
public void insert(JdbcRegistryLockDTO jdbcRegistryLock) {
checkNotNull(jdbcRegistryLock);
JdbcRegistryLock jdbcRegistryLockDO = JdbcRegistryLockDTO.toJdbcRegistryLock(jdbcRegistryLock);
diff --git a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/server/JdbcRegistryServer.java b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/server/JdbcRegistryServer.java
index a7b75424ea..e3070bdec8 100644
--- a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/server/JdbcRegistryServer.java
+++ b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/server/JdbcRegistryServer.java
@@ -61,8 +61,6 @@ public class JdbcRegistryServer implements IJdbcRegistryServer {
private final JdbcRegistryProperties jdbcRegistryProperties;
- private final JdbcRegistryDataRepository jdbcRegistryDataRepository;
-
private final JdbcRegistryLockRepository jdbcRegistryLockRepository;
private final JdbcRegistryClientRepository jdbcRegistryClientRepository;
@@ -88,7 +86,6 @@ public class JdbcRegistryServer implements IJdbcRegistryServer {
JdbcRegistryDataChangeEventRepository jdbcRegistryDataChangeEventRepository,
JdbcRegistryProperties jdbcRegistryProperties,
TransactionTemplate transactionTemplate) {
- this.jdbcRegistryDataRepository = checkNotNull(jdbcRegistryDataRepository);
this.jdbcRegistryLockRepository = checkNotNull(jdbcRegistryLockRepository);
this.jdbcRegistryClientRepository = checkNotNull(jdbcRegistryClientRepository);
this.jdbcRegistryProperties = checkNotNull(jdbcRegistryProperties);