Search in sources :

Example 1 with StandardDictionarySnapshotProvider

use of org.talend.dataquality.semantic.snapshot.StandardDictionarySnapshotProvider in project data-prep by Talend.

the class Analyzers method analyzerService.

@Bean
public AnalyzerService analyzerService() {
    LOGGER.info("Data Quality strategy is {} and located in {}", luceneIndexStrategy, dataqualityIndexesLocation);
    LOGGER.info("DataQuality indexes location : '{}'", this.dataqualityIndexesLocation);
    CategoryRegistryManager.setLocalRegistryPath(this.dataqualityIndexesLocation);
    // Configure DQ index creation strategy (one copy per use or one copy shared by all calls).
    LOGGER.info("Analyzer service lucene index strategy set to '{}'", luceneIndexStrategy);
    if ("basic".equalsIgnoreCase(luceneIndexStrategy)) {
        ClassPathDirectory.setProvider(new ClassPathDirectory.BasicProvider());
    } else if ("singleton".equalsIgnoreCase(luceneIndexStrategy)) {
        ClassPathDirectory.setProvider(new ClassPathDirectory.SingletonProvider());
    } else {
        // Default
        LOGGER.warn("Not a supported strategy for lucene indexes: '{}'", luceneIndexStrategy);
        ClassPathDirectory.setProvider(new ClassPathDirectory.SingletonProvider());
    }
    LOGGER.info("DataQuality indexes location : '{}'", this.dataqualityIndexesLocation);
    return new AnalyzerService(new StandardDictionarySnapshotProvider());
}
Also used : ClassPathDirectory(org.talend.dataquality.semantic.index.ClassPathDirectory) AnalyzerService(org.talend.dataprep.quality.AnalyzerService) StandardDictionarySnapshotProvider(org.talend.dataquality.semantic.snapshot.StandardDictionarySnapshotProvider) DisposableBean(org.springframework.beans.factory.DisposableBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

DisposableBean (org.springframework.beans.factory.DisposableBean)1 Bean (org.springframework.context.annotation.Bean)1 AnalyzerService (org.talend.dataprep.quality.AnalyzerService)1 ClassPathDirectory (org.talend.dataquality.semantic.index.ClassPathDirectory)1 StandardDictionarySnapshotProvider (org.talend.dataquality.semantic.snapshot.StandardDictionarySnapshotProvider)1