use of com.thinkbiganalytics.provenance.kafka.KyloKafkaProvenanceEventService in project kylo by Teradata.
the class ProvenanceServiceFactory method getProvenanceEventService.
public static ProvenanceEventService getProvenanceEventService(SparkProvenanceConfiguration config) {
ProvenanceEventService service = null;
Map<String, String> params = new HashMap<>();
log.info("Creating a new Service of type {} ", config.getType());
if (config.getType() == SparkProvenanceConfiguration.Type.KAFKA) {
service = new KyloKafkaProvenanceEventService();
params.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, config.getConnectionUrl());
service.configure(params);
} else if (config.getType() == SparkProvenanceConfiguration.Type.JMS) {
service = new KyloJmsProvenanceEventService();
params.put(KyloJmsProvenanceEventService.JMS_URL_CONFIG, config.getConnectionUrl());
service.configure(params);
} else {
throw new UnsupportedOperationException("Unable to create Provenance Event service. Unknown Provenance Type for: " + config.getType());
}
return service;
}
Aggregations