Search in sources :

Example 1 with DefaultWorkerConfigurer

use of co.cask.cdap.internal.app.worker.DefaultWorkerConfigurer in project cdap by caskdata.

the class DefaultAppConfigurer method addWorker.

@Override
public void addWorker(Worker worker) {
    Preconditions.checkArgument(worker != null, "Worker cannot be null.");
    DefaultWorkerConfigurer configurer = new DefaultWorkerConfigurer(worker, deployNamespace, artifactId, artifactRepository, pluginInstantiator);
    worker.configure(configurer);
    addDatasetsAndPlugins(configurer);
    WorkerSpecification spec = configurer.createSpecification();
    workers.put(spec.getName(), spec);
}
Also used : WorkerSpecification(co.cask.cdap.api.worker.WorkerSpecification) DefaultWorkerConfigurer(co.cask.cdap.internal.app.worker.DefaultWorkerConfigurer)

Aggregations

WorkerSpecification (co.cask.cdap.api.worker.WorkerSpecification)1 DefaultWorkerConfigurer (co.cask.cdap.internal.app.worker.DefaultWorkerConfigurer)1