Package io.delta.kernel.internal.util
Class FileNames
Object
io.delta.kernel.internal.util.FileNames
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PathcheckpointFileSingular(Path path, long version) Returns the path for a singular checkpoint up to the given version.checkpointFileWithParts(Path path, long version, int numParts) Returns the paths for all parts of the checkpoint up to the given version.static longcheckpointVersion(Path path) Returns the version for the given checkpoint path.static longcheckpointVersion(String path) static StringReturns the delta (json format) path for a given delta file.static longdeltaVersion(Path path) Returns the version for the given delta path.static longdeltaVersion(String path) static longgetFileVersion(Path path) Get the version of the checkpoint, checksum or delta file.static booleanisCheckpointFile(String fileName) static booleanisClassicCheckpointFile(String fileName) static booleanisCommitFile(String fileName) static booleanisMulitPartCheckpointFile(String fileName) static booleanisV2CheckpointFile(String fileName) static StringlistingPrefix(Path path, long version) Returns the prefix of all delta log files for the given version.static StringsidecarFile(Path path, String sidecar) static PathtopLevelV2CheckpointFile(Path path, long version, String uuid, String fileType) Returns the path for a top-level V2 checkpoint file up to the given version with a given UUID and filetype (JSON or Parquet).static Pathv2CheckpointSidecarFile(Path path, String uuid) Returns the path for a V2 sidecar file with a given UUID.
-
Field Details
-
SIDECAR_DIRECTORY
- See Also:
-
-
Method Details
-
deltaFile
Returns the delta (json format) path for a given delta file. -
deltaVersion
Returns the version for the given delta path. -
deltaVersion
-
checkpointVersion
Returns the version for the given checkpoint path. -
checkpointVersion
-
sidecarFile
-
listingPrefix
Returns the prefix of all delta log files for the given version.Intended for use with listFrom to get all files from this version onwards. The returned Path will not exist as a file.
-
checkpointFileSingular
Returns the path for a singular checkpoint up to the given version.In a future protocol version this path will stop being written.
-
topLevelV2CheckpointFile
Returns the path for a top-level V2 checkpoint file up to the given version with a given UUID and filetype (JSON or Parquet). -
v2CheckpointSidecarFile
Returns the path for a V2 sidecar file with a given UUID. -
checkpointFileWithParts
Returns the paths for all parts of the checkpoint up to the given version.In a future protocol version we will write this path instead of checkpointFileSingular.
Example of the format: 00000000000000004915.checkpoint.0000000020.0000000060.parquet is checkpoint part 20 out of 60 for the snapshot at version 4915. Zero padding is for lexicographic sorting.
-
isCheckpointFile
-
isClassicCheckpointFile
-
isMulitPartCheckpointFile
-
isV2CheckpointFile
-
isCommitFile
-
getFileVersion
Get the version of the checkpoint, checksum or delta file. Throws an error if an unexpected file type is seen. These unexpected files should be filtered out to ensure forward compatibility in cases where new file types are added, but without an explicit protocol upgrade.
-