Browse Source

[Improvement-5785][common] Fix code format (#6864)

* [DS-5785][style] Fix common module code format

* [DS-5785][style] Fix common module code format
3.0.0/version-upgrade
lvshaokang 3 years ago committed by GitHub
parent
commit
1a88b1863b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertStatus.java
  2. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertType.java
  3. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AuthorizationType.java
  4. 6
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/CommandType.java
  5. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/CycleEnum.java
  6. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DataType.java
  7. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependResult.java
  8. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependentRelation.java
  9. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/Direct.java
  10. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/FailureStrategy.java
  11. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/Flag.java
  12. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/HttpCheckCondition.java
  13. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/HttpMethod.java
  14. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/HttpParametersType.java
  15. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/NodeType.java
  16. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/Priority.java
  17. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ProgramType.java
  18. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ReleaseState.java
  19. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ResUploadType.java
  20. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/RunMode.java
  21. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/SparkVersion.java
  22. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/SqoopJobType.java
  23. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskDependType.java
  24. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskRecordStatus.java
  25. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskStateType.java
  26. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskTimeoutStrategy.java
  27. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskType.java
  28. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/UdfType.java
  29. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/UserType.java
  30. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/WarningType.java
  31. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/graph/DAG.java
  32. 10
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/DateInterval.java
  33. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/DependentTaskModel.java
  34. 4
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/Server.java
  35. 10
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/TaskNodeRelation.java
  36. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/WorkerServerModel.java
  37. 18
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/HttpProperty.java
  38. 11
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/ProcessDag.java
  39. 22
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/Property.java
  40. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/ResourceInfo.java
  41. 26
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/shell/AbstractShell.java
  42. 3
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/shell/ShellExecutor.java
  43. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/AbstractParameters.java
  44. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/IParameters.java
  45. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/TaskTimeoutParameter.java
  46. 3
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/dependent/DependentParameters.java
  47. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/mr/MapReduceParameters.java
  48. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/python/PythonParameters.java
  49. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sql/SqlBinds.java
  50. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sql/SqlType.java
  51. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/SqoopParameters.java
  52. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/sources/SourceHdfsParameter.java
  53. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/sources/SourceHiveParameter.java
  54. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/sources/SourceMysqlParameter.java
  55. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/targets/TargetHdfsParameter.java
  56. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/targets/TargetHiveParameter.java
  57. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/targets/TargetMysqlParameter.java
  58. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/subprocess/SubProcessParameters.java
  59. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/thread/Stopper.java
  60. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/thread/ThreadUtils.java
  61. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DependentUtils.java
  62. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
  63. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
  64. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/ScriptRunner.java
  65. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/TriFunction.java

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertStatus.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
@ -29,7 +30,6 @@ public enum AlertStatus {
EXECUTION_SUCCESS(1, "execute successfully"),
EXECUTION_FAILURE(2, "execute failed");
AlertStatus(int code, String descp) {
this.code = code;
this.descp = descp;

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
@ -28,7 +29,6 @@ public enum AlertType {
EMAIL(0, "email"),
SMS(1, "SMS");
AlertType(int code, String descp) {
this.code = code;
this.descp = descp;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AuthorizationType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

6
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/CommandType.java

@ -14,13 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
package org.apache.dolphinscheduler.common.enums;
import java.util.HashMap;
import java.util.Map;
import com.baomidou.mybatisplus.annotation.EnumValue;
/**
* command types
*/
@ -79,7 +80,6 @@ public enum CommandType {
}
}
public static CommandType of(Integer status) {
if (COMMAND_TYPE_MAP.containsKey(status)) {
return COMMAND_TYPE_MAP.get(status);

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/CycleEnum.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DataType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependResult.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependentRelation.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/Direct.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/FailureStrategy.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/Flag.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/HttpCheckCondition.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/HttpMethod.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/HttpParametersType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/NodeType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
public enum NodeType {

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/Priority.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ProgramType.java

@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
package org.apache.dolphinscheduler.common.enums;
/**
* support program types

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ReleaseState.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ResUploadType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/RunMode.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/SparkVersion.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/SqoopJobType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskDependType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskRecordStatus.java

@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
package org.apache.dolphinscheduler.common.enums;
/**
* task record status

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskStateType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskTimeoutStrategy.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/UdfType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/UserType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
@ -28,7 +29,6 @@ public enum UserType {
ADMIN_USER(0, "admin user"),
GENERAL_USER(1, "general user");
UserType(int code, String descp) {
this.code = code;
this.descp = descp;

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/WarningType.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
@ -33,7 +34,6 @@ public enum WarningType {
FAILURE(2, "failure"),
ALL(3, "all");
WarningType(int code, String descp) {
this.code = code;
this.descp = descp;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/graph/DAG.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.graph;
import org.apache.commons.collections4.CollectionUtils;

10
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/DateInterval.java

@ -14,13 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.model;
import com.fasterxml.jackson.annotation.JsonFormat;
package org.apache.dolphinscheduler.common.model;
import java.util.Date;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* date interval class
*/
@ -33,7 +34,6 @@ public class DateInterval {
public DateInterval(Date beginTime, Date endTime) {
this.startTime = beginTime;
this.endTime = endTime;
}
@Override
@ -44,8 +44,8 @@ public class DateInterval {
return true;
} else {
DateInterval that = (DateInterval) obj;
return startTime.equals(that.startTime) &&
endTime.equals(that.endTime);
return startTime.equals(that.startTime)
&& endTime.equals(that.endTime);
}
}

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/DependentTaskModel.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.model;
import org.apache.dolphinscheduler.common.enums.DependentRelation;

4
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/Server.java

@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.model;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/**
* server
*/

10
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/TaskNodeRelation.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.model;
import java.util.Objects;
@ -54,7 +55,6 @@ public class TaskNodeRelation {
this.endNode = endNode;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof TaskNodeRelation)) {
@ -66,10 +66,10 @@ public class TaskNodeRelation {
@Override
public String toString() {
return "TaskNodeRelation{" +
"startNode='" + startNode + '\'' +
", endNode='" + endNode + '\'' +
'}';
return "TaskNodeRelation{"
+ "startNode='" + startNode + '\''
+ ", endNode='" + endNode + '\''
+ '}';
}
@Override

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/WorkerServerModel.java

@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.model;
package org.apache.dolphinscheduler.common.model;
import java.util.Date;
import java.util.Set;

18
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/HttpProperty.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.process;
import org.apache.dolphinscheduler.common.enums.HttpParametersType;
@ -102,11 +103,10 @@ public class HttpProperty {
return false;
}
HttpProperty property = (HttpProperty) o;
return Objects.equals(prop, property.prop) &&
Objects.equals(value, property.value);
return Objects.equals(prop, property.prop)
&& Objects.equals(value, property.value);
}
@Override
public int hashCode() {
return Objects.hash(prop, value);
@ -114,12 +114,10 @@ public class HttpProperty {
@Override
public String toString() {
return "HttpProperty{" +
"prop='" + prop + '\'' +
", httpParametersType=" + httpParametersType +
", value='" + value + '\'' +
'}';
return "HttpProperty{"
+ "prop='" + prop + '\''
+ ", httpParametersType=" + httpParametersType
+ ", value='" + value + '\''
+ '}';
}
}

11
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/ProcessDag.java

@ -14,9 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.process;
package org.apache.dolphinscheduler.common.process;
import org.apache.dolphinscheduler.common.model.TaskNode;
import org.apache.dolphinscheduler.common.model.TaskNodeRelation;
@ -77,9 +76,9 @@ public class ProcessDag {
@Override
public String toString() {
return "ProcessDag{" +
"edges=" + edges +
", nodes=" + nodes +
'}';
return "ProcessDag{"
+ "edges=" + edges
+ ", nodes=" + nodes
+ '}';
}
}

22
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/Property.java

@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.process;
package org.apache.dolphinscheduler.common.process;
import org.apache.dolphinscheduler.common.enums.DataType;
import org.apache.dolphinscheduler.common.enums.Direct;
@ -94,7 +94,6 @@ public class Property implements Serializable {
this.value = value;
}
public Direct getDirect() {
return direct;
}
@ -120,11 +119,10 @@ public class Property implements Serializable {
return false;
}
Property property = (Property) o;
return Objects.equals(prop, property.prop) &&
Objects.equals(value, property.value);
return Objects.equals(prop, property.prop)
&& Objects.equals(value, property.value);
}
@Override
public int hashCode() {
return Objects.hash(prop, value);
@ -132,13 +130,11 @@ public class Property implements Serializable {
@Override
public String toString() {
return "Property{" +
"prop='" + prop + '\'' +
", direct=" + direct +
", type=" + type +
", value='" + value + '\'' +
'}';
return "Property{"
+ "prop='" + prop + '\''
+ ", direct=" + direct
+ ", type=" + type
+ ", value='" + value + '\''
+ '}';
}
}

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/ResourceInfo.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.process;
/**

26
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/shell/AbstractShell.java

@ -14,8 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.shell;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
@ -27,10 +31,6 @@ import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* A base class for running a Unix command.
*
@ -93,8 +93,6 @@ public abstract class AbstractShell {
this.lastTime = (interval < 0) ? 0 : -interval;
}
/**
* set the environment for the command
* @param env Mapping of environment variables
@ -124,7 +122,6 @@ public abstract class AbstractShell {
runCommand();
}
/**
* Run a command actual work
*/
@ -147,8 +144,7 @@ public abstract class AbstractShell {
if (timeOutInterval > 0) {
timeOutTimer = new Timer();
timeoutTimerTask = new ShellTimeoutTimerTask(
this);
timeoutTimerTask = new ShellTimeoutTimerTask(this);
//One time scheduling.
timeOutTimer.schedule(timeoutTimerTask, timeOutInterval);
}
@ -191,7 +187,9 @@ public abstract class AbstractShell {
try {
errThread.start();
inThread.start();
} catch (IllegalStateException ise) { }
} catch (IllegalStateException ise) {
logger.warn("Illegal while starting the error and in thread", ise);
}
try {
// parse the output
exitCode = process.waitFor();
@ -245,8 +243,7 @@ public abstract class AbstractShell {
* @param lines lines
* @throws IOException errors
*/
protected abstract void parseExecResult(BufferedReader lines)
throws IOException;
protected abstract void parseExecResult(BufferedReader lines) throws IOException;
/**
* get the current sub-process executing the given command
@ -271,8 +268,6 @@ public abstract class AbstractShell {
this.timedOut.set(true);
}
/**
* Timer which is used to timeout scripts spawned off by shell.
*/
@ -323,9 +318,11 @@ public abstract class AbstractShell {
*/
public static class ProcessContainer extends ConcurrentHashMap<Integer, Process> {
private static final ProcessContainer container = new ProcessContainer();
private ProcessContainer() {
super();
}
public static final ProcessContainer getInstance() {
return container;
}
@ -333,6 +330,7 @@ public abstract class AbstractShell {
public static void putProcess(Process process) {
getInstance().put(process.hashCode(), process);
}
public static int processSize() {
return getInstance().size();
}

3
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/shell/ShellExecutor.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.shell;
import java.io.BufferedReader;
@ -34,7 +35,6 @@ public class ShellExecutor extends AbstractShell {
private String[] command;
private StringBuffer output;
public ShellExecutor(String... execString) {
this(execString, null);
}
@ -74,7 +74,6 @@ public class ShellExecutor extends AbstractShell {
timeOutInterval = timeout;
}
/**
* Static method to execute a shell command.
* Covers most of the simple cases without requiring the user to implement

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/AbstractParameters.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task;
import org.apache.dolphinscheduler.common.enums.Direct;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/IParameters.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task;
import org.apache.dolphinscheduler.common.process.ResourceInfo;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/TaskTimeoutParameter.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task;
import org.apache.dolphinscheduler.common.enums.TaskTimeoutStrategy;

3
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/dependent/DependentParameters.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.dependent;
import org.apache.dolphinscheduler.common.enums.DependentRelation;
@ -29,8 +30,6 @@ public class DependentParameters extends AbstractParameters {
private List<DependentTaskModel> dependTaskList;
private DependentRelation relation;
@Override
public boolean checkParameters() {
return true;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/mr/MapReduceParameters.java

@ -70,7 +70,6 @@ public class MapReduceParameters extends AbstractParameters {
*/
private ProgramType programType;
public String getMainClass() {
return mainClass;
}

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/python/PythonParameters.java

@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.python;
package org.apache.dolphinscheduler.common.task.python;
import org.apache.dolphinscheduler.common.process.ResourceInfo;
import org.apache.dolphinscheduler.common.task.AbstractParameters;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sql/SqlBinds.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.sql;
import org.apache.dolphinscheduler.common.process.Property;

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sql/SqlType.java

@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.sql;
package org.apache.dolphinscheduler.common.task.sql;
public enum SqlType {
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/SqoopParameters.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.sqoop;
import org.apache.dolphinscheduler.common.enums.SqoopJobType;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/sources/SourceHdfsParameter.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.sqoop.sources;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/sources/SourceHiveParameter.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.sqoop.sources;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/sources/SourceMysqlParameter.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.sqoop.sources;
import org.apache.dolphinscheduler.common.process.Property;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/targets/TargetHdfsParameter.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.sqoop.targets;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/targets/TargetHiveParameter.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.sqoop.targets;
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/sqoop/targets/TargetMysqlParameter.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.sqoop.targets;
/**

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/subprocess/SubProcessParameters.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.task.subprocess;
import org.apache.dolphinscheduler.common.process.ResourceInfo;
@ -22,7 +23,6 @@ import org.apache.dolphinscheduler.common.task.AbstractParameters;
import java.util.ArrayList;
import java.util.List;
public class SubProcessParameters extends AbstractParameters {
/**

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/thread/Stopper.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.thread;
import java.util.concurrent.atomic.AtomicBoolean;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/thread/ThreadUtils.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.thread;
import java.util.concurrent.ExecutorService;

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DependentUtils.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.utils;
import org.apache.dolphinscheduler.common.enums.DependResult;
@ -60,7 +61,6 @@ public class DependentUtils {
return dependResult;
}
/**
* get date interval list by business date and date value.
*

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java

@ -22,8 +22,8 @@ import static org.apache.dolphinscheduler.common.Constants.RESOURCE_UPLOAD_PATH;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.common.enums.ResUploadType;
import org.apache.dolphinscheduler.spi.enums.ResourceType;
import org.apache.dolphinscheduler.common.exception.BaseException;
import org.apache.dolphinscheduler.spi.enums.ResourceType;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java

@ -35,7 +35,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.StringTokenizer;
import java.util.regex.Pattern;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/ScriptRunner.java

@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.utils;
import java.io.IOException;

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/TriFunction.java

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.utils;
/**

Loading…
Cancel
Save