Package org.apache.drill.exec.store.hdf5
Class HDF5Utils
java.lang.Object
org.apache.drill.exec.store.hdf5.HDF5Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HDF5AttributegetAttribute(String pathName, String key, io.jhdf.HdfFile hdf5File) This function returns and HDF5Attribute object for use when Drill maps the attributes.static Class<?> getDatasetClass(String path, io.jhdf.HdfFile reader) This function gets the type of datasetstatic TypeProtos.MinorTypegetDataType(io.jhdf.object.datatype.DataType dataType) This function returns the Drill data type of a given HDF5 dataset.static StringgetNameFromPath(String path) This helper function returns the name of a HDF5 record from a data pathstatic boolean[][]toBooleanMatrix(Object[] inputArray) static byte[][]toByteMatrix(Object[] inputArray) static double[][]toDoubleMatrix(Object[] inputArray) static float[][]toFloatMatrix(Object[] inputArray) static int[][]toIntMatrix(Object[] inputArray) static long[][]toLongMatrix(Object[] inputArray) static Object[]static short[][]toShortMatrix(Object[] inputArray)
-
Constructor Details
-
HDF5Utils
public HDF5Utils()
-
-
Method Details
-
getAttribute
This function returns and HDF5Attribute object for use when Drill maps the attributes.- Parameters:
pathName- The path to retrieve attributes fromkey- The key for the specific attribute you are retrievinghdf5File- The hdfFile reader object for the file you are querying- Returns:
- HDF5Attribute The attribute from the path with the key that was requested.
-
getDataType
This function returns the Drill data type of a given HDF5 dataset.- Parameters:
dataType- The input data set.- Returns:
- MinorType The Drill data type of the dataset in question
-
getDatasetClass
This function gets the type of dataset- Parameters:
path- The path of the datasetreader- The HDF5 reader- Returns:
- The data type
-
getNameFromPath
This helper function returns the name of a HDF5 record from a data path- Parameters:
path- Path to HDF5 data- Returns:
- String name of data
-
toMatrix
-
toBooleanMatrix
-
toByteMatrix
-
toShortMatrix
-
toIntMatrix
-
toLongMatrix
-
toFloatMatrix
-
toDoubleMatrix
-
flatten
-