}
@Override
public DirectDataSource newInstance() throws IOException, InterruptedException {
try {
AbstractDirectDataSource instance = profile.getTargetClass().getConstructor().newInstance();
if (instance instanceof Configurable) {
((Configurable) instance).setConf(configuration);
}
instance.configure(profile);
return instance;
} catch (Exception e) {
throw new IOException(MessageFormat.format(
"Failed to create data source instance: {0} ({1})",
PREFIX + profile.getId(),