File tree Expand file tree Collapse file tree 5 files changed +23
-4
lines changed
job-core/src/main/java/com/lts/job/core/cluster
job-tracker/src/main/java/com/lts/job/tracker Expand file tree Collapse file tree 5 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ protected void innerStart() {
3333 if (defaultProcessor != null ) {
3434
3535 remotingClient .registerDefaultProcessor (defaultProcessor ,
36- Executors .newFixedThreadPool (Constants .AVAILABLE_PROCESSOR * 2 ,
36+ Executors .newFixedThreadPool (32 + Constants .AVAILABLE_PROCESSOR * 5 ,
3737 new NamedThreadFactory (AbstractClientNode .class .getSimpleName ())));
3838 }
3939 }
Original file line number Diff line number Diff line change @@ -30,9 +30,8 @@ protected void innerStart() {
3030
3131 NettyRequestProcessor defaultProcessor = getDefaultProcessor ();
3232 if (defaultProcessor != null ) {
33-
3433 remotingServer .registerDefaultProcessor (defaultProcessor ,
35- Executors .newFixedThreadPool (Constants .AVAILABLE_PROCESSOR * 2 , new NamedThreadFactory (AbstractServerNode .class .getSimpleName ())));
34+ Executors .newFixedThreadPool (32 + Constants .AVAILABLE_PROCESSOR * 5 , new NamedThreadFactory (AbstractServerNode .class .getSimpleName ())));
3635 }
3736 }
3837
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public class JobPullProcessor extends AbstractProcessor {
3030 public JobPullProcessor (RemotingServerDelegate remotingServer , JobTrackerApplication application ) {
3131 super (remotingServer , application );
3232
33- executor = Executors .newFixedThreadPool (Constants .AVAILABLE_PROCESSOR * 2
33+ executor = Executors .newFixedThreadPool (Constants .AVAILABLE_PROCESSOR * 5
3434 , new NamedThreadFactory (JobPullProcessor .class .getSimpleName ()));
3535 jobDistributor = new JobDistributor (application );
3636 }
Original file line number Diff line number Diff line change @@ -84,10 +84,16 @@ public void stop() {
8484 }
8585 }
8686
87+ private volatile boolean isRunning = false ;
88+
8789 private class Runner implements Runnable {
8890 @ Override
8991 public void run () {
9092 try {
93+ if (isRunning ) {
94+ return ;
95+ }
96+ isRunning = true ;
9197 long count = application .getJobFeedbackQueue ().count ();
9298 if (count == 0 ) {
9399 return ;
@@ -119,6 +125,8 @@ public void run() {
119125
120126 } catch (Throwable t ) {
121127 LOGGER .error (t .getMessage (), t );
128+ } finally {
129+ isRunning = false ;
122130 }
123131 }
124132 }
Original file line number Diff line number Diff line change 3939 <druid .version>1.0.14</druid .version>
4040 <mysql .version>5.1.26</mysql .version>
4141 </properties >
42+ <distributionManagement >
43+ <repository >
44+ <id >nexus-releases</id >
45+ <name >Local Nexus Repository</name >
46+ <url >http://maven.superboss.cc:8081/nexus/content/repositories/releases</url >
47+ </repository >
48+ <snapshotRepository >
49+ <id >nexus-snapshots</id >
50+ <name >Local Nexus Repository</name >
51+ <url >http://maven.superboss.cc:8081/nexus/content/repositories/snapshots</url >
52+ </snapshotRepository >
53+ </distributionManagement >
4254
4355 <dependencyManagement >
4456 <dependencies >
You can’t perform that action at this time.
0 commit comments