Skip to content

Commit b9ae393

Browse files
committed
vipshop#290 code review commit
1 parent 284d983 commit b9ae393

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

saturn-it/src/test/java/com/vip/saturn/it/impl/ShardingWithTrafficIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public static void tearDown() throws Exception {
4747
*/
4848
@Test
4949
public void test_A_NormalFlow() throws Exception {
50-
String jobName = "test_A_Extract";
51-
String jobName2 = "test_A_Extract2";
50+
String jobName = "test_A_NormalFlow";
51+
String jobName2 = "test_A_NormalFlow2";
5252

5353
final JobConfiguration jobConfiguration = new JobConfiguration(jobName);
5454
jobConfiguration.setCron("* * * * * ? 2099");

saturn-job-sharding/src/main/java/com/vip/saturn/job/sharding/listener/ExecutorTrafficTriggerShardingListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void childEvent(Type type, String path, String nodeData) throws Exception
2323
try {
2424
if (isExecutorNoTraffic(type, path)) {
2525
String executorName = SaturnExecutorsNode.getExecutorNameByNoTrafficPath(path);
26-
namespaceShardingService.asyncShardingWhenExecutorExtractTraffic(executorName);
26+
namespaceShardingService.asyncShardingWhenExtractExecutorTraffic(executorName);
2727
} else if (isExecutorTraffic(type, path)) {
2828
String executorName = SaturnExecutorsNode.getExecutorNameByNoTrafficPath(path);
2929
namespaceShardingService.asyncShardingWhenRecoverExecutorTraffic(executorName);

saturn-job-sharding/src/main/java/com/vip/saturn/job/sharding/service/NamespaceShardingService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ protected boolean pick(List<String> allJobs, List<String> allEnableJobs, List<Sh
10741074
}
10751075

10761076
if (theExecutor == null) {
1077-
LOGGER.info("The executor {} is offline or already noTraffic, unnecessary to extract traffic", executorName);
1077+
LOGGER.warn("The executor {} maybe offline, unnecessary to extract traffic", executorName);
10781078
return false;
10791079
}
10801080

@@ -1123,7 +1123,7 @@ protected boolean pick(List<String> allJobs, List<String> allEnableJobs, List<Sh
11231123
}
11241124
}
11251125
if (theExecutor == null) {
1126-
LOGGER.info("The executor {} is offline, unnecessary to recover traffic", executorName);
1126+
LOGGER.warn("The executor {} maybe offline, unnecessary to recover traffic", executorName);
11271127
return false;
11281128
}
11291129

@@ -1696,7 +1696,7 @@ public void asyncShardingWhenExecutorOffline(String executorName) throws Excepti
16961696
/**
16971697
* 摘取流量
16981698
*/
1699-
public void asyncShardingWhenExecutorExtractTraffic(String executorName) throws Exception {
1699+
public void asyncShardingWhenExtractExecutorTraffic(String executorName) throws Exception {
17001700
if (isLeadership()) {
17011701
shardingCount.incrementAndGet();
17021702
executorService.submit(new ExecuteExtractTrafficShardingTask(executorName));

0 commit comments

Comments
 (0)