Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
DolphinScheduler
提交
449c098a
DolphinScheduler
项目概览
apache
/
DolphinScheduler
上一次同步 1 年多
通知
704
Star
9572
Fork
3514
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
449c098a
编写于
12月 03, 2021
作者:
K
kezhenxu94
提交者:
GitHub
12月 03, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix quartz not work, worker / alert server should not listen or 8080 port (#7159)
上级
4ad1d4b2
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
65 addition
and
44 deletion
+65
-44
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
...n/java/org/apache/dolphinscheduler/alert/AlertServer.java
+5
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
...in/java/org/apache/dolphinscheduler/common/Constants.java
+0
-5
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java
...g/apache/dolphinscheduler/server/master/MasterServer.java
+9
-0
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
...g/apache/dolphinscheduler/server/worker/WorkerServer.java
+2
-0
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/quartz/QuartzExecutors.java
...ache/dolphinscheduler/service/quartz/QuartzExecutors.java
+33
-37
install.sh
install.sh
+3
-1
script/dolphinscheduler-daemon.sh
script/dolphinscheduler-daemon.sh
+2
-0
script/remove-zk-node.sh
script/remove-zk-node.sh
+2
-0
script/scp-hosts.sh
script/scp-hosts.sh
+2
-0
script/start-all.sh
script/start-all.sh
+3
-0
script/status-all.sh
script/status-all.sh
+2
-0
script/stop-all.sh
script/stop-all.sh
+2
-0
未找到文件。
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
浏览文件 @
449c098a
...
...
@@ -38,7 +38,9 @@ import javax.annotation.PreDestroy;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.WebApplicationType
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.context.annotation.ComponentScan
;
@EnableAutoConfiguration
...
...
@@ -66,7 +68,9 @@ public class AlertServer implements Closeable {
}
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
AlertServer
.
class
,
args
);
new
SpringApplicationBuilder
(
AlertServer
.
class
)
.
web
(
WebApplicationType
.
NONE
)
.
run
(
args
);
}
@PostConstruct
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
浏览文件 @
449c098a
...
...
@@ -453,11 +453,6 @@ public final class Constants {
*/
public
static
final
String
DEFAULT_CRON_STRING
=
"0 0 0 * * ? *"
;
/**
* data source config
*/
public
static
final
String
SPRING_DATASOURCE_DRIVER_CLASS_NAME
=
"spring.datasource.driver-class-name"
;
public
static
final
String
SPRING_DATASOURCE_URL
=
"spring.datasource.url"
;
...
...
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java
浏览文件 @
449c098a
...
...
@@ -20,6 +20,7 @@ package org.apache.dolphinscheduler.server.master;
import
org.apache.dolphinscheduler.common.Constants
;
import
org.apache.dolphinscheduler.common.IStoppable
;
import
org.apache.dolphinscheduler.common.thread.Stopper
;
import
org.apache.dolphinscheduler.common.utils.PropertyUtils
;
import
org.apache.dolphinscheduler.remote.NettyRemotingServer
;
import
org.apache.dolphinscheduler.remote.command.CommandType
;
import
org.apache.dolphinscheduler.remote.config.NettyServerConfig
;
...
...
@@ -43,12 +44,15 @@ import org.quartz.SchedulerException;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.WebApplicationType
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
static
org
.
apache
.
dolphinscheduler
.
common
.
Constants
.
SPRING_DATASOURCE_DRIVER_CLASS_NAME
;
/**
* master server
*/
...
...
@@ -101,6 +105,9 @@ public class MasterServer implements IStoppable {
@Autowired
private
EventExecuteService
eventExecuteService
;
@Value
(
"${spring.datasource.driver-class-name}"
)
private
String
driverClassName
;
private
ConcurrentHashMap
<
Integer
,
WorkflowExecuteThread
>
processInstanceExecMaps
=
new
ConcurrentHashMap
<>();
/**
...
...
@@ -118,6 +125,8 @@ public class MasterServer implements IStoppable {
*/
@PostConstruct
public
void
run
()
{
PropertyUtils
.
setValue
(
SPRING_DATASOURCE_DRIVER_CLASS_NAME
,
driverClassName
);
// init remoting server
NettyServerConfig
serverConfig
=
new
NettyServerConfig
();
serverConfig
.
setListenPort
(
masterConfig
.
getListenPort
());
...
...
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
浏览文件 @
449c098a
...
...
@@ -35,6 +35,7 @@ import org.apache.dolphinscheduler.service.bean.SpringApplicationContext;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.WebApplicationType
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
...
...
@@ -108,6 +109,7 @@ public class WorkerServer implements IStoppable {
public
static
void
main
(
String
[]
args
)
{
Thread
.
currentThread
().
setName
(
Constants
.
THREAD_NAME_WORKER_SERVER
);
new
SpringApplicationBuilder
(
WorkerServer
.
class
)
.
web
(
WebApplicationType
.
NONE
)
.
profiles
(
"worker"
)
.
run
(
args
);
}
...
...
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/quartz/QuartzExecutors.java
浏览文件 @
449c098a
...
...
@@ -17,6 +17,39 @@
package
org.apache.dolphinscheduler.service.quartz
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Properties
;
import
java.util.concurrent.locks.ReadWriteLock
;
import
java.util.concurrent.locks.ReentrantReadWriteLock
;
import
org.apache.commons.configuration.Configuration
;
import
org.apache.commons.configuration.ConfigurationException
;
import
org.apache.commons.configuration.PropertiesConfiguration
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.dolphinscheduler.common.utils.DateUtils
;
import
org.apache.dolphinscheduler.common.utils.JSONUtils
;
import
org.apache.dolphinscheduler.common.utils.PropertyUtils
;
import
org.apache.dolphinscheduler.dao.entity.Schedule
;
import
org.apache.dolphinscheduler.service.exceptions.ServiceException
;
import
org.quartz.CronTrigger
;
import
org.quartz.Job
;
import
org.quartz.JobDetail
;
import
org.quartz.JobKey
;
import
org.quartz.Scheduler
;
import
org.quartz.SchedulerException
;
import
org.quartz.TriggerKey
;
import
org.quartz.impl.StdSchedulerFactory
;
import
org.quartz.impl.jdbcjobstore.JobStoreTX
;
import
org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
;
import
org.quartz.impl.jdbcjobstore.StdJDBCDelegate
;
import
org.quartz.impl.matchers.GroupMatcher
;
import
org.quartz.simpl.SimpleThreadPool
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
static
org
.
apache
.
dolphinscheduler
.
common
.
Constants
.
ORG_POSTGRESQL_DRIVER
;
import
static
org
.
apache
.
dolphinscheduler
.
common
.
Constants
.
ORG_QUARTZ_DATASOURCE_MYDS_CONNECTIONPROVIDER_CLASS
;
import
static
org
.
apache
.
dolphinscheduler
.
common
.
Constants
.
ORG_QUARTZ_JOBSTORE_ACQUIRETRIGGERSWITHINLOCK
;
...
...
@@ -54,47 +87,10 @@ import static org.apache.dolphinscheduler.common.Constants.SPRING_DATASOURCE_DRI
import
static
org
.
apache
.
dolphinscheduler
.
common
.
Constants
.
STRING_FALSE
;
import
static
org
.
apache
.
dolphinscheduler
.
common
.
Constants
.
STRING_TRUE
;
import
static
org
.
apache
.
dolphinscheduler
.
common
.
Constants
.
UNDERLINE
;
import
static
org
.
quartz
.
CronScheduleBuilder
.
cronSchedule
;
import
static
org
.
quartz
.
JobBuilder
.
newJob
;
import
static
org
.
quartz
.
TriggerBuilder
.
newTrigger
;
import
org.apache.dolphinscheduler.common.utils.DateUtils
;
import
org.apache.dolphinscheduler.common.utils.JSONUtils
;
import
org.apache.dolphinscheduler.common.utils.PropertyUtils
;
import
org.apache.dolphinscheduler.dao.entity.Schedule
;
import
org.apache.dolphinscheduler.service.exceptions.ServiceException
;
import
org.apache.commons.configuration.Configuration
;
import
org.apache.commons.configuration.ConfigurationException
;
import
org.apache.commons.configuration.PropertiesConfiguration
;
import
org.apache.commons.lang.StringUtils
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Properties
;
import
java.util.concurrent.locks.ReadWriteLock
;
import
java.util.concurrent.locks.ReentrantReadWriteLock
;
import
org.quartz.CronTrigger
;
import
org.quartz.Job
;
import
org.quartz.JobDetail
;
import
org.quartz.JobKey
;
import
org.quartz.Scheduler
;
import
org.quartz.SchedulerException
;
import
org.quartz.TriggerKey
;
import
org.quartz.impl.StdSchedulerFactory
;
import
org.quartz.impl.jdbcjobstore.JobStoreTX
;
import
org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
;
import
org.quartz.impl.jdbcjobstore.StdJDBCDelegate
;
import
org.quartz.impl.matchers.GroupMatcher
;
import
org.quartz.simpl.SimpleThreadPool
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* single Quartz executors instance
*/
...
...
install.sh
浏览文件 @
449c098a
...
...
@@ -19,7 +19,9 @@
workDir
=
`
dirname
$0
`
workDir
=
`
cd
${
workDir
}
;
pwd
`
set
-a
source
${
workDir
}
/conf/config/install_config.conf
set
+a
# 1.replace file
echo
"1.replace file"
...
...
@@ -31,7 +33,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
fi
datasourceDriverClassname
=
"com.mysql.jdbc.Driver"
if
[
$dbtype
==
"postgresql"
]
;
then
if
[
[
$dbtype
==
"postgresql"
]
]
;
then
datasourceDriverClassname
=
"org.postgresql.Driver"
fi
...
...
script/dolphinscheduler-daemon.sh
浏览文件 @
449c098a
...
...
@@ -36,8 +36,10 @@ BIN_DIR=`cd "$BIN_DIR"; pwd`
DOLPHINSCHEDULER_HOME
=
`
cd
"
$BIN_DIR
/.."
;
pwd
`
source
/etc/profile
set
-a
source
"
${
DOLPHINSCHEDULER_HOME
}
/conf/env/dolphinscheduler_env.sh"
source
"
${
DOLPHINSCHEDULER_HOME
}
/conf/config/install_config.conf"
set
+a
export
HOSTNAME
=
`
hostname
`
...
...
script/remove-zk-node.sh
浏览文件 @
449c098a
...
...
@@ -31,8 +31,10 @@ BIN_DIR=`dirname $0`
BIN_DIR
=
`
cd
"
$BIN_DIR
"
;
pwd
`
DOLPHINSCHEDULER_HOME
=
$BIN_DIR
/..
set
-a
source
${
BIN_DIR
}
/../conf/config/install_config.conf
source
${
BIN_DIR
}
/../conf/env/dolphinscheduler_env.sh
set
+a
export
JAVA_HOME
=
$JAVA_HOME
...
...
script/scp-hosts.sh
浏览文件 @
449c098a
...
...
@@ -18,7 +18,9 @@
workDir
=
`
dirname
$0
`
workDir
=
`
cd
${
workDir
}
;
pwd
`
set
-a
source
$workDir
/../conf/config/install_config.conf
set
+a
txt
=
""
if
[[
"
$OSTYPE
"
==
"darwin"
*
]]
;
then
...
...
script/start-all.sh
浏览文件 @
449c098a
...
...
@@ -18,7 +18,10 @@
workDir
=
`
dirname
$0
`
workDir
=
`
cd
${
workDir
}
;
pwd
`
set
-a
source
$workDir
/../conf/config/install_config.conf
set
+a
declare
-A
workersGroupMap
=()
...
...
script/status-all.sh
浏览文件 @
449c098a
...
...
@@ -18,7 +18,9 @@
workDir
=
`
dirname
$0
`
workDir
=
`
cd
${
workDir
}
;
pwd
`
set
-a
source
$workDir
/../conf/config/install_config.conf
set
+a
# install_config.conf info
echo
-e
'\n'
...
...
script/stop-all.sh
浏览文件 @
449c098a
...
...
@@ -19,7 +19,9 @@
workDir
=
`
dirname
$0
`
workDir
=
`
cd
${
workDir
}
;
pwd
`
set
-a
source
$workDir
/../conf/config/install_config.conf
set
+a
declare
-A
workersGroupMap
=()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录