Selaa lähdekoodia

Merge pull request #1282 from Zhouchuanwen/master

许雪里 5 vuotta sitten
vanhempi
commit
f7c67b4da7
No account linked to committer's email

+ 2 - 2
doc/XXL-JOB-English-Documentation.md Näytä tiedosto

@@ -19,8 +19,8 @@ XXL-JOB is a lightweight distributed task scheduling framework, the core design
19 19
 - 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
20 20
 - 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
21 21
 - 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;
22
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
23
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
22
+- 4.Executor HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
23
+- 5.Task Failover: Deploy the Excutor cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
24 24
 - 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
25 25
 - 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
26 26
 - 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 Näytä tiedosto

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

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

@@ -952,7 +952,6 @@ public final class CronExpression implements Serializable, Cloneable {
952 952
 
953 953
     protected int skipWhiteSpace(int i, String s) {
954 954
         for (; i < s.length() && (s.charAt(i) == ' ' || s.charAt(i) == '\t'); i++) {
955
-            ;
956 955
         }
957 956
 
958 957
         return i;
@@ -960,7 +959,6 @@ public final class CronExpression implements Serializable, Cloneable {
960 959
 
961 960
     protected int findNextWhiteSpace(int i, String s) {
962 961
         for (; i < s.length() && (s.charAt(i) != ' ' || s.charAt(i) != '\t'); i++) {
963
-            ;
964 962
         }
965 963
 
966 964
         return i;

+ 1 - 1
xxl-job-admin/src/main/java/com/xxl/job/admin/core/old/RemoteHttpJobBean.java Näytä tiedosto

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

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

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

@@ -93,7 +93,7 @@ public class JobScheduleHelper {
93 93
 
94 94
                                     // 1、trigger
95 95
                                     JobTriggerPoolHelper.trigger(jobInfo.getId(), TriggerTypeEnum.CRON, -1, null, null);
96
-                                    logger.debug(">>>>>>>>>>> xxl-job, shecule push trigger : jobId = " + jobInfo.getId() );
96
+                                    logger.debug(">>>>>>>>>>> xxl-job, schedule push trigger : jobId = " + jobInfo.getId() );
97 97
 
98 98
                                     // 2、fresh next
99 99
                                     refreshNextValidTime(jobInfo, new Date());
@@ -175,9 +175,9 @@ public class JobScheduleHelper {
175 175
                         if (null != preparedStatement) {
176 176
                             try {
177 177
                                 preparedStatement.close();
178
-                            } catch (SQLException ignore) {
178
+                            } catch (SQLException e) {
179 179
                                 if (!scheduleThreadToStop) {
180
-                                    logger.error(ignore.getMessage(), ignore);
180
+                                    logger.error(e.getMessage(), e);
181 181
                                 }
182 182
                             }
183 183
                         }
@@ -236,7 +236,7 @@ public class JobScheduleHelper {
236 236
 
237 237
                         // ring trigger
238 238
                         logger.debug(">>>>>>>>>>> xxl-job, time-ring beat : " + nowSecond + " = " + Arrays.asList(ringItemData) );
239
-                        if (ringItemData!=null && ringItemData.size()>0) {
239
+                        if (ringItemData.size() > 0) {
240 240
                             // do trigger
241 241
                             for (int jobId: ringItemData) {
242 242
                                 // do trigger
@@ -289,7 +289,7 @@ public class JobScheduleHelper {
289 289
         }
290 290
         ringItemData.add(jobId);
291 291
 
292
-        logger.debug(">>>>>>>>>>> xxl-job, shecule push time-ring : " + ringSecond + " = " + Arrays.asList(ringItemData) );
292
+        logger.debug(">>>>>>>>>>> xxl-job, schedule push time-ring : " + ringSecond + " = " + Arrays.asList(ringItemData) );
293 293
     }
294 294
 
295 295
     public void toStop(){

+ 2 - 2
xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/LocalCacheUtil.java Näytä tiedosto

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

+ 1 - 1
xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobRegistryDao.java Näytä tiedosto

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

+ 5 - 5
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/AdminBizImpl.java Näytä tiedosto

@@ -129,15 +129,15 @@ public class AdminBizImpl implements AdminBiz {
129 129
     public ReturnT<String> registry(RegistryParam registryParam) {
130 130
 
131 131
         // valid
132
-        if (!StringUtils.hasText(registryParam.getRegistGroup())
132
+        if (!StringUtils.hasText(registryParam.getRegistryGroup())
133 133
                 || !StringUtils.hasText(registryParam.getRegistryKey())
134 134
                 || !StringUtils.hasText(registryParam.getRegistryValue())) {
135 135
             return new ReturnT<String>(ReturnT.FAIL_CODE, "Illegal Argument.");
136 136
         }
137 137
 
138
-        int ret = xxlJobRegistryDao.registryUpdate(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date());
138
+        int ret = xxlJobRegistryDao.registryUpdate(registryParam.getRegistryGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date());
139 139
         if (ret < 1) {
140
-            xxlJobRegistryDao.registrySave(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date());
140
+            xxlJobRegistryDao.registrySave(registryParam.getRegistryGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date());
141 141
 
142 142
             // fresh
143 143
             freshGroupRegistryInfo(registryParam);
@@ -149,13 +149,13 @@ public class AdminBizImpl implements AdminBiz {
149 149
     public ReturnT<String> registryRemove(RegistryParam registryParam) {
150 150
 
151 151
         // valid
152
-        if (!StringUtils.hasText(registryParam.getRegistGroup())
152
+        if (!StringUtils.hasText(registryParam.getRegistryGroup())
153 153
                 || !StringUtils.hasText(registryParam.getRegistryKey())
154 154
                 || !StringUtils.hasText(registryParam.getRegistryValue())) {
155 155
             return new ReturnT<String>(ReturnT.FAIL_CODE, "Illegal Argument.");
156 156
         }
157 157
 
158
-        int ret = xxlJobRegistryDao.registryDelete(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
158
+        int ret = xxlJobRegistryDao.registryDelete(registryParam.getRegistryGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
159 159
         if (ret > 0) {
160 160
 
161 161
             // fresh

+ 3 - 3
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java Näytä tiedosto

@@ -291,18 +291,18 @@ public class XxlJobServiceImpl implements XxlJobService {
291 291
 		int jobLogSuccessCount = xxlJobLogDao.triggerCountByHandleCode(ReturnT.SUCCESS_CODE);
292 292
 
293 293
 		// executor count
294
-		Set<String> executerAddressSet = new HashSet<String>();
294
+		Set<String> executorAddressSet = new HashSet<String>();
295 295
 		List<XxlJobGroup> groupList = xxlJobGroupDao.findAll();
296 296
 
297 297
 		if (groupList!=null && !groupList.isEmpty()) {
298 298
 			for (XxlJobGroup group: groupList) {
299 299
 				if (group.getRegistryList()!=null && !group.getRegistryList().isEmpty()) {
300
-					executerAddressSet.addAll(group.getRegistryList());
300
+					executorAddressSet.addAll(group.getRegistryList());
301 301
 				}
302 302
 			}
303 303
 		}
304 304
 
305
-		int executorCount = executerAddressSet.size();
305
+		int executorCount = executorAddressSet.size();
306 306
 
307 307
 		Map<String, Object> dashboardMap = new HashMap<String, Object>();
308 308
 		dashboardMap.put("jobInfoCount", jobInfoCount);

+ 8 - 8
xxl-job-core/src/main/java/com/xxl/job/core/biz/model/RegistryParam.java Näytä tiedosto

@@ -8,23 +8,23 @@ import java.io.Serializable;
8 8
 public class RegistryParam implements Serializable {
9 9
     private static final long serialVersionUID = 42L;
10 10
 
11
-    private String registGroup;
11
+    private String registryGroup;
12 12
     private String registryKey;
13 13
     private String registryValue;
14 14
 
15 15
     public RegistryParam(){}
16
-    public RegistryParam(String registGroup, String registryKey, String registryValue) {
17
-        this.registGroup = registGroup;
16
+    public RegistryParam(String registryGroup, String registryKey, String registryValue) {
17
+        this.registryGroup = registryGroup;
18 18
         this.registryKey = registryKey;
19 19
         this.registryValue = registryValue;
20 20
     }
21 21
 
22
-    public String getRegistGroup() {
23
-        return registGroup;
22
+    public String getRegistryGroup() {
23
+        return registryGroup;
24 24
     }
25 25
 
26
-    public void setRegistGroup(String registGroup) {
27
-        this.registGroup = registGroup;
26
+    public void setRegistryGroup(String registryGroup) {
27
+        this.registryGroup = registryGroup;
28 28
     }
29 29
 
30 30
     public String getRegistryKey() {
@@ -46,7 +46,7 @@ public class RegistryParam implements Serializable {
46 46
     @Override
47 47
     public String toString() {
48 48
         return "RegistryParam{" +
49
-                "registGroup='" + registGroup + '\'' +
49
+                "registryGroup='" + registryGroup + '\'' +
50 50
                 ", registryKey='" + registryKey + '\'' +
51 51
                 ", registryValue='" + registryValue + '\'' +
52 52
                 '}';