Search in sources :

Example 1 with HadoopBasedCqlLibraryProvider

use of com.ibm.cohort.cql.library.HadoopBasedCqlLibraryProvider in project quality-measure-and-cohort-service by Alvearie.

the class SparkCqlEvaluator method createLibraryProvider.

/**
 * Initialize a library provider that will load resources from the configured path
 * in local storage or from the well-known classpath locations. The library provider
 * comes configured with CQL translation enabled and will use custom modelinfo
 * definitions if provided in the configuration.
 *
 * @return configured library provider
 * @throws IOException when model info cannot be read
 * @throws FileNotFoundException when a specified model info file cannot be found
 */
protected CqlLibraryProvider createLibraryProvider() throws IOException, FileNotFoundException {
    CqlLibraryProvider hadoopBasedLp = new HadoopBasedCqlLibraryProvider(new Path(args.cqlPath), this.hadoopConfiguration.value());
    // we are excluding the pre-compiled FHIRHelpers libraries because they were not compiled
    // with the EnableResultTypes option that is required for some of the features of this program.
    ClasspathCqlLibraryProvider cpBasedLp = new ClasspathCqlLibraryProvider();
    cpBasedLp.setSupportedFormats(Format.CQL);
    CqlLibraryProvider priorityLp = new PriorityCqlLibraryProvider(hadoopBasedLp, cpBasedLp);
    return new TranslatingCqlLibraryProvider(priorityLp, getCqlTranslator());
}
Also used : Path(org.apache.hadoop.fs.Path) TranslatingCqlLibraryProvider(com.ibm.cohort.cql.translation.TranslatingCqlLibraryProvider) HadoopBasedCqlLibraryProvider(com.ibm.cohort.cql.library.HadoopBasedCqlLibraryProvider) CqlLibraryProvider(com.ibm.cohort.cql.library.CqlLibraryProvider) PriorityCqlLibraryProvider(com.ibm.cohort.cql.library.PriorityCqlLibraryProvider) HadoopBasedCqlLibraryProvider(com.ibm.cohort.cql.library.HadoopBasedCqlLibraryProvider) TranslatingCqlLibraryProvider(com.ibm.cohort.cql.translation.TranslatingCqlLibraryProvider) ClasspathCqlLibraryProvider(com.ibm.cohort.cql.library.ClasspathCqlLibraryProvider) ClasspathCqlLibraryProvider(com.ibm.cohort.cql.library.ClasspathCqlLibraryProvider) PriorityCqlLibraryProvider(com.ibm.cohort.cql.library.PriorityCqlLibraryProvider)

Aggregations

ClasspathCqlLibraryProvider (com.ibm.cohort.cql.library.ClasspathCqlLibraryProvider)1 CqlLibraryProvider (com.ibm.cohort.cql.library.CqlLibraryProvider)1 HadoopBasedCqlLibraryProvider (com.ibm.cohort.cql.library.HadoopBasedCqlLibraryProvider)1 PriorityCqlLibraryProvider (com.ibm.cohort.cql.library.PriorityCqlLibraryProvider)1 TranslatingCqlLibraryProvider (com.ibm.cohort.cql.translation.TranslatingCqlLibraryProvider)1 Path (org.apache.hadoop.fs.Path)1