Search in sources :

Example 1 with DefaultWorkerConfigurer

use of io.cdap.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, pluginFinder, pluginInstantiator, runtimeInfo, getFeatureFlagsProvider());
    worker.configure(configurer);
    addDatasetsAndPlugins(configurer);
    WorkerSpecification spec = configurer.createSpecification();
    workers.put(spec.getName(), spec);
}
Also used : WorkerSpecification(io.cdap.cdap.api.worker.WorkerSpecification) DefaultWorkerConfigurer(io.cdap.cdap.internal.app.worker.DefaultWorkerConfigurer)

Example 2 with DefaultWorkerConfigurer

use of io.cdap.cdap.internal.app.worker.DefaultWorkerConfigurer in project cdap by cdapio.

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, pluginFinder, pluginInstantiator, runtimeInfo, getFeatureFlagsProvider());
    worker.configure(configurer);
    addDatasetsAndPlugins(configurer);
    WorkerSpecification spec = configurer.createSpecification();
    workers.put(spec.getName(), spec);
}
Also used : WorkerSpecification(io.cdap.cdap.api.worker.WorkerSpecification) DefaultWorkerConfigurer(io.cdap.cdap.internal.app.worker.DefaultWorkerConfigurer)

Aggregations

WorkerSpecification (io.cdap.cdap.api.worker.WorkerSpecification)2 DefaultWorkerConfigurer (io.cdap.cdap.internal.app.worker.DefaultWorkerConfigurer)2