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());
}
Aggregations