Class HDF5Utils

java.lang.Object
org.apache.drill.exec.store.hdf5.HDF5Utils

public class HDF5Utils extends Object
  • Constructor Details

    • HDF5Utils

      public HDF5Utils()
  • Method Details

    • getAttribute

      public static HDF5Attribute getAttribute(String pathName, String key, io.jhdf.HdfFile hdf5File)
      This function returns and HDF5Attribute object for use when Drill maps the attributes.
      Parameters:
      pathName - The path to retrieve attributes from
      key - The key for the specific attribute you are retrieving
      hdf5File - The hdfFile reader object for the file you are querying
      Returns:
      HDF5Attribute The attribute from the path with the key that was requested.
    • getDataType

      public static TypeProtos.MinorType getDataType(io.jhdf.object.datatype.DataType dataType)
      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

      public static Class<?> getDatasetClass(String path, io.jhdf.HdfFile reader)
      This function gets the type of dataset
      Parameters:
      path - The path of the dataset
      reader - The HDF5 reader
      Returns:
      The data type
    • getNameFromPath

      public static String getNameFromPath(String path)
      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

      public static Object[] toMatrix(Object[] inputArray)
    • toBooleanMatrix

      public static boolean[][] toBooleanMatrix(Object[] inputArray)
    • toByteMatrix

      public static byte[][] toByteMatrix(Object[] inputArray)
    • toShortMatrix

      public static short[][] toShortMatrix(Object[] inputArray)
    • toIntMatrix

      public static int[][] toIntMatrix(Object[] inputArray)
    • toLongMatrix

      public static long[][] toLongMatrix(Object[] inputArray)
    • toFloatMatrix

      public static float[][] toFloatMatrix(Object[] inputArray)
    • toDoubleMatrix

      public static double[][] toDoubleMatrix(Object[] inputArray)
    • flatten

      public static Stream<Object> flatten(Object[] array)