use of co.cask.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").build()));
taskRunner = new ScheduleTaskRunner(lifecycleService, propertiesResolver, taskExecutorService, namespaceQueryAdmin, cConf);
int numPartitions = Schedulers.getJobQueue(multiThreadDatasetCache, datasetFramework).getNumPartitions();
for (int partition = 0; partition < numPartitions; partition++) {
taskExecutorService.submit(new ConstraintCheckerThread(partition));
}
LOG.info("Started ConstraintCheckerService. state: " + state());
}
Aggregations