switch NBIO call to one() to facilitate error messaging.

This commit is contained in:
Jonathan Shook 2023-08-22 14:49:17 -05:00
parent 28348180c1
commit 25af04d27f

View File

@ -20,15 +20,13 @@ import io.jhdf.HdfFile;
import io.jhdf.api.Dataset;
import io.nosqlbench.api.content.NBIO;
import java.nio.file.Paths;
public abstract class AbstractHdfFileToVectorType {
protected final HdfFile hdfFile;
protected final Dataset dataset;
protected final int[] dims;
public AbstractHdfFileToVectorType(String filename, String datasetName) {
hdfFile = new HdfFile(NBIO.all().search(filename).first().get().asPath());
hdfFile = new HdfFile(NBIO.all().search(filename).one().asPath());
//TODO: implement a function to get the dataset by name only without needing the full path
dataset = hdfFile.getDatasetByPath(datasetName);
dims = dataset.getDimensions();