Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
淡淡忧伤的程序员
DolphinScheduler
提交
a3d9d56f
DolphinScheduler
项目概览
淡淡忧伤的程序员
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
48
Star
0
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
a3d9d56f
编写于
4月 24, 2019
作者:
D
dailidong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add monitor
上级
5199e4b8
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
29 addition
and
14 deletion
+29
-14
escheduler-api/src/main/java/cn/escheduler/api/enums/Status.java
...ler-api/src/main/java/cn/escheduler/api/enums/Status.java
+7
-1
escheduler-common/src/main/java/cn/escheduler/common/Constants.java
...-common/src/main/java/cn/escheduler/common/Constants.java
+1
-1
escheduler-common/src/main/java/cn/escheduler/common/zk/AbstractZKClient.java
...c/main/java/cn/escheduler/common/zk/AbstractZKClient.java
+19
-10
escheduler-dao/src/main/java/cn/escheduler/dao/MonitorDBDao.java
...ler-dao/src/main/java/cn/escheduler/dao/MonitorDBDao.java
+1
-1
escheduler-dao/src/main/java/cn/escheduler/dao/TaskRecordDao.java
...er-dao/src/main/java/cn/escheduler/dao/TaskRecordDao.java
+1
-1
未找到文件。
escheduler-api/src/main/java/cn/escheduler/api/enums/Status.java
浏览文件 @
a3d9d56f
...
@@ -190,8 +190,14 @@ public enum Status {
...
@@ -190,8 +190,14 @@ public enum Status {
PROCESS_NODE_HAS_CYCLE
(
50019
,
"process node has cycle"
),
PROCESS_NODE_HAS_CYCLE
(
50019
,
"process node has cycle"
),
PROCESS_NODE_S_PARAMETER_INVALID
(
50020
,
"process node %s parameter invalid"
),
PROCESS_NODE_S_PARAMETER_INVALID
(
50020
,
"process node %s parameter invalid"
),
HDFS_NOT_STARTUP
(
60001
,
"hdfs not startup"
),
HDFS_NOT_STARTUP
(
60001
,
"hdfs not startup"
),
/**
* for monitor
*/
QUERY_DATABASE_STATE_ERROR
(
70001
,
"query database state error"
),
QUERY_ZOOKEEPER_STATE_ERROR
(
70002
,
"query zookeeper state error"
),
;
;
private
int
code
;
private
int
code
;
...
...
escheduler-common/src/main/java/cn/escheduler/common/Constants.java
浏览文件 @
a3d9d56f
...
@@ -453,7 +453,7 @@ public final class Constants {
...
@@ -453,7 +453,7 @@ public final class Constants {
/**
/**
* task record configuration path
* task record configuration path
*/
*/
public
static
final
String
TASK_RECORD_PROPERTIES_PATH
=
"dao/data_source.properties"
;
public
static
final
String
DATA_SOURCE_PROPERTIES
=
"dao/data_source.properties"
;
public
static
final
String
TASK_RECORD_URL
=
"task.record.datasource.url"
;
public
static
final
String
TASK_RECORD_URL
=
"task.record.datasource.url"
;
...
...
escheduler-common/src/main/java/cn/escheduler/common/zk/AbstractZKClient.java
浏览文件 @
a3d9d56f
...
@@ -87,15 +87,6 @@ public abstract class AbstractZKClient {
...
@@ -87,15 +87,6 @@ public abstract class AbstractZKClient {
public
AbstractZKClient
()
{
public
AbstractZKClient
()
{
StringBuilder
sb
=
new
StringBuilder
();
String
[]
zookeeperParamslist
=
conf
.
getStringArray
(
Constants
.
ZOOKEEPER_QUORUM
);
for
(
String
param
:
zookeeperParamslist
)
{
sb
.
append
(
param
).
append
(
Constants
.
COMMA
);
}
if
(
sb
.
length
()
>
0
){
sb
.
deleteCharAt
(
sb
.
length
()
-
1
);
}
// retry strategy
// retry strategy
RetryPolicy
retryPolicy
=
new
ExponentialBackoffRetry
(
RetryPolicy
retryPolicy
=
new
ExponentialBackoffRetry
(
...
@@ -105,7 +96,7 @@ public abstract class AbstractZKClient {
...
@@ -105,7 +96,7 @@ public abstract class AbstractZKClient {
try
{
try
{
// crate zookeeper client
// crate zookeeper client
zkClient
=
CuratorFrameworkFactory
.
builder
()
zkClient
=
CuratorFrameworkFactory
.
builder
()
.
connectString
(
sb
.
toString
())
.
connectString
(
getZookeeperQuorum
())
.
retryPolicy
(
retryPolicy
)
.
retryPolicy
(
retryPolicy
)
.
sessionTimeoutMs
(
1000
*
Integer
.
parseInt
(
conf
.
getString
(
Constants
.
ZOOKEEPER_SESSION_TIMEOUT
)))
.
sessionTimeoutMs
(
1000
*
Integer
.
parseInt
(
conf
.
getString
(
Constants
.
ZOOKEEPER_SESSION_TIMEOUT
)))
.
connectionTimeoutMs
(
1000
*
Integer
.
parseInt
(
conf
.
getString
(
Constants
.
ZOOKEEPER_CONNECTION_TIMEOUT
)))
.
connectionTimeoutMs
(
1000
*
Integer
.
parseInt
(
conf
.
getString
(
Constants
.
ZOOKEEPER_CONNECTION_TIMEOUT
)))
...
@@ -327,6 +318,24 @@ public abstract class AbstractZKClient {
...
@@ -327,6 +318,24 @@ public abstract class AbstractZKClient {
return
childrenList
.
size
();
return
childrenList
.
size
();
}
}
/**
*
* @return zookeeper quorum
*/
public
static
String
getZookeeperQuorum
(){
StringBuilder
sb
=
new
StringBuilder
();
String
[]
zookeeperParamslist
=
conf
.
getStringArray
(
Constants
.
ZOOKEEPER_QUORUM
);
for
(
String
param
:
zookeeperParamslist
)
{
sb
.
append
(
param
).
append
(
Constants
.
COMMA
);
}
if
(
sb
.
length
()
>
0
){
sb
.
deleteCharAt
(
sb
.
length
()
-
1
);
}
return
sb
.
toString
();
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"AbstractZKClient{"
+
return
"AbstractZKClient{"
+
...
...
escheduler-dao/src/main/java/cn/escheduler/dao/MonitorDBDao.java
浏览文件 @
a3d9d56f
...
@@ -45,7 +45,7 @@ public class MonitorDBDao {
...
@@ -45,7 +45,7 @@ public class MonitorDBDao {
static
{
static
{
try
{
try
{
conf
=
new
PropertiesConfiguration
(
Constants
.
D
ataSource_PROPERTIES_PATH
);
conf
=
new
PropertiesConfiguration
(
Constants
.
D
ATA_SOURCE_PROPERTIES
);
}
catch
(
ConfigurationException
e
){
}
catch
(
ConfigurationException
e
){
logger
.
error
(
"load configuration excetpion"
,
e
);
logger
.
error
(
"load configuration excetpion"
,
e
);
System
.
exit
(
1
);
System
.
exit
(
1
);
...
...
escheduler-dao/src/main/java/cn/escheduler/dao/TaskRecordDao.java
浏览文件 @
a3d9d56f
...
@@ -46,7 +46,7 @@ public class TaskRecordDao {
...
@@ -46,7 +46,7 @@ public class TaskRecordDao {
static
{
static
{
try
{
try
{
conf
=
new
PropertiesConfiguration
(
Constants
.
TASK_RECORD_PROPERTIES_PATH
);
conf
=
new
PropertiesConfiguration
(
Constants
.
DATA_SOURCE_PROPERTIES
);
}
catch
(
ConfigurationException
e
){
}
catch
(
ConfigurationException
e
){
logger
.
error
(
"load configuration excetpion"
,
e
);
logger
.
error
(
"load configuration excetpion"
,
e
);
System
.
exit
(
1
);
System
.
exit
(
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录