Search in sources :

Example 1 with KyloKafkaProvenanceEventService

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;
}
Also used : KyloJmsProvenanceEventService(com.thinkbiganalytics.provenance.jms.KyloJmsProvenanceEventService) KyloKafkaProvenanceEventService(com.thinkbiganalytics.provenance.kafka.KyloKafkaProvenanceEventService) ProvenanceEventService(com.thinkbiganalytics.provenance.api.ProvenanceEventService) HashMap(java.util.HashMap) KyloJmsProvenanceEventService(com.thinkbiganalytics.provenance.jms.KyloJmsProvenanceEventService) KyloKafkaProvenanceEventService(com.thinkbiganalytics.provenance.kafka.KyloKafkaProvenanceEventService)

Aggregations

ProvenanceEventService (com.thinkbiganalytics.provenance.api.ProvenanceEventService)1 KyloJmsProvenanceEventService (com.thinkbiganalytics.provenance.jms.KyloJmsProvenanceEventService)1 KyloKafkaProvenanceEventService (com.thinkbiganalytics.provenance.kafka.KyloKafkaProvenanceEventService)1 HashMap (java.util.HashMap)1