diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/ServiceModelToSwagger2MapperImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/ServiceModelToSwagger2MapperImpl.java index 9821779ee4..c0ceb66323 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/ServiceModelToSwagger2MapperImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/ServiceModelToSwagger2MapperImpl.java @@ -281,229 +281,4 @@ public class ServiceModelToSwagger2MapperImpl extends ServiceModelToSwagger2Mapp return modelMapper.mapModels(definitions); } - - - - - -// -// -// -// private static final VendorExtensionsMapper vendorMapper = new VendorExtensionsMapper(); -// -// -// -// public Parameter mapParameter(springfox.documentation.service.Parameter source) { -// Parameter bodyParameter = bodyParameter(source); -// return SerializableParameterFactories.create(source).or(bodyParameter); -// } -// -// private Parameter bodyParameter(springfox.documentation.service.Parameter source) { -// BodyParameter parameter = new BodyParameter() -// .description(source.getDescription()) -// .name(source.getName()) -// .schema(fromModelRef(source.getModelRef())); -// parameter.setIn(source.getParamType()); -// parameter.setAccess(source.getParamAccess()); -// parameter.setPattern(source.getPattern()); -// parameter.setRequired(source.isRequired()); -// parameter.getVendorExtensions().putAll(vendorMapper.mapExtensions(source.getVendorExtentions())); -// for (Map.Entry> each : source.getExamples().asMap().entrySet()) { -// Optional example = FluentIterable.from(each.getValue()).first(); -// if (example.isPresent() && example.get().getValue() != null) { -// parameter.addExample(each.getKey(), String.valueOf(example.get().getValue())); -// } -// } -// -// //TODO: swagger-core Body parameter does not have an enum property -// return parameter; -// } -// -// Model fromModelRef(ModelReference modelRef) { -// if (modelRef.isCollection()) { -// if (modelRef.getItemType().equals("byte")) { -// ModelImpl baseModel = new ModelImpl(); -// baseModel.setType("string"); -// baseModel.setFormat("byte"); -// return maybeAddAllowableValuesToParameter(baseModel, modelRef.getAllowableValues()); -// } else if (modelRef.getItemType().equals("file")) { -// ArrayModel files = new ArrayModel(); -// files.items(new FileProperty()); -// return files; -// } -// ModelReference itemModel = modelRef.itemModel().get(); -// return new ArrayModel() -// .items(maybeAddAllowableValues(itemTypeProperty(itemModel), itemModel.getAllowableValues())); -// } -// if (modelRef.isMap()) { -// ModelImpl baseModel = new ModelImpl(); -// ModelReference itemModel = modelRef.itemModel().get(); -// baseModel.additionalProperties( -// maybeAddAllowableValues( -// itemTypeProperty(itemModel), -// itemModel.getAllowableValues())); -// return baseModel; -// } -// if (isBaseType(modelRef.getType())) { -// Property property = property(modelRef.getType()); -// ModelImpl baseModel = new ModelImpl(); -// baseModel.setType(property.getType()); -// baseModel.setFormat(property.getFormat()); -// return maybeAddAllowableValuesToParameter(baseModel, modelRef.getAllowableValues()); -// -// } -// return new RefModel(modelRef.getType()); -// } -// -// -// private static class Properties { -// private static final Map> typeFactory -// = ImmutableMap.>builder() -// .put("int", newInstanceOf(IntegerProperty.class)) -// .put("long", newInstanceOf(LongProperty.class)) -// .put("float", newInstanceOf(FloatProperty.class)) -// .put("double", newInstanceOf(DoubleProperty.class)) -// .put("string", newInstanceOf(StringProperty.class)) -// .put("boolean", newInstanceOf(BooleanProperty.class)) -// .put("date", newInstanceOf(DateProperty.class)) -// .put("date-time", newInstanceOf(DateTimeProperty.class)) -// .put("bigdecimal", newInstanceOf(DecimalProperty.class)) -// .put("biginteger", newInstanceOf(BaseIntegerProperty.class)) -// .put("uuid", newInstanceOf(UUIDProperty.class)) -// .put("object", newInstanceOf(ObjectProperty.class)) -// .put("byte", bytePropertyFactory()) -// .put("__file", filePropertyFactory()) -// .build(); -// -// private Properties() { -// throw new UnsupportedOperationException(); -// } -// -// public static Property property(final String typeName) { -// String safeTypeName = nullToEmpty(typeName); -// Function> propertyLookup -// = forMap(typeFactory, voidOrRef(safeTypeName)); -// return propertyLookup.apply(safeTypeName.toLowerCase()).apply(safeTypeName); -// } -// -// public static Property property(final ModelReference modelRef) { -// if (modelRef.isMap()) { -// return new MapProperty(property(modelRef.itemModel().get())); -// } else if (modelRef.isCollection()) { -// if ("byte".equals(modelRef.itemModel().transform(toTypeName()).or(""))) { -// return new ByteArrayProperty(); -// } -// return new ArrayProperty( -// maybeAddAllowableValues(itemTypeProperty(modelRef.itemModel().get()), modelRef.getAllowableValues())); -// } -// return property(modelRef.getType()); -// } -// -// private static Function toTypeName() { -// return new Function() { -// @Override -// public String apply(ModelReference input) { -// return input.getType(); -// } -// }; -// } -// -// public static Property itemTypeProperty(ModelReference paramModel) { -// if (paramModel.isCollection()) { -// return new ArrayProperty( -// maybeAddAllowableValues(itemTypeProperty(paramModel.itemModel().get()), paramModel.getAllowableValues())); -// } -// return property(paramModel.getType()); -// } -// -// private static Function newInstanceOf(final Class clazz) { -// return new Function() { -// @Override -// public T apply(String input) { -// try { -// return clazz.newInstance(); -// } catch (Exception e) { -// //This is bad! should never come here -// throw new IllegalStateException(e); -// } -// } -// }; -// } -// -// static Ordering defaultOrdering(Map properties) { -// return Ordering.from(byPosition(properties)).compound(byName()); -// } -// -// private static Function voidOrRef(final String typeName) { -// return new Function() { -// @Override -// public Property apply(String input) { -// if (typeName.equalsIgnoreCase("void")) { -// return null; -// } -// return new RefProperty(typeName); -// } -// }; -// } -// -// private static Function bytePropertyFactory() { -// return new Function() { -// @Override -// public Property apply(String input) { -// final IntegerProperty integerProperty = new IntegerProperty(); -// integerProperty.setFormat("int32"); -// integerProperty.setMaximum(BigDecimal.valueOf(Byte.MAX_VALUE)); -// integerProperty.setMinimum(BigDecimal.valueOf(Byte.MIN_VALUE)); -// return integerProperty; -// } -// }; -// } -// -// private static Function filePropertyFactory() { -// return new Function() { -// @Override -// public Property apply(String input) { -// return new FileProperty(); -// } -// }; -// } -// -// private static Comparator byName() { -// return new Comparator() { -// @Override -// public int compare(String first, String second) { -// return first.compareTo(second); -// } -// }; -// } -// -// private static Comparator byPosition(final Map modelProperties) { -// return new Comparator() { -// @Override -// public int compare(String first, String second) { -// ModelProperty p1 = modelProperties.get(first); -// ModelProperty p2 = modelProperties.get(second); -// return Ints.compare(p1.getPosition(), p2.getPosition()); -// } -// }; -// } -// -// static Predicate> voidProperties() { -// return new Predicate>() { -// @Override -// public boolean apply(Map.Entry input) { -// return isVoid(input.getValue().getType()) -// || collectionOfVoid(input.getValue().getType()) -// || arrayTypeOfVoid(input.getValue().getType().getArrayElementType()); -// } -// }; -// } -// -// private static boolean arrayTypeOfVoid(ResolvedType arrayElementType) { -// return arrayElementType != null && isVoid(arrayElementType); -// } -// -// private static boolean collectionOfVoid(ResolvedType type) { -// return isContainerType(type) && isVoid(collectionElementType(type)); -// } } diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/DefineUserDto.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/DefineUserDto.java index 539dc71a5e..2f0167d003 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/DefineUserDto.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/DefineUserDto.java @@ -21,7 +21,7 @@ import org.apache.dolphinscheduler.dao.entity.DefinitionGroupByUser; import java.util.List; /** - * + * user process define dto */ public class DefineUserDto { diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/ScheduleParam.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/ScheduleParam.java index 538786e63d..a842960bc2 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/ScheduleParam.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/ScheduleParam.java @@ -20,7 +20,6 @@ import java.util.Date; /** * schedule parameters - * 调度参数 */ public class ScheduleParam { private Date startTime; diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/gantt/GanttDto.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/gantt/GanttDto.java index d6fa662bcd..ad2c49fe7f 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/gantt/GanttDto.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/gantt/GanttDto.java @@ -23,31 +23,26 @@ import java.util.Map; /** * gantt DTO - * 甘特图 DTO */ public class GanttDto { /** * height - * 高度 */ private int height; /** * tasks list - * 任务集合 */ private List tasks = new ArrayList<>(); /** * task name list - * 任务名称 */ private List taskNames; /** * task status map - * 任务状态 */ private Map taskStatus; diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/gantt/Task.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/gantt/Task.java index 848abdf5d6..55ead2872a 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/gantt/Task.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/gantt/Task.java @@ -22,53 +22,44 @@ import java.util.List; /** * Task - * 任务 */ public class Task { /** * task name - * 任务名称 */ private String taskName; /** * task start date - * 任务开始时间 */ private List startDate = new ArrayList<>(); /** * task end date - * 任务结束时间 */ private List endDate = new ArrayList<>(); /** * task execution date - * 任务执行时间 */ private Date executionDate; /** * task iso start - * 任务开始时间 */ private Date isoStart; /** * task iso end - * 任务结束时间 */ private Date isoEnd; /** * task status - * 执行状态 */ private String status; /** * task duration - * 运行时长 */ private String duration; diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/Instance.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/Instance.java index 5997f04906..10bfeb0790 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/Instance.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/Instance.java @@ -26,31 +26,26 @@ public class Instance { private int id; /** * node name - * 节点名称 */ private String name; /** * node type - * 节点类型 */ private String type; /** * node status - * 状态 */ private String state; /** * node start time - * 开始时间 */ private Date startTime; /** * node end time - * 结束时间 */ private Date endTime; @@ -58,13 +53,11 @@ public class Instance { /** * node running on which host - * 运行机器 */ private String host; /** * node duration - * 运行时长 */ private String duration; diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/TreeViewDto.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/TreeViewDto.java index 35be4d5ec7..e30eea849f 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/TreeViewDto.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/TreeViewDto.java @@ -53,7 +53,6 @@ public class TreeViewDto { /** * instances list - * 实例列表 */ private List instances = new ArrayList<>(); diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/ExecuteType.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/ExecuteType.java index 0af66ff5f0..cc1797295a 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/ExecuteType.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/ExecuteType.java @@ -23,8 +23,12 @@ public enum ExecuteType { /** - * 操作类型 - * 1.重跑 2.恢复暂停 3.恢复失败 4.停止 5.暂停 + * operation type + * 1 repeat running + * 2 resume pause + * 3 resume failure + * 4 stop + * 5 pause */ NONE,REPEAT_RUNNING, RECOVER_SUSPENDED_PROCESS, START_FAILURE_TASK_PROCESS, STOP, PAUSE; @@ -35,6 +39,6 @@ public enum ExecuteType { return e; } } - return null;//For values out of enum scope + return null; } } diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java index da5e1409d2..2677c58033 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java @@ -27,9 +27,7 @@ public enum Status { TASK_TIMEOUT_PARAMS_ERROR(10002, "task timeout parameter is not valid"), USER_NAME_EXIST(10003, "user name already exists"), USER_NAME_NULL(10004,"user name is null"), -// DB_OPERATION_ERROR(10005, "database operation error"), HDFS_OPERATION_ERROR(10006, "hdfs operation error"), - UPDATE_FAILED(10007, "updateProcessInstance failed"), TASK_INSTANCE_NOT_FOUND(10008, "task instance not found"), TENANT_NAME_EXIST(10009, "tenant code already exists"), USER_NOT_EXIST(10010, "user {0} not exists"), @@ -176,7 +174,6 @@ public enum Status { UDF_FUNCTION_NOT_EXIST(20001, "UDF function not found"), UDF_FUNCTION_EXISTS(20002, "UDF function already exists"), -// RESOURCE_EMPTY(20003, "resource file is empty"), RESOURCE_NOT_EXIST(20004, "resource not exist"), RESOURCE_EXIST(20005, "resource already exists"), RESOURCE_SUFFIX_NOT_SUPPORT_VIEW(20006, "resource suffix do not support online viewing"), diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/DruidStatFilter.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/DruidStatFilter.java deleted file mode 100644 index feb725a97c..0000000000 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/DruidStatFilter.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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.api.interceptor; - -import com.alibaba.druid.support.http.WebStatFilter; - -/* this class annotation for druid stat monitor in development -@WebFilter(filterName="druidWebStatFilter",urlPatterns="/*", - initParams={ - @WebInitParam(name="exclusions",value="*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*") - }) */ -public class DruidStatFilter extends WebStatFilter { - - -} \ No newline at end of file diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/DruidStatViewServlet.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/DruidStatViewServlet.java deleted file mode 100644 index 0fa1ff6a32..0000000000 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/DruidStatViewServlet.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.api.interceptor; - -import com.alibaba.druid.support.http.StatViewServlet; - - -/* this class annotation for druid stat monitor in development -@WebServlet(urlPatterns = "/druid/*", - initParams={ -// @WebInitParam(name="allow",value="127.0.0.1"), -// @WebInitParam(name="deny",value="192.168.16.111"), - @WebInitParam(name="loginUsername",value="admin"), - @WebInitParam(name="loginPassword",value="dolphinscheduler123"), - @WebInitParam(name="resetEnable",value="true") - }) */ -public class DruidStatViewServlet extends StatViewServlet { - - -} diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/Result.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/Result.java index 9fc26c5246..2c3d9c36bd 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/Result.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/Result.java @@ -24,13 +24,11 @@ package org.apache.dolphinscheduler.api.utils; public class Result { /** * status - * 状态码 */ private Integer code; /** * message - * 消息 */ private String msg; diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java index f10bbcae3d..e94d52e30c 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java @@ -23,7 +23,7 @@ import org.slf4j.LoggerFactory; import java.util.Scanner; /** - * zookeeper状态监控:4字口诀 + * zookeeper state monitor * */ public class ZooKeeperState {