FileNames Utility¶
Create Staged Commit Directory for Log Path¶
commitDirPath creates a new Path (Apache Hadoop) for the staged commit directory under the given logPath.
commitDirPath is used when:
DeltaLogis requested to createLogDirectoriesIfNotExistsMetadataCleanupis requested to cleanUpExpiredLogsSnapshotis requested to assertLogFilesBelongToTableVacuumCommandImplis requested to getFilesFromDeltaLogFileNamesis requested to unbackfilledDeltaFile
Unbackfilled Delta File¶
unbackfilledDeltaFile creates a path of the following format:
unbackfilledDeltaFile creates a staged commit directory for the given logPath.
unbackfilledDeltaFile creates a new Path (Apache Hadoop) for [version].[uuid].json in the staged commit directory.
unbackfilledDeltaFile is used when:
DeltaCommitFileProvideris requested to deltaFile and listSortedUnbackfilledDeltaFiles
Staged Commit Directory¶
FileNames defines _staged_commits directory for staged commits.
Used when:
FileNamesis requested to commitDirPathBackfilledDeltaFileis requested to extract the version from a PathDeltaFileextractor is requested to unapplyUnbackfilledDeltaFileextractor is requested to extract the version and UUID from a Path
BackfilledDeltaFile¶
Extract Version from FileStatus¶
unapply...FIXME
unapply is used when:
- FIXME
Extract Version from Path¶
unapply...FIXME
unapply is used when:
- FIXME
UnbackfilledDeltaFile¶
Extract FileStatus Metadata¶
unapply destructures the path of the given FileStatus (Apache Hadoop).
If successful, unapply returns a tuple of three elements:
- The given
FileStatus versionuuidString
unapply is used when:
MetadataCleanupis requested to cleanUpExpiredLogsVacuumCommandImplis requested to getFilesFromDeltaLogCoordinatedCommitsUtilsis requested to backfillWhenCoordinatedCommitsDisabled, commitFilesIterator, unbackfilledCommitsPresentDeltaCommitFileProvideris requested to apply
Extract Path Metadata¶
unapply checks if the parent directory of the given Path (Apache Hadoop) is _staged_commits.
If so, unapply destructures the given path (using uuidDeltaFileRegex regexp) into a tuple of three elements:
- The given
Path versionuuidString
Otherwise, unapply is None.
unapply is used when:
FileNamesis requested to isUnbackfilledDeltaFile and destructure FileStatus
Creating Hadoop Path To Delta Commit File¶
deltaFile creates a Path (Apache Hadoop) to a file in the path directory.
The format of the file is as follows:
Examples:
00000000000000000001.json00000000000000012345.json
deltaFile is used when:
DeltaHistoryManageris requested for the history of a delta table (and getCommitInfo)OptimisticTransactionImplis requested to commit large and to commit (and write a commit file)SnapshotManagementis requested for the LogSegment for a given version (and validateDeltaVersions)- DESCRIBE DETAIL command is executed (and describeDeltaTable)
Creating Hadoop Path To Compacted Delta File¶
Not used
compactedDeltaFile creates a Path (Apache Hadoop) to a file in the path directory.
The format of the file is as follows:
[fromVersion with leading 0s, up to 20 digits].[toVersion with leading 0s, up to 20 digits].compacted.json
Examples:
00000000000000000001.00000000000000012345.compacted.json