Browse Source

change chinese to english (#1202)

* add ConnectionFactoryTest and ConnectionFactory read datasource from appliction.yml

* .escheduler_env.sh to dolphinscheduler_env.sh

* dao yml assembly to conf directory

* table name modify

* entity title table  name modify

* logback log name modify

* running through the big process

* running through the big process error modify

* logback log name modify

* data_source.properties rename

* logback log name modify

* install.sh optimization

* install.sh optimization

* command count modify

* command state update

* countCommandState sql update

* countCommandState sql update

* remove application.yml file

* master.properties modify

* install.sh modify

* install.sh modify

* api server startup modify

* the current user quits and the session is completely emptied. bug fix

* remove pom package resources

* checkQueueNameExist method update

* checkQueueExist

* install.sh error output update

* signOut error update

* ProcessDao is null bug fix

* install.sh add mail.user

* request url variables replace

* process define import bug fix

* process define import export bug fix

* processdefine import export bug fix

* down log suffix format modify

* import export process define contains crontab error bug fix

* add Flink local mode

* ProcessDao is null bug fix

* loadAverage display problem bug fix

* MasterServer rename Server

* rollback .env

* rollback .env

* MasterServer rename Server

* the task is abnormal and task is running bug fix

* owners and administrators can delete

* dockerfile optimization

* dockerfile optimization

* dockerfile optimization

* remove application-alert.properties

* task log print worker log bug fix

* remove .escheduler_env.sh

* change dockerfile email address

* dockerfile dao application.properties and install.sh modify

* application.properties modify

* application.properties modify

* dockerfile startup.sh modify

* remove docs

* nginx conf modify

* dockerfile application.properties modify

* dockerfile email address change

* the alert module is modified in English.

* alert server comment and chinese modify

* api server useless code and chinese modify

* common,dao,server useless code and chinese modify

* change chinese to english
pull/2/head
qiaozhanwei 5 years ago committed by dailidong
parent
commit
a6e185049c
  1. 4
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProjectService.java
  2. 1
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
  3. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/queue/TaskQueueZkImpl.java
  4. 3
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java
  5. 4
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/SchemaUtils.java
  6. 5
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/ScriptRunner.java
  7. 20
      dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/JSONUtilsTest.java
  8. 10
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/ProcessDao.java
  9. 2
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/TaskRecordDao.java
  10. 12
      dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/cron/CronUtilsTest.java
  11. 10
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/quartz/DruidConnectionProvider.java
  12. 1
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java
  13. 1
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKWorkerClient.java

4
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProjectService.java

@ -117,8 +117,6 @@ public class ProjectService extends BaseService{
/**
* check project and authorization
* 检查项目权限
*
* @param loginUser
* @param project
* @param projectName
@ -155,8 +153,6 @@ public class ProjectService extends BaseService{
/**
* admin can view all projects
* 如果是管理员,则所有项目都可见
*
* @param loginUser
* @param pageSize
* @param pageNo

1
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java

@ -108,7 +108,6 @@ public class ResourcesService extends BaseService {
if (!StringUtils.equals(fileSuffix, nameSuffix)) {
/**
* rename file suffix and original suffix must be consistent
* 重命名的后缀必须与原文件后缀一致
*/
logger.error("rename file suffix and original suffix must be consistent: {}", file.getOriginalFilename());
putMsg(result, Status.RESOURCE_SUFFIX_FORBID_CHANGE);

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/queue/TaskQueueZkImpl.java

@ -137,7 +137,6 @@ public class TaskQueueZkImpl extends AbstractZKClient implements ITaskQueue {
* ${processInstancePriority}_${processInstanceId}_${taskInstancePriority}_${taskId}_host1,host2,...
* The tasks with the highest priority are selected by comparing the priorities of the above four levels from high to low.
*
* 流程优先级_流程实例id_任务优先级_任务id_任务执行的机器id1,任务执行的机器id2,... high <- low
* @param key task queue name
* @param tasksNum how many elements to poll
* @return the task ids to be executed

3
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java

@ -214,8 +214,7 @@ public class JSONUtils {
}
/**
* 对象装json字符串 <p>
*
* object to json string
* @return json string
*/
public static String toJsonString(Object object) {

4
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/SchemaUtils.java

@ -41,7 +41,6 @@ public class SchemaUtils {
private static Pattern p = Pattern.compile("\\s*|\t|\r|\n");
/**
* 获取所有upgrade目录下的可升级的schema
* Gets upgradable schemas for all upgrade directories
* @return
*/
@ -86,7 +85,6 @@ public class SchemaUtils {
}
/**
* 判断schemaVersion是否比version版本高
* Determine whether schemaVersion is higher than version
* @param schemaVersion
* @param version
@ -108,7 +106,6 @@ public class SchemaUtils {
}
}
// 说明直到第arrLength-1个元素,两个版本号都一样,此时谁的arrLength大,谁的版本号就大
// If the version and schema version is the same from 0 up to the arrlength-1 element,whoever has a larger arrLength has a larger version number
return schemaVersionArr.length > versionArr.length;
}
@ -133,7 +130,6 @@ public class SchemaUtils {
}
/**
* 去掉字符串中的空格回车换行和制表符
* Strips the string of space carriage returns and tabs
* @param str
* @return

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

@ -167,9 +167,6 @@ public class ScriptRunner {
command.append(line.substring(0, line.lastIndexOf(getDelimiter())));
command.append(" ");
Statement statement = conn.createStatement();
// logger.info(command.toString());
boolean hasResults = false;
logger.info("sql:"+command.toString());
if (stopOnError) {
@ -253,8 +250,6 @@ public class ScriptRunner {
command.append(" ");
Statement statement = conn.createStatement();
// logger.info(command.toString());
sql = command.toString().replaceAll("\\{\\{APPDB\\}\\}", dbName);
boolean hasResults = false;
logger.info("sql : " + sql);

20
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/JSONUtilsTest.java

@ -67,21 +67,21 @@ public class JSONUtilsTest {
LinkedHashMap.class);
Assert.assertEquals(maps.size(), 1);
Assert.assertEquals(maps.get(0).get("mysql服务名称"), "mysql200");
Assert.assertEquals(maps.get(0).get("mysql地址"), "192.168.xx.xx");
Assert.assertEquals(maps.get(0).get("端口"), "3306");
Assert.assertEquals(maps.get(0).get("期间内没有使用索引的查询数握"), "80");
Assert.assertEquals(maps.get(0).get("数据库客户端连接数"), "190");
Assert.assertEquals(maps.get(0).get("mysql service name"), "mysql200");
Assert.assertEquals(maps.get(0).get("mysql address"), "192.168.xx.xx");
Assert.assertEquals(maps.get(0).get("port"), "3306");
Assert.assertEquals(maps.get(0).get("no index of number"), "80");
Assert.assertEquals(maps.get(0).get("database client connections"), "190");
}
public String list2String(){
LinkedHashMap<String, String> map1 = new LinkedHashMap<>();
map1.put("mysql服务名称","mysql200");
map1.put("mysql地址","192.168.xx.xx");
map1.put("端口","3306");
map1.put("期间内没有使用索引的查询数握","80");
map1.put("数据库客户端连接数","190");
map1.put("mysql service name","mysql200");
map1.put("mysql address","192.168.xx.xx");
map1.put("port","3306");
map1.put("no index of number","80");
map1.put("database client connections","190");
List<LinkedHashMap<String, String>> maps = new ArrayList<>();
maps.add(0,map1);

10
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/ProcessDao.java

@ -247,7 +247,7 @@ public class ProcessDao extends AbstractBaseDao {
int processInstanceId = cmdParamObj.getInteger(CMDPARAM_RECOVER_PROCESS_ID_STRING);
List<Command> commands = commandMapper.selectList(null);
//遍历所有命令
// for all commands
for (Command tmpCommand:commands){
if(cmdTypeMap.containsKey(tmpCommand.getCommandType())){
tempObj = (JSONObject) JSONObject.parse(tmpCommand.getCommandParam());
@ -637,7 +637,7 @@ public class ProcessDao extends AbstractBaseDao {
ExecutionStatus.KILL);
suspendedNodeList.addAll(stopNodeList);
for(Integer taskId : suspendedNodeList){
// 把暂停状态初始化
// initialize the pause state
initTaskInstance(this.findTaskInstanceById(taskId));
}
cmdParam.put(Constants.CMDPARAM_RECOVERY_START_NODE_STRING, String.join(",", convertIntListToString(suspendedNodeList)));
@ -1561,7 +1561,7 @@ public class ProcessDao extends AbstractBaseDao {
*
* @param masterId
* @param processDefinitionId
* @param scheduledFireTime 任务调度预计触发的时间
* @param scheduledFireTime the time the task schedule is expected to trigger
* @return
* @throws Exception
*/
@ -1576,7 +1576,7 @@ public class ProcessDao extends AbstractBaseDao {
* get dependency cycle list by work process define id list and scheduler fire time
* @param masterId
* @param ids
* @param scheduledFireTime 任务调度预计触发的时间
* @param scheduledFireTime the time the task schedule is expected to trigger
* @return
* @throws Exception
*/
@ -1597,7 +1597,7 @@ public class ProcessDao extends AbstractBaseDao {
Cron depCron;
List<Date> list;
List<Schedule> schedules = this.selectAllByProcessDefineId(ids);
// for all scheduling info
// for all scheduling information
for(Schedule depSchedule:schedules){
strCrontab = depSchedule.getCrontab();
depCronExpression = CronUtils.parse2CronExpression(strCrontab);

2
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/TaskRecordDao.java

@ -77,7 +77,7 @@ public class TaskRecordDao {
String password = conf.getString(Constants.TASK_RECORD_PWD);
Connection conn = null;
try {
//classLoader,加载对应驱动
//classLoader,load driver
Class.forName(driver);
conn = DriverManager.getConnection(url, username, password);
} catch (ClassNotFoundException e) {

12
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/cron/CronUtilsTest.java

@ -52,7 +52,7 @@ public class CronUtilsTest {
.withSecond(on(0))
.instance();
// Obtain the string expression
String cronAsString = cron.asString(); // 0 */5 * * * ? * Every five minutes(每5分钟一次)
String cronAsString = cron.asString(); // 0 */5 * * * ? * Every five minutes(once every 5 minutes)
Assert.assertEquals(cronAsString, "0 */5 * * * ? *");
@ -103,7 +103,7 @@ public class CronUtilsTest {
.withSecond(on(0))
.instance();
String cronAsString = cron1.asString(); // 0 */5 * * * ? * 每5分钟一次
String cronAsString = cron1.asString(); // 0 */5 * * * ? * once every 5 minutes
//logger.info(cronAsString);
// Obtain the string expression
//String minCrontab = "0 0 * * * ? *";
@ -113,13 +113,13 @@ public class CronUtilsTest {
//String minCrontab = "* 0,3 2 SUN * 1#1 *";
//String minCrontab = "* 0,3 * 1W * ? *";
//cron = CronUtils.parse2Cron("0 * * * * ? *");
// 月份周期
// month cycle
/*String[] cronArayy = new String[]{"* 0,3 * 1W * ? *","* 0 0 1W * ? *",
"0 0 0 L 3/5 ? *","0 0 0 ? 3/5 2/2 *"};*/
// 分钟周期
// minute cycle
String[] cronArayy = new String[]{"* * * * * ? *","* 0 * * * ? *",
"* 5 * * 3/5 ? *","0 0 * * * ? *"};
// 周周期
// week cycle
/*String[] cronArayy = new String[]{"* * * ? * 2/1 *","0 *//*5 * ? * 2/1 *",
"* * *//*5 ? * 2/1 *"};*/
for(String minCrontab:cronArayy){
@ -164,9 +164,7 @@ public class CronUtilsTest {
logger.info("dayOfWeekField instanceof And:"+(dayOfWeekField.getExpression() instanceof And));
logger.info("dayOfWeekField instanceof QuestionMark:"+(dayOfWeekField.getExpression() instanceof QuestionMark));
CronField yearField = cron.retrieve(CronFieldName.YEAR);
//CycleEnum cycleEnum = CronUtils.getMaxCycle("0 * * * * ? *");
CycleEnum cycleEnum = CronUtils.getMaxCycle(minCrontab);
if(cycleEnum !=null){
logger.info(cycleEnum.name());

10
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/quartz/DruidConnectionProvider.java

@ -98,12 +98,17 @@ public class DruidConnectionProvider implements ConnectionProvider {
*/
private DruidDataSource datasource;
@Override
public Connection getConnection() throws SQLException {
return datasource.getConnection();
}
@Override
public void shutdown() throws SQLException {
datasource.close();
}
@Override
public void initialize() throws SQLException{
if (this.URL == null) {
throw new SQLException("DBPool could not be created: DB URL cannot be null");
@ -132,10 +137,11 @@ public class DruidConnectionProvider implements ConnectionProvider {
datasource.setMaxPoolPreparedStatementPerConnectionSize(DEFAULT_DB_MAX_CONNECTIONS);
if (this.validationQuery != null) {
datasource.setValidationQuery(this.validationQuery);
if(!this.validateOnCheckout)
if(!this.validateOnCheckout){
datasource.setTestOnReturn(true);
else
} else {
datasource.setTestOnBorrow(true);
}
datasource.setValidationQueryTimeout(this.idleConnectionValidationSeconds);
}
}

1
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java

@ -138,6 +138,7 @@ public class ZKMasterClient extends AbstractZKClient {
}
}
@Override
public void close(){
try {
if(masterPathChildrenCache != null){

1
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKWorkerClient.java

@ -75,6 +75,7 @@ public class ZKWorkerClient extends AbstractZKClient {
this.registWorker();
}
@Override
public void close(){
try {
if(workerPathChildrenCache != null){

Loading…
Cancel
Save