status
stringclasses 1
value | repo_name
stringclasses 31
values | repo_url
stringclasses 31
values | issue_id
int64 1
104k
| title
stringlengths 4
233
| body
stringlengths 0
186k
⌀ | issue_url
stringlengths 38
56
| pull_url
stringlengths 37
54
| before_fix_sha
stringlengths 40
40
| after_fix_sha
stringlengths 40
40
| report_datetime
timestamp[us, tz=UTC] | language
stringclasses 5
values | commit_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 7
188
| chunk_content
stringlengths 1
1.03M
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,221 | [Improvement] [alert-server] AlertSender optimization and gracefully close, such as MasterServer | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
In alert-server, I have two suggestions
- I think sending alert messages should go out to class of `AlertServer` independently, that it is mainly responsible for the send alert, we can define as `AlertSenderService`
- I think class of `AlertServer` should implements interface of `IStoppable`, and have gracefully close, such as MasterServer or WorkerServer
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9221 | https://github.com/apache/dolphinscheduler/pull/9246 | ab0357027d4a06aa26df6bf2345e429d9b9b6c5c | ca95d2f9282fd234d954194bab40a5bfc713c433 | 2022-03-27T11:01:48Z | java | 2022-04-08T02:02:10Z | dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/alert/AlertSendRequestCommand.java | /*
* 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.remote.command.alert;
import org.apache.dolphinscheduler.remote.command.Command;
import org.apache.dolphinscheduler.remote.command.CommandType;
import org.apache.dolphinscheduler.remote.utils.JsonSerializer;
import java.io.Serializable;
public class AlertSendRequestCommand implements Serializable { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,221 | [Improvement] [alert-server] AlertSender optimization and gracefully close, such as MasterServer | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
In alert-server, I have two suggestions
- I think sending alert messages should go out to class of `AlertServer` independently, that it is mainly responsible for the send alert, we can define as `AlertSenderService`
- I think class of `AlertServer` should implements interface of `IStoppable`, and have gracefully close, such as MasterServer or WorkerServer
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9221 | https://github.com/apache/dolphinscheduler/pull/9246 | ab0357027d4a06aa26df6bf2345e429d9b9b6c5c | ca95d2f9282fd234d954194bab40a5bfc713c433 | 2022-03-27T11:01:48Z | java | 2022-04-08T02:02:10Z | dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/alert/AlertSendRequestCommand.java | private int groupId;
private String title;
private String content;
private int warnType;
public int getGroupId() {
return groupId;
}
public void setGroupId(int groupId) {
this.groupId = groupId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,221 | [Improvement] [alert-server] AlertSender optimization and gracefully close, such as MasterServer | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
In alert-server, I have two suggestions
- I think sending alert messages should go out to class of `AlertServer` independently, that it is mainly responsible for the send alert, we can define as `AlertSenderService`
- I think class of `AlertServer` should implements interface of `IStoppable`, and have gracefully close, such as MasterServer or WorkerServer
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9221 | https://github.com/apache/dolphinscheduler/pull/9246 | ab0357027d4a06aa26df6bf2345e429d9b9b6c5c | ca95d2f9282fd234d954194bab40a5bfc713c433 | 2022-03-27T11:01:48Z | java | 2022-04-08T02:02:10Z | dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/alert/AlertSendRequestCommand.java | this.content = content;
}
public int getWarnType() {
return warnType;
}
public void setWarnType(int warnType) {
this.warnType = warnType;
}
public AlertSendRequestCommand(){
}
public AlertSendRequestCommand(int groupId, String title, String content, int warnType) {
this.groupId = groupId;
this.title = title;
this.content = content;
this.warnType = warnType;
}
/**
* package request command
*
* @return command
*/
public Command convert2Command() {
Command command = new Command();
command.setType(CommandType.ALERT_SEND_REQUEST);
byte[] body = JsonSerializer.serialize(this);
command.setBody(body);
return command;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | /*
* 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, |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | * 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.server.master.registry;
import static org.apache.dolphinscheduler.common.Constants.REGISTRY_DOLPHINSCHEDULER_MASTERS;
import static org.apache.dolphinscheduler.common.Constants.REGISTRY_DOLPHINSCHEDULER_NODE;
import static org.apache.dolphinscheduler.common.Constants.SLEEP_TIME_MILLIS;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.IStoppable;
import org.apache.dolphinscheduler.common.enums.NodeType;
import org.apache.dolphinscheduler.common.enums.StateEvent;
import org.apache.dolphinscheduler.common.enums.StateEventType;
import org.apache.dolphinscheduler.common.model.Server;
import org.apache.dolphinscheduler.common.thread.ThreadUtils;
import org.apache.dolphinscheduler.common.utils.NetUtils;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus;
import org.apache.dolphinscheduler.registry.api.ConnectionState;
import org.apache.dolphinscheduler.remote.utils.NamedThreadFactory;
import org.apache.dolphinscheduler.server.builder.TaskExecutionContextBuilder;
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool;
import org.apache.dolphinscheduler.server.registry.HeartBeatTask;
import org.apache.dolphinscheduler.server.utils.ProcessUtils;
import org.apache.dolphinscheduler.service.process.ProcessService;
import org.apache.dolphinscheduler.service.registry.RegistryClient;
import org.apache.commons.collections4.CollectionUtils; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | import org.apache.commons.lang.StringUtils;
import java.time.Duration;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.google.common.collect.Sets;
/**
* zookeeper master client
* <p>
* single instance
*/
@Component
public class MasterRegistryClient {
/**
* logger
*/
private static final Logger logger = LoggerFactory.getLogger(MasterRegistryClient.class);
/**
* process service
*/
@Autowired |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | private ProcessService processService;
@Autowired
private RegistryClient registryClient;
/**
* master config
*/
@Autowired
private MasterConfig masterConfig;
/**
* heartbeat executor
*/
private ScheduledExecutorService heartBeatExecutor;
@Autowired
private WorkflowExecuteThreadPool workflowExecuteThreadPool;
/**
* master startup time, ms
*/
private long startupTime;
private String localNodePath;
public void init() {
this.startupTime = System.currentTimeMillis();
this.heartBeatExecutor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("HeartBeatExecutor"));
}
public void start() {
String nodeLock = Constants.REGISTRY_DOLPHINSCHEDULER_LOCK_FAILOVER_STARTUP_MASTERS;
try {
registryClient.getLock(nodeLock);
registry(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | registryClient.subscribe(REGISTRY_DOLPHINSCHEDULER_NODE, new MasterRegistryDataListener());
} catch (Exception e) {
logger.error("master start up exception", e);
throw new RuntimeException("master start up error", e);
} finally {
registryClient.releaseLock(nodeLock);
}
}
public void setRegistryStoppable(IStoppable stoppable) {
registryClient.setStoppable(stoppable);
}
public void closeRegistry() {
deregister();
}
/**
* remove master node path
*
* @param path node path
* @param nodeType node type
* @param failover is failover
*/
public void removeMasterNodePath(String path, NodeType nodeType, boolean failover) {
logger.info("{} node deleted : {}", nodeType, path);
if (StringUtils.isEmpty(path)) {
logger.error("server down error: empty path: {}, nodeType:{}", path, nodeType);
return;
}
String serverHost = registryClient.getHostByEventDataPath(path);
if (StringUtils.isEmpty(serverHost)) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | logger.error("server down error: unknown path: {}, nodeType:{}", path, nodeType);
return;
}
String failoverPath = getFailoverLockPath(nodeType, serverHost);
try {
registryClient.getLock(failoverPath);
if (!registryClient.exists(path)) {
logger.info("path: {} not exists", path);
registryClient.handleDeadServer(Collections.singleton(path), nodeType, Constants.ADD_OP);
}
if (failover) {
failoverServerWhenDown(serverHost, nodeType);
}
} catch (Exception e) {
logger.error("{} server failover failed, host:{}", nodeType, serverHost, e);
} finally {
registryClient.releaseLock(failoverPath);
}
}
/**
* remove worker node path
*
* @param path node path
* @param nodeType node type
* @param failover is failover
*/
public void removeWorkerNodePath(String path, NodeType nodeType, boolean failover) {
logger.info("{} node deleted : {}", nodeType, path); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | try {
String serverHost = null;
if (!StringUtils.isEmpty(path)) {
serverHost = registryClient.getHostByEventDataPath(path);
if (StringUtils.isEmpty(serverHost)) {
logger.error("server down error: unknown path: {}", path);
return;
}
if (!registryClient.exists(path)) {
logger.info("path: {} not exists", path);
registryClient.handleDeadServer(Collections.singleton(path), nodeType, Constants.ADD_OP);
}
}
if (failover) {
failoverServerWhenDown(serverHost, nodeType);
}
} catch (Exception e) {
logger.error("{} server failover failed", nodeType, e);
}
}
private boolean isNeedToHandleDeadServer(String host, NodeType nodeType, Duration sessionTimeout) {
long sessionTimeoutMillis = Math.max(Constants.REGISTRY_SESSION_TIMEOUT, sessionTimeout.toMillis());
List<Server> serverList = registryClient.getServerList(nodeType);
if (CollectionUtils.isEmpty(serverList)) {
return true;
}
Date startupTime = getServerStartupTime(serverList, host);
if (startupTime == null) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | return true;
}
if (System.currentTimeMillis() - startupTime.getTime() > sessionTimeoutMillis) {
return true;
}
return false;
}
/**
* failover server when server down
*
* @param serverHost server host
* @param nodeType zookeeper node type
*/
private void failoverServerWhenDown(String serverHost, NodeType nodeType) {
switch (nodeType) {
case MASTER:
failoverMaster(serverHost);
break;
case WORKER:
failoverWorker(serverHost);
break;
default:
break;
}
}
/**
* get failover lock path
*
* @param nodeType zookeeper node type
* @return fail over lock path |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | */
public String getFailoverLockPath(NodeType nodeType, String host) {
switch (nodeType) {
case MASTER:
return Constants.REGISTRY_DOLPHINSCHEDULER_LOCK_FAILOVER_MASTERS + "/" + host;
case WORKER:
return Constants.REGISTRY_DOLPHINSCHEDULER_LOCK_FAILOVER_WORKERS + "/" + host;
default:
return "";
}
}
/**
* task needs failover if task start before worker starts
*
* @param workerServers worker servers
* @param taskInstance task instance
* @return true if task instance need fail over
*/
private boolean checkTaskInstanceNeedFailover(List<Server> workerServers, TaskInstance taskInstance) {
boolean taskNeedFailover = true;
if (taskInstance.getHost() == null) {
return false;
}
if (checkTaskAfterWorkerStart(workerServers, taskInstance)) {
taskNeedFailover = false;
}
return taskNeedFailover;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | /**
* check task start after the worker server starts.
*
* @param taskInstance task instance
* @return true if task instance start time after worker server start date
*/
private boolean checkTaskAfterWorkerStart(List<Server> workerServers, TaskInstance taskInstance) {
if (StringUtils.isEmpty(taskInstance.getHost())) {
return false;
}
Date workerServerStartDate = getServerStartupTime(workerServers, taskInstance.getHost());
if (workerServerStartDate != null) {
if (taskInstance.getStartTime() == null) {
return taskInstance.getSubmitTime().after(workerServerStartDate);
} else {
return taskInstance.getStartTime().after(workerServerStartDate);
}
}
return false;
}
/**
* get server startup time
*/
private Date getServerStartupTime(List<Server> servers, String host) {
if (CollectionUtils.isEmpty(servers)) {
return null;
}
Date serverStartupTime = null;
for (Server server : servers) {
if (host.equals(server.getHost() + Constants.COLON + server.getPort())) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | serverStartupTime = server.getCreateTime();
break;
}
}
return serverStartupTime;
}
/**
* get server startup time
*/
private Date getServerStartupTime(NodeType nodeType, String host) {
if (StringUtils.isEmpty(host)) {
return null;
}
List<Server> servers = registryClient.getServerList(nodeType);
return getServerStartupTime(servers, host);
}
/**
* failover worker tasks
* <p>
* 1. kill yarn job if there are yarn jobs in tasks.
* 2. change task state from running to need failover.
* 3. failover all tasks when workerHost is null
*
* @param workerHost worker host
*/
private void failoverWorker(String workerHost) {
if (StringUtils.isEmpty(workerHost)) {
return;
}
List<Server> workerServers = registryClient.getServerList(NodeType.WORKER); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | long startTime = System.currentTimeMillis();
List<TaskInstance> needFailoverTaskInstanceList = processService.queryNeedFailoverTaskInstances(workerHost);
Map<Integer, ProcessInstance> processInstanceCacheMap = new HashMap<>();
logger.info("start worker[{}] failover, task list size:{}", workerHost, needFailoverTaskInstanceList.size());
for (TaskInstance taskInstance : needFailoverTaskInstanceList) {
ProcessInstance processInstance = processInstanceCacheMap.get(taskInstance.getProcessInstanceId());
if (processInstance == null) {
processInstance = processService.findProcessInstanceDetailById(taskInstance.getProcessInstanceId());
if (processInstance == null) {
logger.error("failover task instance error, processInstance {} of taskInstance {} is null",
taskInstance.getProcessInstanceId(), taskInstance.getId());
continue;
}
processInstanceCacheMap.put(processInstance.getId(), processInstance);
}
if (!checkTaskInstanceNeedFailover(workerServers, taskInstance)) {
continue;
}
if (!processInstance.getHost().equalsIgnoreCase(getLocalAddress())) {
continue;
}
logger.info("failover task instance id: {}, process instance id: {}", taskInstance.getId(), taskInstance.getProcessInstanceId());
failoverTaskInstance(processInstance, taskInstance);
}
logger.info("end worker[{}] failover, useTime:{}ms", workerHost, System.currentTimeMillis() - startTime);
}
/**
* failover master
* <p> |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | * failover process instance and associated task instance
*
* @param masterHost master host
*/
public void failoverMaster(String masterHost) {
if (StringUtils.isEmpty(masterHost)) {
return;
}
Date serverStartupTime = getServerStartupTime(NodeType.MASTER, masterHost);
List<Server> workerServers = registryClient.getServerList(NodeType.WORKER);
long startTime = System.currentTimeMillis();
List<ProcessInstance> needFailoverProcessInstanceList = processService.queryNeedFailoverProcessInstances(masterHost);
logger.info("start master[{}] failover, process list size:{}", masterHost, needFailoverProcessInstanceList.size());
for (ProcessInstance processInstance : needFailoverProcessInstanceList) {
if (Constants.NULL.equals(processInstance.getHost())) {
continue;
}
List<TaskInstance> validTaskInstanceList = processService.findValidTaskListByProcessId(processInstance.getId());
for (TaskInstance taskInstance : validTaskInstanceList) {
if (Constants.NULL.equals(taskInstance.getHost())) {
continue;
}
if (taskInstance.getState().typeIsFinished()) {
continue;
}
if (!checkTaskInstanceNeedFailover(workerServers, taskInstance)) {
continue;
}
logger.info("failover task instance id: {}, process instance id: {}", taskInstance.getId(), taskInstance.getProcessInstanceId());
failoverTaskInstance(processInstance, taskInstance); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | }
if (serverStartupTime != null && processInstance.getRestartTime() != null
&& processInstance.getRestartTime().after(serverStartupTime)) {
continue;
}
logger.info("failover process instance id: {}", processInstance.getId());
processService.processNeedFailoverProcessInstances(processInstance);
}
logger.info("master[{}] failover end, useTime:{}ms", masterHost, System.currentTimeMillis() - startTime);
}
/**
* failover task instance
* <p>
* 1. kill yarn job if there are yarn jobs in tasks.
* 2. change task state from running to need failover.
* 3. try to notify local master
*/
private void failoverTaskInstance(ProcessInstance processInstance, TaskInstance taskInstance) {
if (taskInstance == null) {
logger.error("failover task instance error, taskInstance is null");
return;
}
if (processInstance == null) {
logger.error("failover task instance error, processInstance {} of taskInstance {} is null",
taskInstance.getProcessInstanceId(), taskInstance.getId());
return;
}
taskInstance.setProcessInstance(processInstance);
TaskExecutionContext taskExecutionContext = TaskExecutionContextBuilder.get() |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | .buildTaskInstanceRelatedInfo(taskInstance)
.buildProcessInstanceRelatedInfo(processInstance)
.create();
if (masterConfig.isKillYarnJobWhenTaskFailover()) {
ProcessUtils.killYarnJob(taskExecutionContext);
}
taskInstance.setState(ExecutionStatus.NEED_FAULT_TOLERANCE);
processService.saveTaskInstance(taskInstance);
StateEvent stateEvent = new StateEvent();
stateEvent.setTaskInstanceId(taskInstance.getId());
stateEvent.setType(StateEventType.TASK_STATE_CHANGE);
stateEvent.setProcessInstanceId(processInstance.getId());
stateEvent.setExecutionStatus(taskInstance.getState());
workflowExecuteThreadPool.submitStateEvent(stateEvent);
}
/**
* registry
*/
public void registry() {
String address = NetUtils.getAddr(masterConfig.getListenPort());
localNodePath = getMasterPath();
int masterHeartbeatInterval = masterConfig.getHeartbeatInterval();
HeartBeatTask heartBeatTask = new HeartBeatTask(startupTime,
masterConfig.getMaxCpuLoadAvg(),
masterConfig.getReservedMemory(),
Sets.newHashSet(getMasterPath()),
Constants.MASTER_TYPE,
registryClient); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | registryClient.remove(localNodePath);
registryClient.persistEphemeral(localNodePath, heartBeatTask.getHeartBeatInfo());
while (!registryClient.checkNodeExists(NetUtils.getHost(), NodeType.MASTER)) {
ThreadUtils.sleep(SLEEP_TIME_MILLIS);
}
ThreadUtils.sleep(SLEEP_TIME_MILLIS);
registryClient.handleDeadServer(Collections.singleton(localNodePath), NodeType.MASTER, Constants.DELETE_OP);
registryClient.addConnectionStateListener(this::handleConnectionState);
this.heartBeatExecutor.scheduleAtFixedRate(heartBeatTask, masterHeartbeatInterval, masterHeartbeatInterval, TimeUnit.SECONDS);
logger.info("master node : {} registry to ZK successfully with heartBeatInterval : {}s", address, masterHeartbeatInterval);
}
public void handleConnectionState(ConnectionState state) {
switch (state) {
case CONNECTED:
logger.debug("registry connection state is {}", state);
break;
case SUSPENDED:
logger.warn("registry connection state is {}, ready to retry connection", state);
break;
case RECONNECTED:
logger.debug("registry connection state is {}, clean the node info", state);
registryClient.persistEphemeral(localNodePath, "");
break;
case DISCONNECTED:
logger.warn("registry connection state is {}, ready to stop myself", state);
registryClient.getStoppable().stop("registry connection state is DISCONNECTED, stop myself");
break;
default: |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,387 | [Improvement][master] Remove the lock in the start method of the MasterRegistryClient class, it is not necessary | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
Remove the lock in the start method of the MasterRegistryClient class, it is not necessary.
### Use case
Remove the lock in the start method of the MasterRegistryClient class.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9387 | https://github.com/apache/dolphinscheduler/pull/9389 | 2c49c248f3dd72bb7ae9a43c69df63126e369818 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | 2022-04-07T09:53:25Z | java | 2022-04-08T13:06:28Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java | }
}
public void deregister() {
try {
String address = getLocalAddress();
String localNodePath = getMasterPath();
registryClient.remove(localNodePath);
logger.info("master node : {} unRegistry to register center.", address);
heartBeatExecutor.shutdown();
logger.info("heartbeat executor shutdown");
registryClient.close();
} catch (Exception e) {
logger.error("remove registry path exception ", e);
}
}
/**
* get master path
*/
public String getMasterPath() {
String address = getLocalAddress();
return REGISTRY_DOLPHINSCHEDULER_MASTERS + "/" + address;
}
/**
* get local address
*/
public String getLocalAddress() {
return NetUtils.getAddr(masterConfig.getListenPort());
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | /*
* 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.controller;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.AlertType;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.entity.AlertGroup;
import org.apache.dolphinscheduler.dao.mapper.AlertGroupMapper;
import java.util.Date;
import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/**
* alert group controller test
*/
public class AlertGroupControllerTest extends AbstractControllerTest {
private static final Logger logger = LoggerFactory.getLogger(AlertGroupController.class);
private static final String defaultTestAlertGroupName = "cxc test group name";
@Autowired
AlertGroupMapper alertGroupMapper; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | private int createEntity() {
AlertGroup alertGroup = new AlertGroup();
alertGroup.setGroupName(defaultTestAlertGroupName);
alertGroup.setCreateTime(new Date());
alertGroup.setUpdateTime(new Date());
alertGroupMapper.insert(alertGroup);
return alertGroup.getId();
}
@After
public void clear() {
alertGroupMapper.delete(new QueryWrapper<AlertGroup>().lambda().eq(AlertGroup::getGroupName, defaultTestAlertGroupName));
}
@Test
public void test010CreateAlertGroup() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", defaultTestAlertGroupName);
paramsMap.add("groupType", AlertType.EMAIL.toString());
paramsMap.add("description", "cxc junit 测试告警描述");
paramsMap.add("alertInstanceIds", "");
MvcResult mvcResult = mockMvc.perform(post("/alert-groups")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isCreated())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | public void test020List() throws Exception {
createEntity();
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
MvcResult mvcResult = mockMvc.perform(get("/alert-groups/list")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test030ListPaging() throws Exception {
createEntity();
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("pageNo", "1");
paramsMap.add("searchVal", AlertType.EMAIL.toString());
paramsMap.add("pageSize", "1");
MvcResult mvcResult = mockMvc.perform(get("/alert-groups")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | @Test
public void test040QueryAlertGroupById() throws Exception {
int entityId = createEntity();
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("id", Integer.toString(entityId));
MvcResult mvcResult = mockMvc.perform(post("/alert-groups/query")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test050UpdateAlertGroup() throws Exception {
int entityId = createEntity();
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", defaultTestAlertGroupName);
paramsMap.add("groupType", AlertType.EMAIL.toString());
paramsMap.add("description", "update alter group");
paramsMap.add("alertInstanceIds", "");
MvcResult mvcResult = mockMvc.perform(put("/alert-groups/" + entityId)
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test060VerifyGroupName() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", defaultTestAlertGroupName);
MvcResult mvcResult = mockMvc.perform(get("/alert-groups/verify-name")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test070VerifyGroupNameNotExit() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", "cxc test group name xx");
MvcResult mvcResult = mockMvc.perform(get("/alert-groups/verify-name")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | }
@Test
public void test080DelAlertGroupById() throws Exception {
int entityId = createEntity();
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
MvcResult mvcResult = mockMvc.perform(delete("/alert-groups/" + entityId)
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test090DelAlertGroupById() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
MvcResult mvcResult = mockMvc.perform(delete("/alert-groups/1")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.NOT_ALLOW_TO_DELETE_DEFAULT_ALARM_GROUP.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertStatus.java | /*
* 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 |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertStatus.java | * limitations under the License.
*/
package org.apache.dolphinscheduler.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
/**
* alert status
*/
public enum AlertStatus {
/**
* 0 waiting executed; 1 execute successfully,2 execute failed
*/
WAIT_EXECUTION(0, "waiting executed"),
EXECUTION_SUCCESS(1, "execute successfully"),
EXECUTION_FAILURE(2, "execute failed"),
EXECUTION_PARTIAL_SUCCESS(3, "execute partial successfully");
AlertStatus(int code, String descp) {
this.code = code;
this.descp = descp;
}
@EnumValue
private final int code;
private final String descp;
public int getCode() {
return code;
}
public String getDescp() {
return descp;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertType.java | /*
* 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, |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertType.java | * 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.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
/**
* warning message notification method
*/
public enum AlertType {
/**
* 0 email; 1 SMS
*/
EMAIL(0, "email"),
SMS(1, "SMS");
AlertType(int code, String descp) {
this.code = code;
this.descp = descp;
}
@EnumValue
private final int code;
private final String descp;
public int getCode() {
return code;
}
public String getDescp() {
return descp;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/WarningType.java | /*
* 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.enums;
import static java.util.stream.Collectors.toMap;
import java.util.Arrays;
import java.util.Map;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.google.common.base.Functions;
/**
* types for whether to send warning when process ending;
*/
public enum WarningType {
/**
* 0 do not send warning;
* 1 send if process success; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/WarningType.java | * 2 send if process failed;
* 3 send if process ending;
*/
NONE(0, "none"),
SUCCESS(1, "success"),
FAILURE(2, "failure"),
ALL(3, "all");
WarningType(int code, String descp) {
this.code = code;
this.descp = descp;
}
@EnumValue
private final int code;
private final String descp;
public int getCode() {
return code;
}
public String getDescp() {
return descp;
}
private static final Map<String, WarningType> WARNING_TYPE_MAP =
Arrays.stream(WarningType.values()).collect(toMap(WarningType::getDescp, Functions.identity()));
public static WarningType of(String descp) {
if (WARNING_TYPE_MAP.containsKey(descp)) {
return WARNING_TYPE_MAP.get(descp);
}
return null;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Alert.java | /*
* 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.dao.entity;
import org.apache.dolphinscheduler.common.enums.AlertStatus;
import org.apache.dolphinscheduler.common.enums.WarningType;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@TableName("t_ds_alert") |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Alert.java | public class Alert {
/**
* primary key
*/
@TableId(value = "id", type = IdType.AUTO)
private int id;
/**
* title
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Alert.java | @TableField(value = "title")
private String title;
/**
* content
*/
@TableField(value = "content")
private String content;
/**
* alert_status
*/
@TableField(value = "alert_status")
private AlertStatus alertStatus;
/**
* warning_type
*/
@TableField(value = "warning_type")
private WarningType warningType;
/**
* log
*/
@TableField(value = "log")
private String log;
/**
* alertgroup_id
*/
@TableField("alertgroup_id")
private int alertGroupId;
/**
* create_time
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Alert.java | @TableField("create_time")
private Date createTime;
/**
* update_time
*/
@TableField("update_time")
private Date updateTime;
@TableField(exist = false)
private Map<String, Object> info = new HashMap<>();
public Alert() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public AlertStatus getAlertStatus() { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Alert.java | return alertStatus;
}
public void setAlertStatus(AlertStatus alertStatus) {
this.alertStatus = alertStatus;
}
public String getLog() {
return log;
}
public void setLog(String log) {
this.log = log;
}
public int getAlertGroupId() {
return alertGroupId;
}
public void setAlertGroupId(int alertGroupId) {
this.alertGroupId = alertGroupId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Map<String, Object> getInfo() { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Alert.java | return info;
}
public void setInfo(Map<String, Object> info) {
this.info = info;
}
public WarningType getWarningType() {
return warningType;
}
public void setWarningType(WarningType warningType) {
this.warningType = warningType;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Alert alert = (Alert) o;
if (id != alert.id) {
return false;
}
if (alertGroupId != alert.alertGroupId) {
return false;
}
if (!title.equals(alert.title)) {
return false;
}
if (!content.equals(alert.content)) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Alert.java | return false;
}
if (alertStatus != alert.alertStatus) {
return false;
}
if (!log.equals(alert.log)) {
return false;
}
if (!createTime.equals(alert.createTime)) {
return false;
}
if (warningType != alert.warningType) {
return false;
}
return updateTime.equals(alert.updateTime) && info.equals(alert.info);
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + title.hashCode();
result = 31 * result + content.hashCode();
result = 31 * result + alertStatus.hashCode();
result = 31 * result + warningType.hashCode();
result = 31 * result + log.hashCode();
result = 31 * result + alertGroupId;
result = 31 * result + createTime.hashCode();
result = 31 * result + updateTime.hashCode();
result = 31 * result + info.hashCode();
return result;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,406 | [Feature] [ALERT] Add new property to class Alert | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Add new property to class Alert.
projectCode processDefinitionCode processInstanceId alertType
### What you expected to happen
Add new property to class Alert
### How to reproduce
Add new property to class Alert
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9406 | https://github.com/apache/dolphinscheduler/pull/9408 | dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0 | e2759a8f427bddf4154e600bb0d5d54d5028b319 | 2022-04-08T08:34:07Z | java | 2022-04-08T15:54:34Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Alert.java | @Override
public String toString() {
return "Alert{"
+ "id="
+ id
+ ", title='"
+ title + '\''
+ ", content='"
+ content
+ '\''
+ ", alertStatus="
+ alertStatus
+ ", warningType="
+ warningType
+ ", log='"
+ log
+ '\''
+ ", alertGroupId="
+ alertGroupId
+ '\''
+ ", createTime="
+ createTime
+ ", updateTime="
+ updateTime
+ ", info="
+ info
+ '}';
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java | /*
* 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.dao.entity;
import org.apache.dolphinscheduler.common.enums.UdfType;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.commons.lang.StringUtils;
import java.io.IOException;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.KeyDeserializer;
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java | * udf function
*/
@TableName("t_ds_udfs")
public class UdfFunc {
/**
* id
*/
@TableId(value="id", type=IdType.AUTO)
private int id;
/**
* user id
*/
private int userId;
/**
* udf function name
*/
private String funcName;
/**
* udf class name
*/
private String className;
/**
* udf argument types
*/
private String argTypes;
/**
* udf data base
*/
private String database;
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java | * udf description
*/
private String description;
/**
* resource id
*/
private int resourceId;
/**
* resource name
*/
private String resourceName;
/**
* udf function type: hive / spark
*/
private UdfType type;
/**
* create time
*/
private Date createTime;
/**
* update time
*/
private Date updateTime;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getUserId() { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java | return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getFuncName() {
return funcName;
}
public void setFuncName(String funcName) {
this.funcName = funcName;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public String getArgTypes() {
return argTypes;
}
public void setArgTypes(String argTypes) {
this.argTypes = argTypes;
}
public String getDatabase() {
return database;
}
public void setDatabase(String database) {
this.database = database;
}
public String getDescription() { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java | return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getResourceId() {
return resourceId;
}
public void setResourceId(int resourceId) {
this.resourceId = resourceId;
}
public String getResourceName() {
return resourceName;
}
public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
public UdfType getType() {
return type;
}
public void setType(UdfType type) {
this.type = type;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java | return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UdfFunc udfFunc = (UdfFunc) o;
if (id != udfFunc.id) {
return false;
}
return !(funcName != null ? !funcName.equals(udfFunc.funcName) : udfFunc.funcName != null);
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (funcName != null ? funcName.hashCode() : 0);
return result;
}
@Override
public String toString() {
return JSONUtils.toJsonString(this);
}
public static class UdfFuncDeserializer extends KeyDeserializer { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java | @Override
public Object deserializeKey(String key, DeserializationContext ctxt) throws IOException {
if (StringUtils.isBlank(key)) {
return null;
}
return JSONUtils.parseObject(key, UdfFunc.class);
}
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/entity/UdfFuncTest.java | /*
* 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.dao.entity;
import org.apache.dolphinscheduler.dao.entity.UdfFunc.UdfFuncDeserializer;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
public class UdfFuncTest {
/**
* test to String |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/entity/UdfFuncTest.java | */
@Test
public void testUdfFuncToString() {
UdfFunc udfFunc = new UdfFunc();
udfFunc.setResourceName("dolphin_resource_update");
udfFunc.setResourceId(2);
udfFunc.setClassName("org.apache.dolphinscheduler.test.mrUpdate");
Assert.assertEquals("{\"id\":0,\"userId\":0,\"funcName\":null,\"className\":\"org.apache.dolphinscheduler.test.mrUpdate\",\"argTypes\":null,\"database\":null,"
+ "\"description\":null,\"resourceId\":2,\"resourceName\":\"dolphin_resource_update\",\"type\":null,\"createTime\":null,\"updateTime\":null}"
, udfFunc.toString());
}
/**
* test UdfFuncDeserializer.deserializeKey
*
* @throws IOException
*/
@Test
public void testUdfFuncDeserializer() throws IOException {
UdfFuncDeserializer udfFuncDeserializer = new UdfFuncDeserializer();
Assert.assertNull(udfFuncDeserializer.deserializeKey(null, null));
UdfFunc udfFunc = new UdfFunc();
udfFunc.setResourceName("dolphin_resource_update");
udfFunc.setResourceId(2);
udfFunc.setClassName("org.apache.dolphinscheduler.test.mrUpdate");
Assert.assertNotNull(udfFuncDeserializer.deserializeKey(udfFunc.toString(), null));
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/AbstractResourceParameters.java | /*
* 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.plugin.task.api.parameters.resource;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes({
@Type(value = DataSourceParameters.class, name = "DATASOURCE"),
@Type(value = UdfFuncParameters.class, name = "UDF")
})
public abstract class AbstractResourceParameters {
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/DataSourceParameters.java | /*
* 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.plugin.task.api.parameters.resource;
import org.apache.dolphinscheduler.spi.enums.DbType;
public class DataSourceParameters extends AbstractResourceParameters { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/DataSourceParameters.java | private DbType type;
private String connectionParams;
public DbType getType() {
return type;
}
public void setType(DbType type) {
this.type = type;
}
public String getConnectionParams() {
return connectionParams;
}
public void setConnectionParams(String connectionParams) {
this.connectionParams = connectionParams;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java | /*
* 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.plugin.task.api.parameters.resource;
import org.apache.dolphinscheduler.plugin.task.api.enums.UdfType;
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
import java.util.Date;
/**
* udf function
*/
public class UdfFuncParameters extends AbstractResourceParameters { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java | /**
* id
*/
private int id;
/**
* user id
*/
private int userId;
/**
* udf function name |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java | */
private String funcName;
/**
* udf class name
*/
private String className;
/**
* udf argument types
*/
private String argTypes;
/**
* udf data base
*/
private String database;
/**
* udf description
*/
private String description;
/**
* resource id
*/
private int resourceId;
/**
* resource name
*/
private String resourceName;
/**
* udf function type: hive / spark
*/
private UdfType type; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java | private String tenantCode;
private String defaultFS;
/**
* create time
*/
private Date createTime;
/**
* update time
*/
private Date updateTime;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getFuncName() {
return funcName;
}
public void setFuncName(String funcName) {
this.funcName = funcName;
}
public String getClassName() {
return className; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java | }
public void setClassName(String className) {
this.className = className;
}
public String getArgTypes() {
return argTypes;
}
public void setArgTypes(String argTypes) {
this.argTypes = argTypes;
}
public String getDatabase() {
return database;
}
public void setDatabase(String database) {
this.database = database;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getResourceId() {
return resourceId;
}
public void setResourceId(int resourceId) {
this.resourceId = resourceId;
}
public String getResourceName() {
return resourceName; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java | }
public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
public UdfType getType() {
return type;
}
public void setType(UdfType type) {
this.type = type;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getTenantCode() {
return tenantCode;
}
public void setTenantCode(String tenantCode) {
this.tenantCode = tenantCode;
}
public String getDefaultFS() {
return defaultFS; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,251 | [Bug] [server] HIVE wokflow,no resource and no log | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
1 ihad bound a udf function to my workflow,but when I run it, it said that the resource is not exists ,and i can't see the log
<img width="1257" alt="image" src="https://user-images.githubusercontent.com/7134124/160527204-cf43dbad-cc92-4bf4-b79f-e11a6e5d064a.png">
![Uploading image.png…]()
### What you expected to happen
the hive sql can execute and see the log normal
### How to reproduce
check the code and fix it
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9251 | https://github.com/apache/dolphinscheduler/pull/9319 | fea9ce391b778f554d0404ea46bc6b357625508d | 037692517ac661344dd86d178d6ca5e367cb1fcb | 2022-03-29T03:33:18Z | java | 2022-04-11T02:49:46Z | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java | }
public void setDefaultFS(String defaultFS) {
this.defaultFS = defaultFS;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UdfFuncParameters udfFuncRequest = (UdfFuncParameters) o;
if (id != udfFuncRequest.id) {
return false;
}
return !(funcName != null ? !funcName.equals(udfFuncRequest.funcName) : udfFuncRequest.funcName != null);
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (funcName != null ? funcName.hashCode() : 0);
return result;
}
@Override
public String toString() {
return JSONUtils.toJsonString(this);
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | /*
* 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.plugin.task.sql;
import org.apache.dolphinscheduler.plugin.datasource.api.plugin.DataSourceClientProvider;
import org.apache.dolphinscheduler.plugin.datasource.api.utils.CommonUtils;
import org.apache.dolphinscheduler.plugin.datasource.api.utils.DataSourceUtils;
import org.apache.dolphinscheduler.plugin.task.api.AbstractTaskExecutor;
import org.apache.dolphinscheduler.plugin.task.api.SQLTaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
import org.apache.dolphinscheduler.plugin.task.api.TaskException;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.enums.Direct;
import org.apache.dolphinscheduler.plugin.task.api.enums.SqlType;
import org.apache.dolphinscheduler.plugin.task.api.enums.TaskTimeoutStrategy;
import org.apache.dolphinscheduler.plugin.task.api.model.Property; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | import org.apache.dolphinscheduler.plugin.task.api.model.TaskAlertInfo;
import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
import org.apache.dolphinscheduler.plugin.task.api.parameters.SqlParameters;
import org.apache.dolphinscheduler.plugin.task.api.parameters.resource.UdfFuncParameters;
import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils;
import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils;
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam;
import org.apache.dolphinscheduler.spi.enums.DbType;
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
import org.apache.dolphinscheduler.spi.utils.StringUtils;
import org.apache.commons.collections.CollectionUtils;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
public class SqlTask extends AbstractTaskExecutor { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | /**
* taskExecutionContext
*/
private TaskExecutionContext taskExecutionContext;
/**
* sql parameters
*/
private SqlParameters sqlParameters;
/**
* base datasource
*/
private BaseConnectionParam baseConnectionParam;
/**
* create function format
*/
private static final String CREATE_FUNCTION_FORMAT = "create temporary function {0} as ''{1}''";
/**
* default query sql limit
*/
private static final int QUERY_LIMIT = 10000;
private SQLTaskExecutionContext sqlTaskExecutionContext;
/**
* Abstract Yarn Task
*
* @param taskRequest taskRequest
*/
public SqlTask(TaskExecutionContext taskRequest) {
super(taskRequest);
this.taskExecutionContext = taskRequest; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | this.sqlParameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), SqlParameters.class);
assert sqlParameters != null;
if (!sqlParameters.checkParameters()) {
throw new RuntimeException("sql task params is not valid");
}
sqlTaskExecutionContext = sqlParameters.generateExtendedContext(taskExecutionContext.getResourceParametersHelper());
}
@Override
public AbstractParameters getParameters() {
return sqlParameters;
}
@Override
public void handle() throws Exception {
logger.info("Full sql parameters: {}", sqlParameters);
logger.info("sql type : {}, datasource : {}, sql : {} , localParams : {},udfs : {},showType : {},connParams : {},varPool : {} ,query max result limit {}",
sqlParameters.getType(),
sqlParameters.getDatasource(),
sqlParameters.getSql(),
sqlParameters.getLocalParams(),
sqlParameters.getUdfs(),
sqlParameters.getShowType(),
sqlParameters.getConnParams(),
sqlParameters.getVarPool(),
sqlParameters.getLimit());
try {
baseConnectionParam = (BaseConnectionParam) DataSourceUtils.buildConnectionParams(
DbType.valueOf(sqlParameters.getType()),
sqlTaskExecutionContext.getConnectionParams()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | SqlBinds mainSqlBinds = getSqlAndSqlParamsMap(sqlParameters.getSql());
List<SqlBinds> preStatementSqlBinds = Optional.ofNullable(sqlParameters.getPreStatements())
.orElse(new ArrayList<>())
.stream()
.map(this::getSqlAndSqlParamsMap)
.collect(Collectors.toList());
List<SqlBinds> postStatementSqlBinds = Optional.ofNullable(sqlParameters.getPostStatements())
.orElse(new ArrayList<>())
.stream()
.map(this::getSqlAndSqlParamsMap)
.collect(Collectors.toList());
List<String> createFuncs = createFuncs(sqlTaskExecutionContext.getUdfFuncParametersList(), logger);
executeFuncAndSql(mainSqlBinds, preStatementSqlBinds, postStatementSqlBinds, createFuncs);
setExitStatusCode(TaskConstants.EXIT_CODE_SUCCESS);
} catch (Exception e) {
setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
logger.error("sql task error: {}", e.toString());
throw e;
}
}
/**
* execute function and sql
*
* @param mainSqlBinds main sql binds
* @param preStatementsBinds pre statements binds
* @param postStatementsBinds post statements binds
* @param createFuncs create functions
*/
public void executeFuncAndSql(SqlBinds mainSqlBinds, |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | List<SqlBinds> preStatementsBinds,
List<SqlBinds> postStatementsBinds,
List<String> createFuncs) throws Exception {
Connection connection = null;
PreparedStatement stmt = null;
ResultSet resultSet = null;
try {
connection = DataSourceClientProvider.getInstance().getConnection(DbType.valueOf(sqlParameters.getType()), baseConnectionParam);
if (CollectionUtils.isNotEmpty(createFuncs)) {
createTempFunction(connection, createFuncs);
}
preSql(connection, preStatementsBinds);
stmt = prepareStatementAndBind(connection, mainSqlBinds);
String result = null;
if (sqlParameters.getSqlType() == SqlType.QUERY.ordinal()) {
resultSet = stmt.executeQuery();
result = resultProcess(resultSet);
} else if (sqlParameters.getSqlType() == SqlType.NON_QUERY.ordinal()) {
String updateResult = String.valueOf(stmt.executeUpdate());
result = setNonQuerySqlReturn(updateResult, sqlParameters.getLocalParams());
}
sqlParameters.dealOutParam(result);
postSql(connection, postStatementsBinds); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | } catch (Exception e) {
logger.error("execute sql error: {}", e.getMessage());
throw e;
} finally {
close(resultSet, stmt, connection);
}
}
private String setNonQuerySqlReturn(String updateResult, List<Property> properties) {
String result = null;
for (Property info : properties) {
if (Direct.OUT == info.getDirect()) {
List<Map<String, String>> updateRL = new ArrayList<>();
Map<String, String> updateRM = new HashMap<>();
updateRM.put(info.getProp(), updateResult);
updateRL.add(updateRM);
result = JSONUtils.toJsonString(updateRL);
break;
}
}
return result;
}
/**
* result process
*
* @param resultSet resultSet
* @throws Exception Exception
*/
private String resultProcess(ResultSet resultSet) throws Exception {
ArrayNode resultJSONArray = JSONUtils.createArrayNode();
if (resultSet != null) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | ResultSetMetaData md = resultSet.getMetaData();
int num = md.getColumnCount();
int rowCount = 0;
int limit = sqlParameters.getLimit() == 0 ? QUERY_LIMIT : sqlParameters.getLimit();
while (rowCount < limit && resultSet.next()) {
ObjectNode mapOfColValues = JSONUtils.createObjectNode();
for (int i = 1; i <= num; i++) {
mapOfColValues.set(md.getColumnLabel(i), JSONUtils.toJsonNode(resultSet.getObject(i)));
}
resultJSONArray.add(mapOfColValues);
rowCount++;
}
int displayRows = sqlParameters.getDisplayRows() > 0 ? sqlParameters.getDisplayRows() : TaskConstants.DEFAULT_DISPLAY_ROWS;
displayRows = Math.min(displayRows, resultJSONArray.size());
logger.info("display sql result {} rows as follows:", displayRows);
for (int i = 0; i < displayRows; i++) {
String row = JSONUtils.toJsonString(resultJSONArray.get(i));
logger.info("row {} : {}", i + 1, row);
}
if (resultSet.next()) {
logger.info("sql result limit : {} exceeding results are filtered", limit);
String log = String.format("sql result limit : %d exceeding results are filtered", limit);
resultJSONArray.add(JSONUtils.toJsonNode(log));
}
}
String result = JSONUtils.toJsonString(resultJSONArray);
if (sqlParameters.getSendEmail() == null || sqlParameters.getSendEmail()) {
sendAttachment(sqlParameters.getGroupId(), StringUtils.isNotEmpty(sqlParameters.getTitle())
? sqlParameters.getTitle()
: taskExecutionContext.getTaskName() + " query result sets", result); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | }
logger.debug("execute sql result : {}", result);
return result;
}
/**
* send alert as an attachment
*
* @param title title
* @param content content
*/
private void sendAttachment(int groupId, String title, String content) {
setNeedAlert(Boolean.TRUE);
TaskAlertInfo taskAlertInfo = new TaskAlertInfo();
taskAlertInfo.setAlertGroupId(groupId);
taskAlertInfo.setContent(content);
taskAlertInfo.setTitle(title);
setTaskAlertInfo(taskAlertInfo);
}
/**
* pre sql
*
* @param connection connection
* @param preStatementsBinds preStatementsBinds
*/
private void preSql(Connection connection,
List<SqlBinds> preStatementsBinds) throws Exception {
for (SqlBinds sqlBind : preStatementsBinds) {
try (PreparedStatement pstmt = prepareStatementAndBind(connection, sqlBind)) {
int result = pstmt.executeUpdate();
logger.info("pre statement execute result: {}, for sql: {}", result, sqlBind.getSql()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | }
}
}
/**
* post sql
*
* @param connection connection
* @param postStatementsBinds postStatementsBinds
*/
private void postSql(Connection connection,
List<SqlBinds> postStatementsBinds) throws Exception {
for (SqlBinds sqlBind : postStatementsBinds) {
try (PreparedStatement pstmt = prepareStatementAndBind(connection, sqlBind)) {
int result = pstmt.executeUpdate();
logger.info("post statement execute result: {},for sql: {}", result, sqlBind.getSql());
}
}
}
/**
* create temp function
*
* @param connection connection
* @param createFuncs createFuncs
*/
private void createTempFunction(Connection connection,
List<String> createFuncs) throws Exception {
try (Statement funcStmt = connection.createStatement()) {
for (String createFunc : createFuncs) {
logger.info("hive create function sql: {}", createFunc);
funcStmt.execute(createFunc); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | }
}
}
/**
* close jdbc resource
*
* @param resultSet resultSet
* @param pstmt pstmt
* @param connection connection
*/
private void close(ResultSet resultSet,
PreparedStatement pstmt,
Connection connection) {
if (resultSet != null) {
try {
resultSet.close();
} catch (SQLException e) {
logger.error("close result set error : {}", e.getMessage(), e);
}
}
if (pstmt != null) {
try {
pstmt.close();
} catch (SQLException e) {
logger.error("close prepared statement error : {}", e.getMessage(), e);
}
}
if (connection != null) {
try {
connection.close(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | } catch (SQLException e) {
logger.error("close connection error : {}", e.getMessage(), e);
}
}
}
/**
* preparedStatement bind
*
* @param connection connection
* @param sqlBinds sqlBinds
* @return PreparedStatement
* @throws Exception Exception
*/
private PreparedStatement prepareStatementAndBind(Connection connection, SqlBinds sqlBinds) {
boolean timeoutFlag = taskExecutionContext.getTaskTimeoutStrategy() == TaskTimeoutStrategy.FAILED
|| taskExecutionContext.getTaskTimeoutStrategy() == TaskTimeoutStrategy.WARNFAILED;
try {
PreparedStatement stmt = connection.prepareStatement(sqlBinds.getSql());
if (timeoutFlag) {
stmt.setQueryTimeout(taskExecutionContext.getTaskTimeout());
}
Map<Integer, Property> params = sqlBinds.getParamsMap();
if (params != null) {
for (Map.Entry<Integer, Property> entry : params.entrySet()) {
Property prop = entry.getValue();
ParameterUtils.setInParameter(entry.getKey(), stmt, prop.getType(), prop.getValue());
}
}
logger.info("prepare statement replace sql : {} ", stmt); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | return stmt;
} catch (Exception exception) {
throw new TaskException("SQL task prepareStatementAndBind error", exception);
}
}
/**
* print replace sql
*
* @param content content
* @param formatSql format sql
* @param rgex rgex
* @param sqlParamsMap sql params map
*/
private void printReplacedSql(String content, String formatSql, String rgex, Map<Integer, Property> sqlParamsMap) {
logger.info("after replace sql , preparing : {}", formatSql);
StringBuilder logPrint = new StringBuilder("replaced sql , parameters:");
if (sqlParamsMap == null) {
logger.info("printReplacedSql: sqlParamsMap is null.");
} else {
for (int i = 1; i <= sqlParamsMap.size(); i++) {
logPrint.append(sqlParamsMap.get(i).getValue()).append("(").append(sqlParamsMap.get(i).getType()).append(")");
}
}
logger.info("Sql Params are {}", logPrint);
}
/**
* ready to execute SQL and parameter entity Map
*
* @return SqlBinds |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | */
private SqlBinds getSqlAndSqlParamsMap(String sql) {
Map<Integer, Property> sqlParamsMap = new HashMap<>();
StringBuilder sqlBuilder = new StringBuilder();
Map<String, Property> paramsMap = ParamUtils.convert(taskExecutionContext, getParameters());
if (paramsMap == null) {
sqlBuilder.append(sql);
return new SqlBinds(sqlBuilder.toString(), sqlParamsMap);
}
if (StringUtils.isNotEmpty(sqlParameters.getTitle())) {
String title = ParameterUtils.convertParameterPlaceholders(sqlParameters.getTitle(),
ParamUtils.convert(paramsMap));
logger.info("SQL title : {}", title);
sqlParameters.setTitle(title);
}
sql = ParameterUtils.replaceScheduleTime(sql, taskExecutionContext.getScheduleTime());
setSqlParamsMap(sql, rgex, sqlParamsMap, paramsMap,taskExecutionContext.getTaskInstanceId());
String rgexo = "['\"]*\\!\\{(.*?)\\}['\"]*";
sql = replaceOriginalValue(sql, rgexo, paramsMap);
// r
String formatSql = sql.replaceAll(rgex, "?");
sqlBuilder.append(formatSql);
// p
printReplacedSql(sql, formatSql, rgex, sqlParamsMap); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | return new SqlBinds(sqlBuilder.toString(), sqlParamsMap);
}
private String replaceOriginalValue(String content, String rgex, Map<String, Property> sqlParamsMap) {
Pattern pattern = Pattern.compile(rgex);
while (true) {
Matcher m = pattern.matcher(content);
if (!m.find()) {
break;
}
String paramName = m.group(1);
String paramValue = sqlParamsMap.get(paramName).getValue();
content = m.replaceFirst(paramValue);
}
return content;
}
/**
* create function list
*
* @param udfFuncParameters udfFuncParameters
* @param logger logger
* @return
*/
private List<String> createFuncs(List<UdfFuncParameters> udfFuncParameters, Logger logger) {
if (CollectionUtils.isEmpty(udfFuncParameters)) {
logger.info("can't find udf function resource");
return null;
}
// b
List<String> funcList = buildJarSql(udfFuncParameters);
// b |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,316 | [Bug] [Task] Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Configure DB2 data source SQL script execution report ResultSet has been closed exception in SQL task

### What you expected to happen
Normal
### How to reproduce
Configure DB2 data source SQL script execution in SQL task
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9316 | https://github.com/apache/dolphinscheduler/pull/9317 | 037692517ac661344dd86d178d6ca5e367cb1fcb | 923f3f38e3271d7f1d22b3abc3497cecb6957e4a | 2022-04-01T10:21:41Z | java | 2022-04-11T05:19:48Z | dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | List<String> tempFuncList = buildTempFuncSql(udfFuncParameters);
funcList.addAll(tempFuncList);
return funcList;
}
/**
* b
* @param udfFuncParameters udfFuncParameters
* @return
*/
private List<String> buildTempFuncSql(List<UdfFuncParameters> udfFuncParameters) {
return udfFuncParameters.stream().map(value -> MessageFormat
.format(CREATE_FUNCTION_FORMAT, value.getFuncName(), value.getClassName())).collect(Collectors.toList());
}
/**
* b
* @param udfFuncParameters udfFuncParameters
* @return
*/
private List<String> buildJarSql(List<UdfFuncParameters> udfFuncParameters) {
return udfFuncParameters.stream().map(value -> {
String defaultFS = value.getDefaultFS();
String prefixPath = defaultFS.startsWith("file://") ? "file://" : defaultFS;
String uploadPath = CommonUtils.getHdfsUdfDir(value.getTenantCode());
String resourceFullName = value.getResourceName();
resourceFullName = resourceFullName.startsWith("/") ? resourceFullName : String.format("/%s", resourceFullName);
return String.format("add jar %s%s%s", prefixPath, uploadPath, resourceFullName);
}).collect(Collectors.toList());
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | /*
* Lcensed to the Apache Software Foundaton (ASF) under one or more
* contrbutor lcense agreements. See the NOTICE fle dstrbuted wth
* ths work for addtonal nformaton regardng copyrght ownershp.
* The ASF lcenses ths fle to You under the Apache Lcense, Verson 2.0
* (the "Lcense"); you may not use ths fle except n complance wth
* the Lcense. You may obtan a copy of the Lcense at
*
* http://www.apache.org/lcenses/LICENSE-2.0
*
* Unless requred by applcable law or agreed to n wrtng, software
* dstrbuted under the Lcense s dstrbuted on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ether express or mpled.
* See the Lcense for the specfc language governng permssons and
* lmtatons under the Lcense.
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | package org.apache.dolphnscheduler.server.master.runner;
mport com.google.common.collect.Lsts;
mport org.apache.commons.collectons.CollectonUtls;
mport org.apache.commons.lang.StrngUtls;
mport org.apache.commons.lang.math.NumberUtls;
mport org.apache.dolphnscheduler.common.Constants;
mport org.apache.dolphnscheduler.common.enums.CommandType;
mport org.apache.dolphnscheduler.common.enums.FalureStrategy;
mport org.apache.dolphnscheduler.common.enums.Flag;
mport org.apache.dolphnscheduler.common.enums.Prorty;
mport org.apache.dolphnscheduler.common.enums.StateEvent;
mport org.apache.dolphnscheduler.common.enums.StateEventType;
mport org.apache.dolphnscheduler.common.enums.TaskDependType;
mport org.apache.dolphnscheduler.common.enums.TaskGroupQueueStatus;
mport org.apache.dolphnscheduler.common.enums.TmeoutFlag;
mport org.apache.dolphnscheduler.common.graph.DAG;
mport org.apache.dolphnscheduler.common.model.TaskNode;
mport org.apache.dolphnscheduler.common.model.TaskNodeRelaton;
mport org.apache.dolphnscheduler.common.process.ProcessDag;
mport org.apache.dolphnscheduler.common.utls.DateUtls;
mport org.apache.dolphnscheduler.common.utls.JSONUtls;
mport org.apache.dolphnscheduler.common.utls.NetUtls;
mport org.apache.dolphnscheduler.common.utls.ParameterUtls;
mport org.apache.dolphnscheduler.dao.entty.Command;
mport org.apache.dolphnscheduler.dao.entty.Envronment;
mport org.apache.dolphnscheduler.dao.entty.ProcessDefnton;
mport org.apache.dolphnscheduler.dao.entty.ProcessInstance;
mport org.apache.dolphnscheduler.dao.entty.ProcessTaskRelaton;
mport org.apache.dolphnscheduler.dao.entty.ProjectUser;
mport org.apache.dolphnscheduler.dao.entty.Schedule; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | mport org.apache.dolphnscheduler.dao.entty.TaskDefntonLog;
mport org.apache.dolphnscheduler.dao.entty.TaskGroupQueue;
mport org.apache.dolphnscheduler.dao.entty.TaskInstance;
mport org.apache.dolphnscheduler.dao.utls.DagHelper;
mport org.apache.dolphnscheduler.plugn.task.ap.enums.DependResult;
mport org.apache.dolphnscheduler.plugn.task.ap.enums.Drect;
mport org.apache.dolphnscheduler.plugn.task.ap.enums.ExecutonStatus;
mport org.apache.dolphnscheduler.plugn.task.ap.enums.TaskTmeoutStrategy;
mport org.apache.dolphnscheduler.plugn.task.ap.model.Property;
mport org.apache.dolphnscheduler.plugn.task.ap.parameters.BlockngParameters;
mport org.apache.dolphnscheduler.remote.command.HostUpdateCommand;
mport org.apache.dolphnscheduler.remote.utls.Host;
mport org.apache.dolphnscheduler.server.master.confg.MasterConfg;
mport org.apache.dolphnscheduler.server.master.dspatch.executor.NettyExecutorManager;
mport org.apache.dolphnscheduler.server.master.runner.task.ITaskProcessor;
mport org.apache.dolphnscheduler.server.master.runner.task.TaskActon;
mport org.apache.dolphnscheduler.server.master.runner.task.TaskProcessorFactory;
mport org.apache.dolphnscheduler.servce.alert.ProcessAlertManager;
mport org.apache.dolphnscheduler.servce.process.ProcessServce;
mport org.apache.dolphnscheduler.servce.quartz.cron.CronUtls;
mport org.apache.dolphnscheduler.servce.queue.PeerTaskInstancePrortyQueue;
mport org.slf4j.Logger;
mport org.slf4j.LoggerFactory;
mport java.utl.ArrayLst;
mport java.utl.Arrays;
mport java.utl.Collecton;
mport java.utl.Date;
mport java.utl.HashMap;
mport java.utl.Iterator;
mport java.utl.Lst; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | mport java.utl.Map;
mport java.utl.Map.Entry;
mport java.utl.Objects;
mport java.utl.Set;
mport java.utl.concurrent.ConcurrentHashMap;
mport java.utl.concurrent.ConcurrentLnkedQueue;
mport java.utl.concurrent.atomc.AtomcBoolean;
mport java.utl.stream.Collectors;
mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE;
mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE;
mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_RECOVERY_START_NODE_STRING;
mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING;
mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_START_NODES;
mport statc org.apache.dolphnscheduler.common.Constants.DEFAULT_WORKER_GROUP;
mport statc org.apache.dolphnscheduler.plugn.task.ap.TaskConstants.TASK_TYPE_BLOCKING;
/**
* master exec thread,splt dag
*/
publc class WorkflowExecuteThread {
/**
* logger of WorkflowExecuteThread
*/
prvate statc fnal Logger logger = LoggerFactory.getLogger(WorkflowExecuteThread.class);
/**
* master confg
*/
prvate MasterConfg masterConfg;
/**
* process servce
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | prvate ProcessServce processServce;
/**
* alert manager
*/
prvate ProcessAlertManager processAlertManager;
/**
* netty executor manager
*/
prvate NettyExecutorManager nettyExecutorManager;
/**
* process nstance
*/
prvate ProcessInstance processInstance;
/**
* process defnton
*/
prvate ProcessDefnton processDefnton;
/**
* the object of DAG
*/
prvate DAG<Strng, TaskNode, TaskNodeRelaton> dag;
/**
* key of workflow
*/
prvate Strng key;
/**
* start flag, true: start nodes submt completely
*/
prvate boolean sStart = false;
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | * submt falure nodes
*/
prvate boolean taskFaledSubmt = false;
/**
* task nstance hash map, taskId as key
*/
prvate Map<Integer, TaskInstance> taskInstanceMap = new ConcurrentHashMap<>();
/**
* runnng taskProcessor, taskCode as key, taskProcessor as value
* only on taskProcessor per taskCode
*/
prvate fnal Map<Long, ITaskProcessor> actveTaskProcessorMaps = new ConcurrentHashMap<>();
/**
* vald task map, taskCode as key, taskId as value
* n a DAG, only one taskInstance per taskCode s vald
*/
prvate Map<Long, Integer> valdTaskMap = new ConcurrentHashMap<>();
/**
* error task map, taskCode as key, taskInstanceId as value
* n a DAG, only one taskInstance per taskCode s vald
*/
prvate Map<Long, Integer> errorTaskMap = new ConcurrentHashMap<>();
/**
* complete task map, taskCode as key, taskInstanceId as value
* n a DAG, only one taskInstance per taskCode s vald
*/
prvate Map<Long, Integer> completeTaskMap = new ConcurrentHashMap<>();
/**
* depend faled task map, taskCode as key, taskId as value
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | prvate Map<Long, Integer> dependFaledTaskMap = new ConcurrentHashMap<>();
/**
* forbdden task map, code as key
*/
prvate Map<Long, TaskNode> forbddenTaskMap = new ConcurrentHashMap<>();
/**
* skp task map, code as key
*/
prvate Map<Strng, TaskNode> skpTaskNodeMap = new ConcurrentHashMap<>();
/**
* complement date lst
*/
prvate Lst<Date> complementLstDate = Lsts.newLnkedLst();
/**
* state event queue
*/
prvate ConcurrentLnkedQueue<StateEvent> stateEvents = new ConcurrentLnkedQueue<>();
/**
* ready to submt task queue
*/
prvate PeerTaskInstancePrortyQueue readyToSubmtTaskQueue = new PeerTaskInstancePrortyQueue();
/**
* wat to retry taskInstance map, taskCode as key, taskInstance as value
* before retry, the taskInstance d s 0
*/
prvate Map<Long, TaskInstance> watToRetryTaskInstanceMap = new ConcurrentHashMap<>();
/**
* state wheel execute thread
*/
prvate StateWheelExecuteThread stateWheelExecuteThread; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | /**
* constructor of WorkflowExecuteThread
*
* @param processInstance processInstance
* @param processServce processServce
* @param nettyExecutorManager nettyExecutorManager
* @param processAlertManager processAlertManager
* @param masterConfg masterConfg
* @param stateWheelExecuteThread stateWheelExecuteThread
*/
publc WorkflowExecuteThread(ProcessInstance processInstance
, ProcessServce processServce
, NettyExecutorManager nettyExecutorManager
, ProcessAlertManager processAlertManager
, MasterConfg masterConfg
, StateWheelExecuteThread stateWheelExecuteThread) {
ths.processServce = processServce;
ths.processInstance = processInstance;
ths.masterConfg = masterConfg;
ths.nettyExecutorManager = nettyExecutorManager;
ths.processAlertManager = processAlertManager;
ths.stateWheelExecuteThread = stateWheelExecuteThread;
}
/**
* the process start nodes are submtted completely.
*/
publc boolean sStart() {
return ths.sStart;
}
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | * handle event
*/
publc vod handleEvents() {
f (!sStart) {
return;
}
whle (!ths.stateEvents.sEmpty()) {
try {
StateEvent stateEvent = ths.stateEvents.peek();
f (stateEventHandler(stateEvent)) {
ths.stateEvents.remove(stateEvent);
}
} catch (Excepton e) {
logger.error("state handle error:", e);
}
}
}
publc Strng getKey() {
f (StrngUtls.sNotEmpty(key)
|| ths.processDefnton == null) {
return key;
}
key = Strng.format("%d_%d_%d",
ths.processDefnton.getCode(),
ths.processDefnton.getVerson(),
ths.processInstance.getId());
return key;
}
publc boolean addStateEvent(StateEvent stateEvent) {
f (processInstance.getId() != stateEvent.getProcessInstanceId()) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | logger.nfo("state event would be abounded :{}", stateEvent.toStrng());
return false;
}
ths.stateEvents.add(stateEvent);
return true;
}
publc nt eventSze() {
return ths.stateEvents.sze();
}
publc ProcessInstance getProcessInstance() {
return ths.processInstance;
}
prvate boolean stateEventHandler(StateEvent stateEvent) {
logger.nfo("process event: {}", stateEvent.toStrng());
f (!checkProcessInstance(stateEvent)) {
return false;
}
boolean result = false;
swtch (stateEvent.getType()) {
case PROCESS_STATE_CHANGE:
result = processStateChangeHandler(stateEvent);
break;
case TASK_STATE_CHANGE:
result = taskStateChangeHandler(stateEvent);
break;
case PROCESS_TIMEOUT:
result = processTmeout();
break;
case TASK_TIMEOUT:
result = taskTmeout(stateEvent); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | break;
case WAIT_TASK_GROUP:
result = checkForceStartAndWakeUp(stateEvent);
break;
case TASK_RETRY:
result = taskRetryEventHandler(stateEvent);
break;
case PROCESS_BLOCKED:
result = processBlockHandler(stateEvent);
break;
default:
break;
}
f (result) {
ths.stateEvents.remove(stateEvent);
}
return result;
}
prvate boolean checkForceStartAndWakeUp(StateEvent stateEvent) {
TaskGroupQueue taskGroupQueue = ths.processServce.loadTaskGroupQueue(stateEvent.getTaskInstanceId());
f (taskGroupQueue.getForceStart() == Flag.YES.getCode()) {
TaskInstance taskInstance = ths.processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId());
ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskInstance.getTaskCode());
ProcessInstance processInstance = ths.processServce.fndProcessInstanceById(taskInstance.getProcessInstanceId());
taskProcessor.nt(taskInstance, processInstance);
taskProcessor.acton(TaskActon.DISPATCH);
ths.processServce.updateTaskGroupQueueStatus(taskGroupQueue.getId(), TaskGroupQueueStatus.ACQUIRE_SUCCESS.getCode());
return true;
}
f (taskGroupQueue.getInQueue() == Flag.YES.getCode()) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | boolean acqureTaskGroup = processServce.acqureTaskGroupAgan(taskGroupQueue);
f (acqureTaskGroup) {
TaskInstance taskInstance = ths.processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId());
ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskInstance.getTaskCode());
ProcessInstance processInstance = ths.processServce.fndProcessInstanceById(taskInstance.getProcessInstanceId());
taskProcessor.nt(taskInstance, processInstance);
taskProcessor.acton(TaskActon.DISPATCH);
return true;
}
}
return false;
}
prvate boolean taskTmeout(StateEvent stateEvent) {
f (!checkTaskInstanceByStateEvent(stateEvent)) {
return true;
}
TaskInstance taskInstance = taskInstanceMap.get(stateEvent.getTaskInstanceId());
f (TmeoutFlag.CLOSE == taskInstance.getTaskDefne().getTmeoutFlag()) {
return true;
}
TaskTmeoutStrategy taskTmeoutStrategy = taskInstance.getTaskDefne().getTmeoutNotfyStrategy();
f (TaskTmeoutStrategy.FAILED == taskTmeoutStrategy) {
ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskInstance.getTaskCode());
taskProcessor.acton(TaskActon.TIMEOUT);
} else {
ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId());
processAlertManager.sendTaskTmeoutAlert(processInstance, taskInstance, projectUser);
}
return true;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | prvate boolean processTmeout() {
ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId());
ths.processAlertManager.sendProcessTmeoutAlert(ths.processInstance, projectUser);
return true;
}
prvate boolean taskStateChangeHandler(StateEvent stateEvent) {
f (!checkTaskInstanceByStateEvent(stateEvent)) {
return true;
}
TaskInstance task = getTaskInstance(stateEvent.getTaskInstanceId());
f (task.getState() == null) {
logger.error("task state s null, state handler error: {}", stateEvent);
return true;
}
f (task.getState().typeIsFnshed()) {
f (completeTaskMap.contansKey(task.getTaskCode()) && completeTaskMap.get(task.getTaskCode()) == task.getId()) {
return true;
}
taskFnshed(task);
f (task.getTaskGroupId() > 0) {
releaseTaskGroup(task);
}
return true;
}
f (actveTaskProcessorMaps.contansKey(task.getTaskCode())) {
ITaskProcessor TaskProcessor = actveTaskProcessorMaps.get(task.getTaskCode());
TaskProcessor.acton(TaskActon.RUN);
f (TaskProcessor.taskInstance().getState().typeIsFnshed()) {
f (TaskProcessor.taskInstance().getState() != task.getState()) {
task.setState(TaskProcessor.taskInstance().getState()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | }
taskFnshed(task);
}
return true;
}
logger.error("state handler error: {}", stateEvent);
return true;
}
prvate vod taskFnshed(TaskInstance taskInstance) {
logger.nfo("work flow {} task d:{} code:{} state:{} ",
processInstance.getId(),
taskInstance.getId(),
taskInstance.getTaskCode(),
taskInstance.getState());
actveTaskProcessorMaps.remove(taskInstance.getTaskCode());
stateWheelExecuteThread.removeTask4TmeoutCheck(processInstance, taskInstance);
stateWheelExecuteThread.removeTask4RetryCheck(processInstance, taskInstance);
stateWheelExecuteThread.removeTask4StateCheck(processInstance, taskInstance);
f (taskInstance.getState().typeIsSuccess()) {
completeTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId());
processServce.saveProcessInstance(processInstance);
f (!processInstance.sBlocked()) {
submtPostNode(Long.toStrng(taskInstance.getTaskCode()));
}
} else f (taskInstance.taskCanRetry() && processInstance.getState() != ExecutonStatus.READY_STOP) {
retryTaskInstance(taskInstance);
} else f (taskInstance.getState().typeIsFalure()) {
completeTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId());
f (taskInstance.sCondtonsTask() |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | || DagHelper.haveCondtonsAfterNode(Long.toStrng(taskInstance.getTaskCode()), dag)
|| DagHelper.haveBlockngAfterNode(Long.toStrng(taskInstance.getTaskCode()), dag)) {
submtPostNode(Long.toStrng(taskInstance.getTaskCode()));
} else {
errorTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId());
f (processInstance.getFalureStrategy() == FalureStrategy.END) {
kllAllTasks();
}
}
} else f (taskInstance.getState().typeIsFnshed()) {
completeTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId());
}
ths.updateProcessInstanceState();
}
/**
* release task group
*
* @param taskInstance
*/
prvate vod releaseTaskGroup(TaskInstance taskInstance) {
f (taskInstance.getTaskGroupId() > 0) {
TaskInstance nextTaskInstance = ths.processServce.releaseTaskGroup(taskInstance);
f (nextTaskInstance != null) {
f (nextTaskInstance.getProcessInstanceId() == taskInstance.getProcessInstanceId()) {
StateEvent nextEvent = new StateEvent();
nextEvent.setProcessInstanceId(ths.processInstance.getId());
nextEvent.setTaskInstanceId(nextTaskInstance.getId());
nextEvent.setType(StateEventType.WAIT_TASK_GROUP);
ths.stateEvents.add(nextEvent);
} else { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | ProcessInstance processInstance = ths.processServce.fndProcessInstanceById(nextTaskInstance.getProcessInstanceId());
ths.processServce.sendStartTask2Master(processInstance, nextTaskInstance.getId(),
org.apache.dolphnscheduler.remote.command.CommandType.TASK_WAKEUP_EVENT_REQUEST);
}
}
}
}
/**
* crate new task nstance to retry, dfferent objects from the orgnal
*
* @param taskInstance
*/
prvate vod retryTaskInstance(TaskInstance taskInstance) {
f (!taskInstance.taskCanRetry()) {
return;
}
TaskInstance newTaskInstance = cloneRetryTaskInstance(taskInstance);
f (newTaskInstance == null) {
logger.error("retry fal, new taskInstancce s null, task code:{}, task d:{}", taskInstance.getTaskCode(), taskInstance.getId());
return;
}
watToRetryTaskInstanceMap.put(newTaskInstance.getTaskCode(), newTaskInstance);
f (!taskInstance.retryTaskIntervalOverTme()) {
logger.nfo("falure task wll be submtted: process d: {}, task nstance code: {} state:{} retry tmes:{} / {}, nterval:{}",
processInstance.getId(),
newTaskInstance.getTaskCode(),
newTaskInstance.getState(),
newTaskInstance.getRetryTmes(),
newTaskInstance.getMaxRetryTmes(),
newTaskInstance.getRetryInterval()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | stateWheelExecuteThread.addTask4TmeoutCheck(processInstance, newTaskInstance);
stateWheelExecuteThread.addTask4RetryCheck(processInstance, newTaskInstance);
} else {
addTaskToStandByLst(newTaskInstance);
submtStandByTask();
watToRetryTaskInstanceMap.remove(newTaskInstance.getTaskCode());
}
}
/**
* handle task retry event
*
* @param stateEvent
* @return
*/
prvate boolean taskRetryEventHandler(StateEvent stateEvent) {
TaskInstance taskInstance = watToRetryTaskInstanceMap.get(stateEvent.getTaskCode());
addTaskToStandByLst(taskInstance);
submtStandByTask();
watToRetryTaskInstanceMap.remove(stateEvent.getTaskCode());
return true;
}
/**
* update process nstance
*/
publc vod refreshProcessInstance(nt processInstanceId) {
logger.nfo("process nstance update: {}", processInstanceId);
processInstance = processServce.fndProcessInstanceById(processInstanceId);
processDefnton = processServce.fndProcessDefnton(processInstance.getProcessDefntonCode(),
processInstance.getProcessDefntonVerson());
processInstance.setProcessDefnton(processDefnton); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | }
/**
* update task nstance
*/
publc vod refreshTaskInstance(nt taskInstanceId) {
logger.nfo("task nstance update: {} ", taskInstanceId);
TaskInstance taskInstance = processServce.fndTaskInstanceById(taskInstanceId);
f (taskInstance == null) {
logger.error("can not fnd task nstance, d:{}", taskInstanceId);
return;
}
processServce.packageTaskInstance(taskInstance, processInstance);
taskInstanceMap.put(taskInstance.getId(), taskInstance);
valdTaskMap.remove(taskInstance.getTaskCode());
f (Flag.YES == taskInstance.getFlag()) {
valdTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId());
}
}
/**
* check process nstance by state event
*/
publc boolean checkProcessInstance(StateEvent stateEvent) {
f (ths.processInstance.getId() != stateEvent.getProcessInstanceId()) {
logger.error("msmatch process nstance d: {}, state event:{}",
ths.processInstance.getId(),
stateEvent);
return false;
}
return true;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | /**
* check f task nstance exst by state event
*/
publc boolean checkTaskInstanceByStateEvent(StateEvent stateEvent) {
f (stateEvent.getTaskInstanceId() == 0) {
logger.error("task nstance d null, state event:{}", stateEvent);
return false;
}
f (!taskInstanceMap.contansKey(stateEvent.getTaskInstanceId())) {
logger.error("msmatch task nstance d, event:{}", stateEvent);
return false;
}
return true;
}
/**
* check f task nstance exst by task code
*/
publc boolean checkTaskInstanceByCode(long taskCode) {
f (taskInstanceMap == null || taskInstanceMap.sze() == 0) {
return false;
}
for (TaskInstance taskInstance : taskInstanceMap.values()) {
f (taskInstance.getTaskCode() == taskCode) {
return true;
}
}
return false;
}
/**
* check f task nstance exst by d |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | */
publc boolean checkTaskInstanceById(nt taskInstanceId) {
f (taskInstanceMap == null || taskInstanceMap.sze() == 0) {
return false;
}
return taskInstanceMap.contansKey(taskInstanceId);
}
/**
* get task nstance from memory
*/
publc TaskInstance getTaskInstance(nt taskInstanceId) {
f (taskInstanceMap.contansKey(taskInstanceId)) {
return taskInstanceMap.get(taskInstanceId);
}
return null;
}
publc TaskInstance getActveTaskInstanceByTaskCode(long taskCode) {
f (actveTaskProcessorMaps.contansKey(taskCode)) {
return actveTaskProcessorMaps.get(taskCode).taskInstance();
}
return null;
}
publc TaskInstance getRetryTaskInstanceByTaskCode(long taskCode) {
f (watToRetryTaskInstanceMap.contansKey(taskCode)) {
return watToRetryTaskInstanceMap.get(taskCode);
}
return null;
}
prvate boolean processStateChangeHandler(StateEvent stateEvent) {
try { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | logger.nfo("process:{} state {} change to {}", processInstance.getId(), processInstance.getState(), stateEvent.getExecutonStatus());
f (stateEvent.getExecutonStatus() == ExecutonStatus.STOP) {
ths.updateProcessInstanceState(stateEvent);
return true;
}
f (processComplementData()) {
return true;
}
f (stateEvent.getExecutonStatus().typeIsFnshed()) {
endProcess();
}
f (processInstance.getState() == ExecutonStatus.READY_STOP) {
kllAllTasks();
}
return true;
} catch (Excepton e) {
logger.error("process state change error:", e);
}
return true;
}
prvate boolean processBlockHandler(StateEvent stateEvent) {
try {
TaskInstance task = getTaskInstance(stateEvent.getTaskInstanceId());
f (!checkTaskInstanceByStateEvent(stateEvent)) {
logger.error("task {} s not a blockng task", task.getTaskCode());
return false;
}
BlockngParameters parameters = JSONUtls.parseObject(task.getTaskParams(), BlockngParameters.class);
f (parameters.sAlertWhenBlockng()) {
ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | processAlertManager.sendProcessBlockngAlert(processInstance, projectUser);
logger.nfo("processInstance {} block alert send successful!", processInstance.getId());
}
} catch (Excepton e) {
logger.error("sendng blockng message error:", e);
}
return true;
}
prvate boolean processComplementData() throws Excepton {
f (!needComplementProcess()) {
return false;
}
f (processInstance.getState() == ExecutonStatus.READY_STOP) {
return false;
}
Date scheduleDate = processInstance.getScheduleTme();
f (scheduleDate == null) {
scheduleDate = complementLstDate.get(0);
} else f (processInstance.getState().typeIsFnshed()) {
endProcess();
f (complementLstDate.sze() <= 0) {
logger.nfo("process complement end. process d:{}", processInstance.getId());
return true;
}
nt ndex = complementLstDate.ndexOf(scheduleDate);
f (ndex >= complementLstDate.sze() - 1 || !processInstance.getState().typeIsSuccess()) {
logger.nfo("process complement end. process d:{}", processInstance.getId());
return true;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | logger.nfo("process complement contnue. process d:{}, schedule tme:{} complementLstDate:{}",
processInstance.getId(),
processInstance.getScheduleTme(),
complementLstDate.toStrng());
scheduleDate = complementLstDate.get(ndex + 1);
}
nt create = ths.createComplementDataCommand(scheduleDate);
f (create > 0) {
logger.nfo("create complement data command successfully.");
}
return true;
}
prvate nt createComplementDataCommand(Date scheduleDate) {
Command command = new Command();
command.setScheduleTme(scheduleDate);
command.setCommandType(CommandType.COMPLEMENT_DATA);
command.setProcessDefntonCode(processInstance.getProcessDefntonCode());
Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam());
f (cmdParam.contansKey(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING)) {
cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING);
}
cmdParam.replace(CMDPARAM_COMPLEMENT_DATA_START_DATE, DateUtls.format(scheduleDate, "yyyy-MM-dd HH:mm:ss", null));
command.setCommandParam(JSONUtls.toJsonStrng(cmdParam));
command.setTaskDependType(processInstance.getTaskDependType());
command.setFalureStrategy(processInstance.getFalureStrategy());
command.setWarnngType(processInstance.getWarnngType());
command.setWarnngGroupId(processInstance.getWarnngGroupId());
command.setStartTme(new Date());
command.setExecutorId(processInstance.getExecutorId()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 9,396 | [Feature][Parameter Context] Support output parameters transfer from parent workflow to child work flow | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
We have supported global parameters transfer from parent workflow to sub-process, however, the transfer of output parameters is not supported.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/9396 | https://github.com/apache/dolphinscheduler/pull/9410 | 14d71d1462508817f20d20a6274a0f52b89d126a | b285ccf9306cc5e402a184dd24da82ca7a08689c | 2022-04-08T02:56:49Z | java | 2022-04-11T12:03:16Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | command.setUpdateTme(new Date());
command.setProcessInstanceProrty(processInstance.getProcessInstanceProrty());
command.setWorkerGroup(processInstance.getWorkerGroup());
command.setEnvronmentCode(processInstance.getEnvronmentCode());
command.setDryRun(processInstance.getDryRun());
command.setProcessInstanceId(0);
command.setProcessDefntonVerson(processInstance.getProcessDefntonVerson());
return processServce.createCommand(command);
}
prvate boolean needComplementProcess() {
f (processInstance.sComplementData()
&& Flag.NO == processInstance.getIsSubProcess()) {
return true;
}
return false;
}
/**
* process start handle
*/
publc vod startProcess() {
f (ths.taskInstanceMap.sze() > 0) {
return;
}
try {
sStart = false;
buldFlowDag();
ntTaskQueue();
submtPostNode(null);
sStart = true;
} catch (Excepton e) { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.