use of org.apache.nifi.annotation.lifecycle.OnDisabled in project kylo by Teradata.
the class MetadataProviderSelectorService method onDisabled.
@OnDisabled
public void onDisabled(final ConfigurationContext context) {
getSpringContextService(context).ifPresent(springService -> {
CancelActiveWaterMarkEventConsumer waterMarkConsumer = springService.getBean(CancelActiveWaterMarkEventConsumer.class);
waterMarkConsumer.removeMetadataRecorder(this.recorder);
FeedInitializationChangeEventConsumer initChangeConsumer = springService.getBean(FeedInitializationChangeEventConsumer.class);
initChangeConsumer.addMetadataRecorder(this.recorder);
});
}
use of org.apache.nifi.annotation.lifecycle.OnDisabled in project nifi by apache.
the class LivySessionController method shutdown.
@OnDisabled
public void shutdown() {
ComponentLog log = getLogger();
try {
enabled = false;
livySessionManagerThread.interrupt();
livySessionManagerThread.join();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.error("Livy Session Manager Thread interrupted");
}
}
Aggregations