Merge pull request #1282 from Zhouchuanwen/master

Fix typos and modify unreasonable var's name
2.1.2
许雪里 5 years ago committed by GitHub
commit f7c67b4da7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,8 +19,8 @@ XXL-JOB is a lightweight distributed task scheduling framework, the core design
- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose failover;
- 4.Executor HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
- 5.Task Failover: Deploy the Excutor cluster,tasks will be smooth to switch excuter when the strategy of the router choose failover;
- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;

@ -96,7 +96,7 @@ public class JobLogController {
Date triggerTimeEnd = null;
if (filterTime!=null && filterTime.trim().length()>0) {
String[] temp = filterTime.split(" - ");
if (temp!=null && temp.length == 2) {
if (temp.length == 2) {
triggerTimeStart = DateUtil.parseDateTime(temp[0]);
triggerTimeEnd = DateUtil.parseDateTime(temp[1]);
}

@ -952,7 +952,6 @@ public final class CronExpression implements Serializable, Cloneable {
protected int skipWhiteSpace(int i, String s) {
for (; i < s.length() && (s.charAt(i) == ' ' || s.charAt(i) == '\t'); i++) {
;
}
return i;
@ -960,7 +959,6 @@ public final class CronExpression implements Serializable, Cloneable {
protected int findNextWhiteSpace(int i, String s) {
for (; i < s.length() && (s.charAt(i) != ' ' || s.charAt(i) != '\t'); i++) {
;
}
return i;

@ -11,7 +11,7 @@
//
///**
// * http job bean
// * “@DisallowConcurrentExecution” diable concurrent, thread size can not be only one, better given more
// * “@DisallowConcurrentExecution” disable concurrent, thread size can not be only one, better given more
// * @author xuxueli 2015-12-17 18:20:34
// */
////@DisallowConcurrentExecution

@ -35,7 +35,7 @@ public class ExecutorRouteLRU extends ExecutorRouter {
if (lruItem == null) {
/**
* LinkedHashMap
* aaccessOrderture=访get/putfalse=
* aaccessOrdertrue=访get/putfalse=
* bremoveEldestEntrytrueLinkedHashMaptrueLRU
*/
lruItem = new LinkedHashMap<String, String>(16, 0.75f, true);

@ -93,7 +93,7 @@ public class JobScheduleHelper {
// 1、trigger
JobTriggerPoolHelper.trigger(jobInfo.getId(), TriggerTypeEnum.CRON, -1, null, null);
logger.debug(">>>>>>>>>>> xxl-job, shecule push trigger : jobId = " + jobInfo.getId() );
logger.debug(">>>>>>>>>>> xxl-job, schedule push trigger : jobId = " + jobInfo.getId() );
// 2、fresh next
refreshNextValidTime(jobInfo, new Date());
@ -175,9 +175,9 @@ public class JobScheduleHelper {
if (null != preparedStatement) {
try {
preparedStatement.close();
} catch (SQLException ignore) {
} catch (SQLException e) {
if (!scheduleThreadToStop) {
logger.error(ignore.getMessage(), ignore);
logger.error(e.getMessage(), e);
}
}
}
@ -236,7 +236,7 @@ public class JobScheduleHelper {
// ring trigger
logger.debug(">>>>>>>>>>> xxl-job, time-ring beat : " + nowSecond + " = " + Arrays.asList(ringItemData) );
if (ringItemData!=null && ringItemData.size()>0) {
if (ringItemData.size() > 0) {
// do trigger
for (int jobId: ringItemData) {
// do trigger
@ -289,7 +289,7 @@ public class JobScheduleHelper {
}
ringItemData.add(jobId);
logger.debug(">>>>>>>>>>> xxl-job, shecule push time-ring : " + ringSecond + " = " + Arrays.asList(ringItemData) );
logger.debug(">>>>>>>>>>> xxl-job, schedule push time-ring : " + ringSecond + " = " + Arrays.asList(ringItemData) );
}
public void toStop(){

@ -62,7 +62,7 @@ public class LocalCacheUtil {
public static boolean set(String key, Object val, long cacheTime){
// clean timeout cache, before set new cache (avoid cache too much)
cleanTimeutCache();
cleanTimeoutCache();
// set new cache
if (key==null || key.trim().length()==0) {
@ -118,7 +118,7 @@ public class LocalCacheUtil {
*
* @return
*/
public static boolean cleanTimeutCache(){
public static boolean cleanTimeoutCache(){
if (!cacheRepository.keySet().isEmpty()) {
for (String key: cacheRepository.keySet()) {
LocalCacheData localCacheData = cacheRepository.get(key);

@ -31,7 +31,7 @@ public interface XxlJobRegistryDao {
@Param("registryValue") String registryValue,
@Param("updateTime") Date updateTime);
public int registryDelete(@Param("registryGroup") String registGroup,
public int registryDelete(@Param("registryGroup") String registryGroup,
@Param("registryKey") String registryKey,
@Param("registryValue") String registryValue);

@ -129,15 +129,15 @@ public class AdminBizImpl implements AdminBiz {
public ReturnT<String> registry(RegistryParam registryParam) {
// valid
if (!StringUtils.hasText(registryParam.getRegistGroup())
if (!StringUtils.hasText(registryParam.getRegistryGroup())
|| !StringUtils.hasText(registryParam.getRegistryKey())
|| !StringUtils.hasText(registryParam.getRegistryValue())) {
return new ReturnT<String>(ReturnT.FAIL_CODE, "Illegal Argument.");
}
int ret = xxlJobRegistryDao.registryUpdate(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date());
int ret = xxlJobRegistryDao.registryUpdate(registryParam.getRegistryGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date());
if (ret < 1) {
xxlJobRegistryDao.registrySave(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date());
xxlJobRegistryDao.registrySave(registryParam.getRegistryGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date());
// fresh
freshGroupRegistryInfo(registryParam);
@ -149,13 +149,13 @@ public class AdminBizImpl implements AdminBiz {
public ReturnT<String> registryRemove(RegistryParam registryParam) {
// valid
if (!StringUtils.hasText(registryParam.getRegistGroup())
if (!StringUtils.hasText(registryParam.getRegistryGroup())
|| !StringUtils.hasText(registryParam.getRegistryKey())
|| !StringUtils.hasText(registryParam.getRegistryValue())) {
return new ReturnT<String>(ReturnT.FAIL_CODE, "Illegal Argument.");
}
int ret = xxlJobRegistryDao.registryDelete(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
int ret = xxlJobRegistryDao.registryDelete(registryParam.getRegistryGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
if (ret > 0) {
// fresh

@ -291,18 +291,18 @@ public class XxlJobServiceImpl implements XxlJobService {
int jobLogSuccessCount = xxlJobLogDao.triggerCountByHandleCode(ReturnT.SUCCESS_CODE);
// executor count
Set<String> executerAddressSet = new HashSet<String>();
Set<String> executorAddressSet = new HashSet<String>();
List<XxlJobGroup> groupList = xxlJobGroupDao.findAll();
if (groupList!=null && !groupList.isEmpty()) {
for (XxlJobGroup group: groupList) {
if (group.getRegistryList()!=null && !group.getRegistryList().isEmpty()) {
executerAddressSet.addAll(group.getRegistryList());
executorAddressSet.addAll(group.getRegistryList());
}
}
}
int executorCount = executerAddressSet.size();
int executorCount = executorAddressSet.size();
Map<String, Object> dashboardMap = new HashMap<String, Object>();
dashboardMap.put("jobInfoCount", jobInfoCount);

@ -8,23 +8,23 @@ import java.io.Serializable;
public class RegistryParam implements Serializable {
private static final long serialVersionUID = 42L;
private String registGroup;
private String registryGroup;
private String registryKey;
private String registryValue;
public RegistryParam(){}
public RegistryParam(String registGroup, String registryKey, String registryValue) {
this.registGroup = registGroup;
public RegistryParam(String registryGroup, String registryKey, String registryValue) {
this.registryGroup = registryGroup;
this.registryKey = registryKey;
this.registryValue = registryValue;
}
public String getRegistGroup() {
return registGroup;
public String getRegistryGroup() {
return registryGroup;
}
public void setRegistGroup(String registGroup) {
this.registGroup = registGroup;
public void setRegistryGroup(String registryGroup) {
this.registryGroup = registryGroup;
}
public String getRegistryKey() {
@ -46,7 +46,7 @@ public class RegistryParam implements Serializable {
@Override
public String toString() {
return "RegistryParam{" +
"registGroup='" + registGroup + '\'' +
"registryGroup='" + registryGroup + '\'' +
", registryKey='" + registryKey + '\'' +
", registryValue='" + registryValue + '\'' +
'}';

Loading…
Cancel
Save