Browse Source

Merge pull request #424 from qiaozhanwei/branch-1.0.2

email address trim and shell error does not determine yarn status
pull/2/head
乔占卫 6 years ago committed by GitHub
parent
commit
f8b98d3cee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md
  2. 8
      escheduler-server/src/main/java/cn/escheduler/server/worker/task/AbstractCommandExecutor.java
  3. 6
      escheduler-server/src/main/java/cn/escheduler/server/worker/task/sql/SqlTask.java

2
README.md

@ -1,4 +1,4 @@
Easy Scheduler
Easy Scheduler
============
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)

8
escheduler-server/src/main/java/cn/escheduler/server/worker/task/AbstractCommandExecutor.java

@ -213,7 +213,7 @@ public abstract class AbstractCommandExecutor {
*/
private int updateState(ProcessDao processDao, int exitStatusCode, int pid, int taskInstId) {
//get yarn state by log
if (exitStatusCode != -1) {
if (exitStatusCode != 0) {
TaskInstance taskInstance = processDao.findTaskInstanceById(taskInstId);
logger.info("process id is {}", pid);
@ -548,10 +548,4 @@ public abstract class AbstractCommandExecutor {
protected abstract boolean checkShowLog(String line);
protected abstract boolean checkFindApp(String line);
protected abstract void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException;
// if(line.contains(taskAppId) || !line.contains("cn.escheduler.server.worker.log.TaskLogger")){
// logs.add(line);
// }
}

6
escheduler-server/src/main/java/cn/escheduler/server/worker/task/sql/SqlTask.java

@ -347,14 +347,14 @@ public class SqlTask extends AbstractTask {
// receiving group list
List<String> receviersList = new ArrayList<String>();
for(User user:users){
receviersList.add(user.getEmail());
receviersList.add(user.getEmail().trim());
}
// custom receiver
String receivers = sqlParameters.getReceivers();
if (StringUtils.isNotEmpty(receivers)){
String[] splits = receivers.split(Constants.COMMA);
for (String receiver : splits){
receviersList.add(receiver);
receviersList.add(receiver.trim());
}
}
@ -365,7 +365,7 @@ public class SqlTask extends AbstractTask {
if (StringUtils.isNotEmpty(receiversCc)){
String[] splits = receiversCc.split(Constants.COMMA);
for (String receiverCc : splits){
receviersCcList.add(receiverCc);
receviersCcList.add(receiverCc.trim());
}
}

Loading…
Cancel
Save