Merge 1f7d99837b into a13eacd61c
This commit is contained in:
commit
8e88f9ef08
|
|
@ -31,6 +31,7 @@ import org.apache.dolphinscheduler.plugin.storage.api.StorageConfiguration;
|
|||
import org.apache.dolphinscheduler.plugin.task.api.TaskPluginManager;
|
||||
import org.apache.dolphinscheduler.registry.api.RegistryConfiguration;
|
||||
import org.apache.dolphinscheduler.scheduler.api.SchedulerApi;
|
||||
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
|
||||
import org.apache.dolphinscheduler.server.master.metrics.MasterServerMetrics;
|
||||
import org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient;
|
||||
import org.apache.dolphinscheduler.server.master.registry.MasterSlotManager;
|
||||
|
|
@ -91,6 +92,9 @@ public class MasterServer implements IStoppable {
|
|||
@Autowired
|
||||
private TaskGroupCoordinator taskGroupCoordinator;
|
||||
|
||||
@Autowired
|
||||
private MasterConfig masterConfig;
|
||||
|
||||
public static void main(String[] args) {
|
||||
MasterServerMetrics.registerUncachedException(DefaultUncaughtExceptionHandler::getUncaughtExceptionCount);
|
||||
|
||||
|
|
@ -122,7 +126,9 @@ public class MasterServer implements IStoppable {
|
|||
this.eventExecuteService.start();
|
||||
this.failoverExecuteThread.start();
|
||||
|
||||
this.schedulerApi.start();
|
||||
if (masterConfig.isSchedulerEnabled()) {
|
||||
this.schedulerApi.start();
|
||||
}
|
||||
this.taskGroupCoordinator.start();
|
||||
|
||||
MasterServerMetrics.registerMasterCpuUsageGauge(() -> {
|
||||
|
|
|
|||
|
|
@ -83,6 +83,10 @@ public class MasterConfig implements Validator {
|
|||
* task submit retry interval.
|
||||
*/
|
||||
private Duration taskCommitInterval = Duration.ofSeconds(1);
|
||||
/**
|
||||
* if scheduler is enabled to schedule job on master
|
||||
*/
|
||||
private boolean schedulerEnabled = true;
|
||||
/**
|
||||
* state wheel check interval, if this value is bigger, may increase the delay of task/processInstance.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ registry:
|
|||
|
||||
master:
|
||||
listen-port: 5678
|
||||
# Whether to enable the master trigger scheduler.
|
||||
scheduler-enabled: true
|
||||
# master prepare execute thread number to limit handle commands in parallel
|
||||
pre-exec-threads: 10
|
||||
# master execute thread number to limit process instances in parallel
|
||||
|
|
|
|||
Loading…
Reference in New Issue