use of org.apache.gobblin.compaction.listeners.CompactorCompletionListenerFactory in project incubator-gobblin by apache.
the class MRCompactor method getCompactionCompleteListener.
private CompactorCompletionListener getCompactionCompleteListener() {
ClassAliasResolver<CompactorCompletionListenerFactory> classAliasResolver = new ClassAliasResolver<>(CompactorCompletionListenerFactory.class);
String listenerName = this.state.getProp(MRCompactor.COMPACTION_COMPLETE_LISTERNER, MRCompactor.DEFAULT_COMPACTION_COMPLETE_LISTERNER);
try {
CompactorCompletionListenerFactory factory = GobblinConstructorUtils.invokeFirstConstructor(classAliasResolver.resolveClass(listenerName), ImmutableList.of());
return factory.createCompactorCompactionListener(this.state);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException | ClassNotFoundException e) {
throw new IllegalArgumentException(e);
}
}
Aggregations