Loading dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterSchedulerThread.java +31 −29 Original line number Diff line number Diff line Loading @@ -98,7 +98,11 @@ public class MasterSchedulerThread implements Runnable { InterProcessMutex mutex = null; try { if(OSUtils.checkResource(masterConfig.getMasterMaxCpuloadAvg(), masterConfig.getMasterReservedMemory())){ boolean runCheckFlag = OSUtils.checkResource(masterConfig.getMasterMaxCpuloadAvg(), masterConfig.getMasterReservedMemory()); if(!runCheckFlag) { Thread.sleep(Constants.SLEEP_TIME_MILLIS); continue; } if (zkMasterClient.getZkClient().getState() == CuratorFrameworkState.STARTED) { // create distributed lock with the root node path of the lock space as /dolphinscheduler/lock/masters Loading @@ -124,13 +128,11 @@ public class MasterSchedulerThread implements Runnable { logger.error("scan command error ", e); processDao.moveToErrorCommand(command, e.toString()); } } else{ //indicate that no command ,sleep for 1s Thread.sleep(Constants.SLEEP_TIME_MILLIS); } } } // accessing the command table every SLEEP_TIME_MILLIS milliseconds Thread.sleep(Constants.SLEEP_TIME_MILLIS); }catch (Exception e){ logger.error("master scheduler thread exception : " + e.getMessage(),e); }finally{ Loading Loading
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterSchedulerThread.java +31 −29 Original line number Diff line number Diff line Loading @@ -98,7 +98,11 @@ public class MasterSchedulerThread implements Runnable { InterProcessMutex mutex = null; try { if(OSUtils.checkResource(masterConfig.getMasterMaxCpuloadAvg(), masterConfig.getMasterReservedMemory())){ boolean runCheckFlag = OSUtils.checkResource(masterConfig.getMasterMaxCpuloadAvg(), masterConfig.getMasterReservedMemory()); if(!runCheckFlag) { Thread.sleep(Constants.SLEEP_TIME_MILLIS); continue; } if (zkMasterClient.getZkClient().getState() == CuratorFrameworkState.STARTED) { // create distributed lock with the root node path of the lock space as /dolphinscheduler/lock/masters Loading @@ -124,13 +128,11 @@ public class MasterSchedulerThread implements Runnable { logger.error("scan command error ", e); processDao.moveToErrorCommand(command, e.toString()); } } else{ //indicate that no command ,sleep for 1s Thread.sleep(Constants.SLEEP_TIME_MILLIS); } } } // accessing the command table every SLEEP_TIME_MILLIS milliseconds Thread.sleep(Constants.SLEEP_TIME_MILLIS); }catch (Exception e){ logger.error("master scheduler thread exception : " + e.getMessage(),e); }finally{ Loading