Browse Source

[Improvement]Delete the getSession in the Registry interface (#10633)

3.1.0-release
wjf 2 years ago committed by GitHub
parent
commit
75581b7543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/Registry.java
  2. 4
      dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-mysql/src/main/java/org/apache/dolphinscheduler/plugin/registry/mysql/MysqlRegistry.java
  3. 5
      dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-zookeeper/src/main/java/org/apache/dolphinscheduler/plugin/registry/zookeeper/ZookeeperRegistry.java
  4. 4
      dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/registry/RegistryClient.java

2
dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/Registry.java

@ -43,6 +43,4 @@ public interface Registry extends Closeable {
boolean acquireLock(String key);
boolean releaseLock(String key);
Duration getSessionTimeout();
}

4
dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-mysql/src/main/java/org/apache/dolphinscheduler/plugin/registry/mysql/MysqlRegistry.java

@ -156,10 +156,6 @@ public class MysqlRegistry implements Registry {
return true;
}
@Override
public Duration getSessionTimeout() {
throw new UnsupportedOperationException("Not support session timeout at Mysql Registry");
}
@Override
public void close() {

5
dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-zookeeper/src/main/java/org/apache/dolphinscheduler/plugin/registry/zookeeper/ZookeeperRegistry.java

@ -232,11 +232,6 @@ public final class ZookeeperRegistry implements Registry {
return true;
}
@Override
public Duration getSessionTimeout() {
return properties.getSessionTimeout();
}
@Override
public void close() {
treeCacheMap.values().forEach(CloseableUtils::closeQuietly);

4
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/registry/RegistryClient.java

@ -310,8 +310,4 @@ public class RegistryClient {
}
}
}
public Duration getSessionTimeout() {
return registry.getSessionTimeout();
}
}

Loading…
Cancel
Save