Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
DolphinScheduler
提交
518d03b6
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 搜索 >>
未验证
提交
518d03b6
编写于
6月 21, 2020
作者:
C
CalvinKirs
提交者:
GitHub
6月 21, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Simplify some methods for easy understanding (#2920)
Co-authored-by:
N
gabry.wu
<
8545796+gabrywu@users.noreply.github.com
>
上级
45785dba
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
16 deletion
+9
-16
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DependentUtils.java
.../apache/dolphinscheduler/common/utils/DependentUtils.java
+1
-3
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/IpUtils.java
...ava/org/apache/dolphinscheduler/common/utils/IpUtils.java
+5
-6
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/SchemaUtils.java
...org/apache/dolphinscheduler/common/utils/SchemaUtils.java
+3
-7
未找到文件。
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DependentUtils.java
浏览文件 @
518d03b6
...
...
@@ -40,10 +40,8 @@ public class DependentUtils {
case
AND:
if
(
dependResultList
.
contains
(
DependResult
.
FAILED
)){
dependResult
=
DependResult
.
FAILED
;
}
else
if
(
dependResultList
.
contains
(
DependResult
.
WAITING
)){
}
if
(
dependResultList
.
contains
(
DependResult
.
WAITING
)){
dependResult
=
DependResult
.
WAITING
;
}
else
{
dependResult
=
DependResult
.
SUCCESS
;
}
break
;
case
OR:
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/IpUtils.java
浏览文件 @
518d03b6
...
...
@@ -49,12 +49,11 @@ public class IpUtils {
ipNumbers
[
2
]
=
ipLong
>>
8
&
tmp
;
ipNumbers
[
3
]
=
ipLong
&
tmp
;
StringBuilder
sb
=
new
StringBuilder
(
16
);
sb
.
append
(
ipNumbers
[
0
]).
append
(
DOT
)
.
append
(
ipNumbers
[
1
]).
append
(
DOT
)
.
append
(
ipNumbers
[
2
]).
append
(
DOT
)
.
append
(
ipNumbers
[
3
]);
return
sb
.
toString
();
String
sb
=
ipNumbers
[
0
]
+
DOT
+
ipNumbers
[
1
]
+
DOT
+
ipNumbers
[
2
]
+
DOT
+
ipNumbers
[
3
];
return
sb
;
}
}
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/SchemaUtils.java
浏览文件 @
518d03b6
...
...
@@ -22,7 +22,6 @@ import org.slf4j.LoggerFactory;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
...
...
@@ -96,11 +95,11 @@ public class SchemaUtils {
String
[]
schemaVersionArr
=
schemaVersion
.
split
(
"\\."
);
String
[]
versionArr
=
version
.
split
(
"\\."
);
int
arrLength
=
schemaVersionArr
.
length
<
versionArr
.
length
?
schemaVersionArr
.
length
:
versionArr
.
length
;
int
arrLength
=
Math
.
min
(
schemaVersionArr
.
length
,
versionArr
.
length
)
;
for
(
int
i
=
0
;
i
<
arrLength
;
i
++)
{
if
(
Integer
.
valueOf
(
schemaVersionArr
[
i
])
>
Integer
.
valueOf
(
versionArr
[
i
]))
{
if
(
Integer
.
parseInt
(
schemaVersionArr
[
i
])
>
Integer
.
parseInt
(
versionArr
[
i
]))
{
return
true
;
}
else
if
(
Integer
.
valueOf
(
schemaVersionArr
[
i
])
<
Integer
.
valueOf
(
versionArr
[
i
]))
{
}
else
if
(
Integer
.
parseInt
(
schemaVersionArr
[
i
])
<
Integer
.
parseInt
(
versionArr
[
i
]))
{
return
false
;
}
}
...
...
@@ -121,9 +120,6 @@ public class SchemaUtils {
}
catch
(
FileNotFoundException
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
throw
new
RuntimeException
(
"Failed to get the product version description file. The file could not be found"
,
e
);
}
catch
(
IOException
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
throw
new
RuntimeException
(
"Failed to get product version number description file, failed to read the file"
,
e
);
}
return
soft_version
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录