use of io.cdap.cdap.internal.app.runtime.schedule.ScheduleTaskRunner in project cdap by caskdata.
the class ConstraintCheckerService method startUp.
@Override
protected void startUp() throws Exception {
LOG.info("Starting ConstraintCheckerService.");
taskExecutorService = MoreExecutors.listeningDecorator(Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("constraint-checker-task-%d").build()));
taskRunner = new ScheduleTaskRunner(store, lifecycleService, propertiesResolver, namespaceQueryAdmin, cConf);
int numPartitions = cConf.getInt(Constants.Scheduler.JOB_QUEUE_NUM_PARTITIONS);
for (int partition = 0; partition < numPartitions; partition++) {
taskExecutorService.submit(new ConstraintCheckerThread(partition));
}
LOG.info("Started ConstraintCheckerService. state: " + state());
}
Aggregations