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()