Class ParquetUtils

java.lang.Object
io.deephaven.parquet.base.ParquetUtils

public final class ParquetUtils extends Object
  • Field Details

    • PARQUET_FILE_EXTENSION

      public static final String PARQUET_FILE_EXTENSION
      See Also:
    • METADATA_FILE_NAME

      public static final String METADATA_FILE_NAME
      See Also:
    • COMMON_METADATA_FILE_NAME

      public static final String COMMON_METADATA_FILE_NAME
      See Also:
    • METADATA_FILE_URI_SUFFIX

      public static final String METADATA_FILE_URI_SUFFIX
      See Also:
    • COMMON_METADATA_FILE_URI_SUFFIX

      public static final String COMMON_METADATA_FILE_URI_SUFFIX
      See Also:
    • MAGIC

      public static final byte[] MAGIC
    • PARQUET_OUTPUT_BUFFER_SIZE

      public static final int PARQUET_OUTPUT_BUFFER_SIZE
      The number of bytes to buffer before flushing while writing parquet files and metadata files.
      See Also:
    • METADATA_KEY

      public static final String METADATA_KEY
      Used as a key for storing deephaven specific metadata in the key-value metadata of parquet files.
      See Also:
  • Constructor Details

    • ParquetUtils

      public ParquetUtils()
  • Method Details

    • getPerFileMetadataKey

      public static String getPerFileMetadataKey(String filePath)
      Returns:
      the key value derived from the file path, used for storing each file's metadata in the combined "_metadata" and "_common_metadata" files.
    • isParquetFile

      public static boolean isParquetFile(@NotNull @NotNull String source)
      This method verifies if the source points to a parquet file. Provided source can be a local file path or a URI.
    • isMetadataFile

      public static boolean isMetadataFile(@NotNull @NotNull String source)
      This method verifies if the source points to a metadata file. Provided source can be a local file path or a URI.
    • isVisibleParquetFile

      public static boolean isVisibleParquetFile(@NotNull @NotNull Path rootDir, @NotNull @NotNull Path filePath)
      Check if the provided path points to a non-hidden parquet file, and that none of its parents (till rootDir) are hidden.
    • resolve

      public static URI resolve(URI base, String relativePath)
      Resolve a relative path against a base URI. The path can be from Windows or Unix systems. This method should be used if we expect the relative path to contain file separators or special characters, otherwise use base.resolve(relativePath)