Ver Fonte

Merge branch 'master' of https://github.com/xuxueli/xxl-job

xuxueli há 5 anos atrás
pai
commit
ada47e5aef

+ 2 - 2
doc/XXL-JOB-English-Documentation.md

@@ -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;

+ 1 - 1
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java

@@ -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]);
 			}

+ 0 - 2
xxl-job-admin/src/main/java/com/xxl/job/admin/core/cron/CronExpression.java

@@ -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;

+ 1 - 1
xxl-job-admin/src/main/java/com/xxl/job/admin/core/old/RemoteHttpJobBean.java

@@ -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

+ 1 - 1
xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteLRU.java

@@ -35,7 +35,7 @@ public class ExecutorRouteLRU extends ExecutorRouter {
         if (lruItem == null) {
             /**
              * LinkedHashMap
-             *      a、accessOrder:ture=访问顺序排序(get/put时排序);false=插入顺序排期;
+             *      a、accessOrder:true=访问顺序排序(get/put时排序);false=插入顺序排期;
              *      b、removeEldestEntry:新增元素时将会调用,返回true时会删除最老元素;可封装LinkedHashMap并重写该方法,比如定义最大容量,超出是返回true即可实现固定长度的LRU算法;
              */
             lruItem = new LinkedHashMap<String, String>(16, 0.75f, true);

+ 5 - 5
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobScheduleHelper.java

@@ -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(){

+ 2 - 2
xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/LocalCacheUtil.java

@@ -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);

+ 1 - 1
xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobRegistryDao.java

@@ -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);
 

+ 5 - 5
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/AdminBizImpl.java

@@ -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

+ 3 - 3
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java

@@ -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 - 8
xxl-job-core/src/main/java/com/xxl/job/core/biz/model/RegistryParam.java

@@ -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 + '\'' +
                 '}';