Search in sources :

Example 1 with FileLoaderException

use of org.apache.phoenix.pherf.exception.FileLoaderException in project phoenix by apache.

the class XMLConfigParser method init.

private void init(String pattern) throws Exception {
    if (dataModels != null) {
        return;
    }
    this.filePattern = pattern;
    this.dataModels = new ArrayList<>();
    this.resourceList = new ResourceList(PherfConstants.RESOURCE_SCENARIO);
    this.paths = getResources(this.filePattern);
    if (this.paths.isEmpty()) {
        throw new FileLoaderException("Could not load the resource files using the pattern: " + pattern);
    }
    for (Path path : this.paths) {
        System.out.println("Adding model for path:" + path.toString());
        this.dataModels.add(XMLConfigParser.readDataModel(path));
    }
}
Also used : Path(java.nio.file.Path) ResourceList(org.apache.phoenix.pherf.util.ResourceList) FileLoaderException(org.apache.phoenix.pherf.exception.FileLoaderException)

Aggregations

Path (java.nio.file.Path)1 FileLoaderException (org.apache.phoenix.pherf.exception.FileLoaderException)1 ResourceList (org.apache.phoenix.pherf.util.ResourceList)1