Package co.cask.cdap.api.service

Examples of co.cask.cdap.api.service.ServiceWorkerSpecification


    this.discoveryServiceClient = discoveryServiceClient;
  }

  @Override
  public TwillRunnableSpecification configure() {
    ServiceWorkerSpecification workerSpecification = worker.configure();
    Map<String, String> runnableArgs = Maps.newHashMap(workerSpecification.getProperties());
    if (worker instanceof GuavaServiceWorker) {
      runnableArgs.put("delegate.class.name", ((GuavaServiceWorker) worker).getDelegate().getClass().getName());
    }
    runnableArgs.put("service.class.name", workerSpecification.getClassName());

    // Serialize and store the datasets that have explicitly been granted access to.
    String serializedDatasets = GSON.toJson(datasets, new TypeToken<Set<String>>() { }.getType());
    runnableArgs.put("service.datasets", serializedDatasets);
    return TwillRunnableSpecification.Builder.with()
View Full Code Here

TOP

Related Classes of co.cask.cdap.api.service.ServiceWorkerSpecification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.