LogStore¶
LogStore
is an abstraction of transaction log stores (to read and write physical log files and checkpoints).
LogStore
is created using LogStoreProvider based on spark.delta.logStore.class configuration property.
Contract¶
invalidateCache¶
invalidateCache(): Unit
Used when:
DelegatingLogStore
is requested to invalidateCache
isPartialWriteVisible¶
isPartialWriteVisible(
path: Path): Boolean // (1)!
isPartialWriteVisible(
path: Path,
hadoopConf: Configuration): Boolean
- deprecated
Whether a partial write is visible when writing to path
Default: true
Used when:
Checkpoints
is requested to writeCheckpointOptimisticTransactionImpl
is requested to isCommitLockEnabledDelegatingLogStore
is requested to isPartialWriteVisible
listFrom¶
listFrom(
path: Path): Iterator[FileStatus]
listFrom(
path: String): Iterator[FileStatus]
Used when:
Checkpoints
is requested to findLastCompleteCheckpointDeltaHistoryManager
is requested to getEarliestDeltaFile, getEarliestReproducibleCommit and getCommitsDeltaLog
is requested to getChangesMetadataCleanup
is requested to listExpiredDeltaLogsSnapshotManagement
is requested to listFromDelegatingLogStore
is requested to listFromDeltaFileOperations
utility is used to listUsingLogStore
read¶
read(
path: Path): Seq[String]
read(
path: String): Seq[String]
Used when:
Checkpoints
is requested to loadMetadataFromFileReadChecksum
is requested to readChecksumDeltaLog
is requested to getChangesOptimisticTransactionImpl
is requested to checkForConflictsDelegatingLogStore
is requested to readLogStore
is requested to readAsIterator
write¶
write(
path: Path,
actions: Iterator[String],
overwrite: Boolean = false): Unit
write(
path: String,
actions: Iterator[String]): Unit
Used when:
Checkpoints
is requested to checkpointOptimisticTransactionImpl
is requested to doCommitDeltaCommand
is requested to commitLargeGenerateSymlinkManifestImpl
is requested to writeManifestFilesDelegatingLogStore
is requested to write
Implementations¶
Creating LogStore¶
apply(
sc: SparkContext): LogStore
apply(
sparkConf: SparkConf,
hadoopConf: Configuration): LogStore
apply
creates a LogStore.
apply
is used when:
GenerateSymlinkManifestImpl
is requested to writeManifestFiles and writeSingleManifestFileDeltaHistoryManager
is requested to getHistory and getActiveCommitAtTimeDeltaFileOperations
is requested to recursiveListDirs, localListDirs, and localListFrom
createLogStoreWithClassName¶
createLogStoreWithClassName(
className: String,
sparkConf: SparkConf,
hadoopConf: Configuration): LogStore
createLogStoreWithClassName
branches off based on the given className
.
createLogStoreWithClassName
creates a DelegatingLogStore when the className
is the fully-qualified class name of DelegatingLogStore
.
Otherwise, createLogStoreWithClassName
loads the class and braches off based on the class type.
For io.delta.storage.LogStore, createLogStoreWithClassName
creates an instance thereof (with the given Configuration
) and wraps it up in a LogStoreAdaptor.
For all other cases, createLogStoreWithClassName
creates an instance thereof (with the given SparkConf
and Configuration
).
createLogStoreWithClassName
is used when:
DelegatingLogStore
is requested to createLogStoreLogStoreProvider
is requested to createLogStore
logStoreSchemeConfKey¶
logStoreSchemeConfKey(
scheme: String): String
logStoreSchemeConfKey
simply returns the following text for the given scheme
:
spark.delta.logStore.[scheme].impl
logStoreSchemeConfKey
is used when:
DelegatingLogStore
is requested to schemeBasedLogStore