Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DolphinScheduler社区
DolphinScheduler
提交
677e9cfd
DolphinScheduler
项目概览
DolphinScheduler社区
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
67
Star
1
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,体验更适合开发者的 AI 搜索 >>
提交
677e9cfd
编写于
12月 31, 2019
作者:
T
Tboy
提交者:
qiaozhanwei
12月 31, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove commons-lang3 dependancy (#1655)
上级
ced4b10c
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
170 addition
and
31 deletion
+170
-31
dolphinscheduler-common/pom.xml
dolphinscheduler-common/pom.xml
+0
-5
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/ClickHouseDataSource.java
.../dolphinscheduler/common/job/db/ClickHouseDataSource.java
+1
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/DB2ServerDataSource.java
...e/dolphinscheduler/common/job/db/DB2ServerDataSource.java
+1
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/HiveDataSource.java
...apache/dolphinscheduler/common/job/db/HiveDataSource.java
+1
-6
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/MySQLDataSource.java
...pache/dolphinscheduler/common/job/db/MySQLDataSource.java
+1
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/OracleDataSource.java
...ache/dolphinscheduler/common/job/db/OracleDataSource.java
+1
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/PostgreDataSource.java
...che/dolphinscheduler/common/job/db/PostgreDataSource.java
+1
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/SQLServerDataSource.java
...e/dolphinscheduler/common/job/db/SQLServerDataSource.java
+1
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/SparkDataSource.java
...pache/dolphinscheduler/common/job/db/SparkDataSource.java
+1
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/TaskNode.java
...va/org/apache/dolphinscheduler/common/model/TaskNode.java
+1
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/CommonUtils.java
...org/apache/dolphinscheduler/common/utils/CommonUtils.java
+0
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/EncryptionUtils.java
...apache/dolphinscheduler/common/utils/EncryptionUtils.java
+0
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/EnumUtils.java
...a/org/apache/dolphinscheduler/common/utils/EnumUtils.java
+33
-0
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
...org/apache/dolphinscheduler/common/utils/HadoopUtils.java
+0
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
...ava/org/apache/dolphinscheduler/common/utils/OSUtils.java
+2
-4
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/SchemaUtils.java
...org/apache/dolphinscheduler/common/utils/SchemaUtils.java
+0
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/StringUtils.java
...org/apache/dolphinscheduler/common/utils/StringUtils.java
+125
-0
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/TaskParametersUtils.java
...he/dolphinscheduler/common/utils/TaskParametersUtils.java
+0
-1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/zk/AbstractZKClient.java
...g/apache/dolphinscheduler/common/zk/AbstractZKClient.java
+1
-1
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/EncryptionUtilsTest.java
...he/dolphinscheduler/common/utils/EncryptionUtilsTest.java
+0
-2
未找到文件。
dolphinscheduler-common/pom.xml
浏览文件 @
677e9cfd
...
...
@@ -330,11 +330,6 @@
</exclusions>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
<dependency>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/ClickHouseDataSource.java
浏览文件 @
677e9cfd
...
...
@@ -16,7 +16,7 @@
*/
package
org.apache.dolphinscheduler.common.job.db
;
import
org.apache.
commons.lang3
.StringUtils
;
import
org.apache.
dolphinscheduler.common.utils
.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/DB2ServerDataSource.java
浏览文件 @
677e9cfd
...
...
@@ -16,8 +16,8 @@
*/
package
org.apache.dolphinscheduler.common.job.db
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.dolphinscheduler.common.Constants
;
import
org.apache.dolphinscheduler.common.utils.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/HiveDataSource.java
浏览文件 @
677e9cfd
...
...
@@ -16,7 +16,7 @@
*/
package
org.apache.dolphinscheduler.common.job.db
;
import
org.apache.
commons.lang3
.StringUtils
;
import
org.apache.
dolphinscheduler.common.utils
.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -29,9 +29,6 @@ public class HiveDataSource extends BaseDataSource {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
HiveDataSource
.
class
);
/**
* gets the JDBC url for the data source connection
* @return
...
...
@@ -49,8 +46,6 @@ public class HiveDataSource extends BaseDataSource {
jdbcUrl
+=
";principal="
+
getPrincipal
();
}
if
(
StringUtils
.
isNotEmpty
(
getOther
()))
{
jdbcUrl
+=
";"
+
getOther
();
}
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/MySQLDataSource.java
浏览文件 @
677e9cfd
...
...
@@ -16,7 +16,7 @@
*/
package
org.apache.dolphinscheduler.common.job.db
;
import
org.apache.
commons.lang3
.StringUtils
;
import
org.apache.
dolphinscheduler.common.utils
.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/OracleDataSource.java
浏览文件 @
677e9cfd
...
...
@@ -16,7 +16,7 @@
*/
package
org.apache.dolphinscheduler.common.job.db
;
import
org.apache.
commons.lang3
.StringUtils
;
import
org.apache.
dolphinscheduler.common.utils
.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/PostgreDataSource.java
浏览文件 @
677e9cfd
...
...
@@ -16,7 +16,7 @@
*/
package
org.apache.dolphinscheduler.common.job.db
;
import
org.apache.
commons.lang3
.StringUtils
;
import
org.apache.
dolphinscheduler.common.utils
.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/SQLServerDataSource.java
浏览文件 @
677e9cfd
...
...
@@ -16,7 +16,7 @@
*/
package
org.apache.dolphinscheduler.common.job.db
;
import
org.apache.
commons.lang3
.StringUtils
;
import
org.apache.
dolphinscheduler.common.utils
.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/SparkDataSource.java
浏览文件 @
677e9cfd
...
...
@@ -16,7 +16,7 @@
*/
package
org.apache.dolphinscheduler.common.job.db
;
import
org.apache.
commons.lang3
.StringUtils
;
import
org.apache.
dolphinscheduler.common.utils
.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/TaskNode.java
浏览文件 @
677e9cfd
...
...
@@ -26,7 +26,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
org.apache.
commons.lang3
.StringUtils
;
import
org.apache.
dolphinscheduler.common.utils
.StringUtils
;
import
java.io.IOException
;
import
java.util.List
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/CommonUtils.java
浏览文件 @
677e9cfd
...
...
@@ -18,7 +18,6 @@ package org.apache.dolphinscheduler.common.utils;
import
org.apache.dolphinscheduler.common.Constants
;
import
org.apache.dolphinscheduler.common.enums.ResUploadType
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.hadoop.conf.Configuration
;
import
org.apache.hadoop.security.UserGroupInformation
;
import
org.slf4j.Logger
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/EncryptionUtils.java
浏览文件 @
677e9cfd
...
...
@@ -17,7 +17,6 @@
package
org.apache.dolphinscheduler.common.utils
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.apache.commons.lang3.StringUtils
;
/**
* encryption utils
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/EnumUtils.java
0 → 100644
浏览文件 @
677e9cfd
/*
* 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.
*/
package
org.apache.dolphinscheduler.common.utils
;
public
class
EnumUtils
{
public
static
<
E
extends
Enum
<
E
>>
E
getEnum
(
final
Class
<
E
>
enumClass
,
final
String
enumName
)
{
if
(
enumName
==
null
)
{
return
null
;
}
try
{
return
Enum
.
valueOf
(
enumClass
,
enumName
);
}
catch
(
final
IllegalArgumentException
ex
)
{
return
null
;
}
}
}
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
浏览文件 @
677e9cfd
...
...
@@ -23,7 +23,6 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONException
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.hadoop.conf.Configuration
;
import
org.apache.hadoop.fs.*
;
import
org.apache.hadoop.fs.FileSystem
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
浏览文件 @
677e9cfd
...
...
@@ -19,7 +19,6 @@ package org.apache.dolphinscheduler.common.utils;
import
org.apache.dolphinscheduler.common.Constants
;
import
org.apache.dolphinscheduler.common.shell.ShellExecutor
;
import
org.apache.commons.configuration.Configuration
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
oshi.SystemInfo
;
...
...
@@ -180,7 +179,7 @@ public class OSUtils {
private
static
List
<
String
>
getUserListFromMac
()
throws
IOException
{
String
result
=
exeCmd
(
"dscl . list /users"
);
if
(
StringUtils
.
isNotEmpty
(
result
))
{
return
Arrays
.
asList
(
StringUtils
.
split
(
result
,
"\n"
));
return
Arrays
.
asList
(
result
.
split
(
"\n"
));
}
return
Collections
.
emptyList
();
...
...
@@ -251,9 +250,8 @@ public class OSUtils {
*/
public
static
String
getGroup
()
throws
IOException
{
String
result
=
exeCmd
(
"groups"
);
if
(
StringUtils
.
isNotEmpty
(
result
))
{
String
[]
groupInfo
=
StringUtils
.
split
(
result
);
String
[]
groupInfo
=
result
.
split
(
" "
);
return
groupInfo
[
0
];
}
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/SchemaUtils.java
浏览文件 @
677e9cfd
...
...
@@ -16,7 +16,6 @@
*/
package
org.apache.dolphinscheduler.common.utils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/StringUtils.java
0 → 100644
浏览文件 @
677e9cfd
/*
* 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.
*/
package
org.apache.dolphinscheduler.common.utils
;
import
java.nio.charset.StandardCharsets
;
import
java.util.regex.Pattern
;
public
class
StringUtils
{
public
static
final
int
INDEX_NOT_FOUND
=
-
1
;
public
static
final
String
EMPTY
=
""
;
public
static
boolean
isEmpty
(
final
CharSequence
cs
)
{
return
cs
==
null
||
cs
.
length
()
==
0
;
}
public
static
boolean
isNotEmpty
(
final
CharSequence
cs
)
{
return
!
isEmpty
(
cs
);
}
public
static
boolean
isBlank
(
CharSequence
cs
){
int
strLen
;
if
(
cs
==
null
||
(
strLen
=
cs
.
length
())
==
0
)
{
return
true
;
}
for
(
int
i
=
0
;
i
<
strLen
;
i
++)
{
if
(
Character
.
isWhitespace
(
cs
.
charAt
(
i
))
==
false
)
{
return
false
;
}
}
return
true
;
}
public
static
boolean
isNotBlank
(
CharSequence
str
){
return
!
isBlank
(
str
);
}
public
static
String
substringBefore
(
final
String
str
,
final
String
separator
)
{
if
(
isBlank
(
str
)
||
separator
==
null
)
{
return
str
;
}
if
(
separator
.
isEmpty
())
{
return
EMPTY
;
}
final
int
pos
=
str
.
indexOf
(
separator
);
if
(
pos
==
INDEX_NOT_FOUND
)
{
return
str
;
}
return
str
.
substring
(
0
,
pos
);
}
public
static
String
substringAfter
(
final
String
str
,
final
String
separator
)
{
if
(
isBlank
(
str
))
{
return
str
;
}
if
(
separator
==
null
)
{
return
EMPTY
;
}
final
int
pos
=
str
.
indexOf
(
separator
);
if
(
pos
==
INDEX_NOT_FOUND
)
{
return
EMPTY
;
}
return
str
.
substring
(
pos
+
separator
.
length
());
}
public
static
String
substringAfterLast
(
final
String
str
,
final
String
separator
)
{
if
(
isEmpty
(
str
))
{
return
str
;
}
if
(
isEmpty
(
separator
))
{
return
EMPTY
;
}
final
int
pos
=
str
.
lastIndexOf
(
separator
);
if
(
pos
==
INDEX_NOT_FOUND
||
pos
==
str
.
length
()
-
separator
.
length
())
{
return
EMPTY
;
}
return
str
.
substring
(
pos
+
separator
.
length
());
}
public
static
String
getUtf8String
(
byte
[]
bytes
){
return
new
String
(
bytes
,
StandardCharsets
.
UTF_8
);
}
public
static
byte
[]
getUtf8Bytes
(
String
str
){
return
str
.
getBytes
(
StandardCharsets
.
UTF_8
);
}
public
static
boolean
hasChinese
(
String
str
)
{
if
(
str
==
null
)
{
return
false
;
}
Pattern
pattern
=
Pattern
.
compile
(
"[\\u4E00-\\u9FBF]+"
);
return
pattern
.
matcher
(
str
).
find
();
}
public
static
boolean
hasSpace
(
String
str
)
{
if
(
str
==
null
)
{
return
false
;
}
int
len
=
str
.
length
();
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
if
(
str
.
charAt
(
i
)
==
' '
)
{
return
true
;
}
}
return
false
;
}
}
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/TaskParametersUtils.java
浏览文件 @
677e9cfd
...
...
@@ -28,7 +28,6 @@ import org.apache.dolphinscheduler.common.task.shell.ShellParameters;
import
org.apache.dolphinscheduler.common.task.spark.SparkParameters
;
import
org.apache.dolphinscheduler.common.task.sql.SqlParameters
;
import
org.apache.dolphinscheduler.common.task.subprocess.SubProcessParameters
;
import
org.apache.commons.lang3.EnumUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/zk/AbstractZKClient.java
浏览文件 @
677e9cfd
...
...
@@ -28,7 +28,6 @@ import java.util.Date;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.curator.framework.CuratorFramework
;
import
org.apache.curator.framework.imps.CuratorFrameworkState
;
import
org.apache.curator.framework.recipes.locks.InterProcessMutex
;
...
...
@@ -39,6 +38,7 @@ import org.apache.dolphinscheduler.common.model.Server;
import
org.apache.dolphinscheduler.common.utils.DateUtils
;
import
org.apache.dolphinscheduler.common.utils.OSUtils
;
import
org.apache.dolphinscheduler.common.utils.ResInfo
;
import
org.apache.dolphinscheduler.common.utils.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/EncryptionUtilsTest.java
浏览文件 @
677e9cfd
...
...
@@ -16,8 +16,6 @@
*/
package
org.apache.dolphinscheduler.common.utils
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.junit.Assert
;
import
org.junit.Test
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录