use of org.apache.samza.rest.proxy.installation.InstallationFinder in project samza by apache.
the class SamzaTaskProxyFactory method getTaskProxy.
@Override
public TaskProxy getTaskProxy(TaskResourceConfig config) {
String installationsPath = config.getInstallationsPath();
Preconditions.checkArgument(StringUtils.isNotEmpty(installationsPath), String.format("Config param %s is not defined.", BaseResourceConfig.CONFIG_JOB_INSTALLATIONS_PATH));
String configFactoryClass = config.getJobConfigFactory();
try {
InstallationFinder installFinder = new SimpleInstallationFinder(installationsPath, ClassLoaderHelper.fromClassName(configFactoryClass));
return new SamzaTaskProxy(config, installFinder);
} catch (Exception e) {
LOG.error(String.format("Exception during instantiation through configFactory class: %s.", configFactoryClass), e);
throw new SamzaException(e);
}
}
Aggregations