You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ki...@apache.org on 2021/08/31 16:33:03 UTC
[dolphinscheduler] branch dev updated: Enhance `StandaloneServer`
so that we don't need to update the version number manually (#6074)
This is an automated email from the ASF dual-hosted git repository.
kirs 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 a06badb Enhance `StandaloneServer` so that we don't need to update the version number manually (#6074)
a06badb is described below
commit a06badba77ec7fc098878e2852ffdf5a24b8d1ac
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Wed Sep 1 00:32:55 2021 +0800
Enhance `StandaloneServer` so that we don't need to update the version number manually (#6074)
---
.../dolphinscheduler/server/StandaloneServer.java | 10 ++++++++++
.../src/main/resources/registry.properties | 22 ----------------------
2 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/dolphinscheduler-standalone-server/src/main/java/org/apache/dolphinscheduler/server/StandaloneServer.java b/dolphinscheduler-standalone-server/src/main/java/org/apache/dolphinscheduler/server/StandaloneServer.java
index 3b92b7f..d52e7f5 100644
--- a/dolphinscheduler-standalone-server/src/main/java/org/apache/dolphinscheduler/server/StandaloneServer.java
+++ b/dolphinscheduler-standalone-server/src/main/java/org/apache/dolphinscheduler/server/StandaloneServer.java
@@ -33,6 +33,7 @@ import org.apache.curator.test.TestingServer;
import java.io.FileReader;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.nio.file.Paths;
import javax.sql.DataSource;
@@ -71,6 +72,15 @@ public class StandaloneServer {
final TestingServer server = new TestingServer(true);
System.setProperty("registry.servers", server.getConnectString());
+ final Path registryPath = Paths.get(
+ StandaloneServer.class.getProtectionDomain().getCodeSource().getLocation().getPath(),
+ "../../../dolphinscheduler-registry-plugin/dolphinscheduler-registry-zookeeper/pom.xml"
+ ).toAbsolutePath();
+ if (Files.exists(registryPath)) {
+ System.setProperty("registry.plugin.binding", registryPath.toString());
+ System.setProperty("registry.plugin.dir", "");
+ }
+
Thread.currentThread().setName("Standalone-Server");
new SpringApplicationBuilder(
diff --git a/dolphinscheduler-standalone-server/src/main/resources/registry.properties b/dolphinscheduler-standalone-server/src/main/resources/registry.properties
deleted file mode 100644
index 3f557ce..0000000
--- a/dolphinscheduler-standalone-server/src/main/resources/registry.properties
+++ /dev/null
@@ -1,22 +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.
-#
-
-# This file is only to override the production configurations in standalone server.
-
-registry.plugin.dir=./dolphinscheduler-dist/target/dolphinscheduler-dist-1.3.6-SNAPSHOT/lib/plugin/registry/zookeeper
-registry.plugin.name=zookeeper
-registry.servers=127.0.0.1:2181