提交 ea1c653e 编写于 作者: L lenboo

merge from dev

......@@ -23,6 +23,9 @@ server.servlet.session.timeout=7200
server.servlet.context-path=/dolphinscheduler/
# Set time zone
spring.jackson.time-zone=GMT+8
# file size limit for upload
spring.servlet.multipart.max-file-size=1024MB
spring.servlet.multipart.max-request-size=1024MB
......
......@@ -40,10 +40,8 @@ public class DependentUtils {
case AND:
if(dependResultList.contains(DependResult.FAILED)){
dependResult = DependResult.FAILED;
}else if(dependResultList.contains(DependResult.WAITING)){
} if(dependResultList.contains(DependResult.WAITING)){
dependResult = DependResult.WAITING;
}else{
dependResult = DependResult.SUCCESS;
}
break;
case OR:
......
......@@ -49,12 +49,11 @@ public class IpUtils {
ipNumbers[2] = ipLong >> 8 & tmp;
ipNumbers[3] = ipLong & tmp;
StringBuilder sb = new StringBuilder(16);
sb.append(ipNumbers[0]).append(DOT)
.append(ipNumbers[1]).append(DOT)
.append(ipNumbers[2]).append(DOT)
.append(ipNumbers[3]);
return sb.toString();
String sb = ipNumbers[0] + DOT +
ipNumbers[1] + DOT +
ipNumbers[2] + DOT +
ipNumbers[3];
return sb;
}
}
......@@ -22,7 +22,6 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
......@@ -96,11 +95,11 @@ public class SchemaUtils {
String[] schemaVersionArr = schemaVersion.split("\\.");
String[] versionArr = version.split("\\.");
int arrLength = schemaVersionArr.length < versionArr.length ? schemaVersionArr.length : versionArr.length;
int arrLength = Math.min(schemaVersionArr.length, versionArr.length);
for(int i = 0 ; i < arrLength ; i++) {
if(Integer.valueOf(schemaVersionArr[i]) > Integer.valueOf(versionArr[i])) {
if(Integer.parseInt(schemaVersionArr[i]) > Integer.parseInt(versionArr[i])) {
return true;
}else if(Integer.valueOf(schemaVersionArr[i]) < Integer.valueOf(versionArr[i])) {
}else if(Integer.parseInt(schemaVersionArr[i]) < Integer.parseInt(versionArr[i])) {
return false;
}
}
......@@ -121,9 +120,6 @@ public class SchemaUtils {
} catch (FileNotFoundException e) {
logger.error(e.getMessage(),e);
throw new RuntimeException("Failed to get the product version description file. The file could not be found", e);
} catch (IOException e) {
logger.error(e.getMessage(),e);
throw new RuntimeException("Failed to get product version number description file, failed to read the file", e);
}
return soft_version;
}
......
......@@ -270,16 +270,9 @@ public class SqlTask extends AbstractTask {
String result = JSONUtils.toJsonString(resultJSONArray);
logger.debug("execute sql : {}", result);
// if there is a result set
if (!resultJSONArray.isEmpty(null) ) {
if (StringUtils.isNotEmpty(sqlParameters.getTitle())) {
sendAttachment(sqlParameters.getTitle(),
JSONUtils.toJsonString(resultJSONArray));
}else{
sendAttachment(taskExecutionContext.getTaskName() + " query resultsets ",
JSONUtils.toJsonString(resultJSONArray));
}
}
sendAttachment(StringUtils.isNotEmpty(sqlParameters.getTitle()) ?
sqlParameters.getTitle(): taskExecutionContext.getTaskName() + " query result sets",
JSONUtils.toJsonString(resultJSONArray));
}
/**
......
......@@ -32,7 +32,6 @@ import org.apache.dolphinscheduler.server.zk.SpringZKServer;
import org.apache.dolphinscheduler.service.bean.SpringApplicationContext;
import org.apache.dolphinscheduler.service.process.ProcessService;
import org.apache.dolphinscheduler.service.queue.TaskPriorityQueue;
import org.apache.dolphinscheduler.service.queue.TaskPriorityQueueImpl;
import org.apache.dolphinscheduler.service.zk.ZookeeperCachedOperator;
import org.apache.dolphinscheduler.service.zk.ZookeeperConfig;
import org.junit.Before;
......@@ -233,8 +232,7 @@ public class TaskPriorityQueueConsumerTest {
dataSource.setConnectionParams("{\"address\":\"jdbc:mysql://192.168.221.185:3306\",\"database\":\"dolphinscheduler_qiaozhanwei\",\"jdbcUrl\":\"jdbc:mysql://192.168.221.185:3306/dolphinscheduler_qiaozhanwei\",\"user\":\"root\",\"password\":\"root@123\"}");
dataSource.setCreateTime(new Date());
dataSource.setUpdateTime(new Date());
Mockito.when(processService.findDataSourceById(1)).thenReturn(dataSource);
Mockito.doReturn(dataSource).when(processService).findDataSourceById(1);
Thread.sleep(10000);
}
......
......@@ -26,7 +26,7 @@
<span>{{$t('User Name')}}</span>
</th>
<th>
<span>用户类型</span>
<span>{{$t('User Type')}}</span>
</th>
<th>
<span>{{$t('Tenant')}}</span>
......
......@@ -181,6 +181,7 @@ export default {
Tenant: 'Tenant',
Email: 'Email',
Phone: 'Phone',
'User Type':'User Type',
'Please enter phone number': 'Please enter phone number',
'Please enter main class': 'Please enter main class',
'Please enter email': 'Please enter email',
......
......@@ -184,6 +184,7 @@ export default {
Tenant: '租户',
Email: '邮件',
Phone: '手机',
'User Type':'用户类型',
'Please enter phone number': '请输入手机',
'Please enter email': '请输入邮箱',
'Please enter the correct email format': '请输入正确的邮箱格式',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册