public final class FileNames
extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SIDECAR_DIRECTORY |
| Modifier and Type | Method and Description |
|---|---|
static Path |
checkpointFileSingular(Path path,
long version)
Returns the path for a singular checkpoint up to the given version.
|
static java.util.List<Path> |
checkpointFileWithParts(Path path,
long version,
int numParts)
Returns the paths for all parts of the checkpoint up to the given version.
|
static long |
checkpointVersion(Path path)
Returns the version for the given checkpoint path.
|
static long |
checkpointVersion(String path) |
static String |
deltaFile(Path path,
long version)
Returns the delta (json format) path for a given delta file.
|
static long |
deltaVersion(Path path)
Returns the version for the given delta path.
|
static long |
deltaVersion(String path) |
static long |
getFileVersion(Path path)
Get the version of the checkpoint, checksum or delta file.
|
static boolean |
isCheckpointFile(String fileName) |
static boolean |
isClassicCheckpointFile(String fileName) |
static boolean |
isCommitFile(String fileName) |
static boolean |
isMultiPartCheckpointFile(String fileName) |
static boolean |
isV2CheckpointFile(String fileName) |
static String |
listingPrefix(Path path,
long version)
Returns the prefix of all delta log files for the given version.
|
static String |
sidecarFile(Path path,
String sidecar) |
static Path |
topLevelV2CheckpointFile(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 Path |
v2CheckpointSidecarFile(Path path,
String uuid)
Returns the path for a V2 sidecar file with a given UUID.
|
public static final String SIDECAR_DIRECTORY
public static String deltaFile(Path path, long version)
public static long deltaVersion(Path path)
public static long deltaVersion(String path)
public static long checkpointVersion(Path path)
public static long checkpointVersion(String path)
public static String sidecarFile(Path path, String sidecar)
public static String listingPrefix(Path path, long version)
Intended for use with listFrom to get all files from this version onwards. The returned Path will not exist as a file.
public static Path checkpointFileSingular(Path path, long version)
In a future protocol version this path will stop being written.
public static Path topLevelV2CheckpointFile(Path path, long version, String uuid, String fileType)
public static Path v2CheckpointSidecarFile(Path path, String uuid)
public static java.util.List<Path> checkpointFileWithParts(Path path, long version, int numParts)
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.
public static boolean isCheckpointFile(String fileName)
public static boolean isClassicCheckpointFile(String fileName)
public static boolean isMultiPartCheckpointFile(String fileName)
public static boolean isV2CheckpointFile(String fileName)
public static boolean isCommitFile(String fileName)
public static long getFileVersion(Path path)