class Snapshot extends StateCache with PartitionFiltering with DeltaFileFormat with DeltaLogging
An immutable snapshot of the state of the log at some delta version. Internally this class manages the replay of actions stored in checkpoint or delta files.
After resolving any new actions, it caches the result and collects the following basic information to the driver:
- Protocol Version
- Metadata
- Transaction state
- Alphabetic
- By Inheritance
- Snapshot
- DeltaLogging
- DatabricksLogging
- DeltaProgressReporter
- Logging
- DeltaFileFormat
- PartitionFiltering
- StateCache
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Snapshot(path: Path, version: Long, logSegment: LogSegment, minFileRetentionTimestamp: Long, deltaLog: DeltaLog, timestamp: Long, checksumOpt: Option[VersionChecksum])
- timestamp
The timestamp of the latest commit in milliseconds. Can also be set to -1 if the timestamp of the commit is unknown or the table has not been initialized, i.e.
version = -1.
Type Members
-
class
CachedDS[A] extends AnyRef
- Definition Classes
- StateCache
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
allFiles: Dataset[AddFile]
All of the files present in this Snapshot.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cacheDS[A](ds: Dataset[A], name: String): CachedDS[A]
Create a CachedDS instance for the given Dataset and the name.
Create a CachedDS instance for the given Dataset and the name.
- Definition Classes
- StateCache
-
lazy val
checkpointFileIndexOpt: Option[DeltaLogFileIndex]
- Attributes
- protected
- val checksumOpt: Option[VersionChecksum]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
lazy val
computedState: State
Computes some statistics around the transaction log, therefore on the actions made on this Delta table.
Computes some statistics around the transaction log, therefore on the actions made on this Delta table.
- Attributes
- protected
-
def
dataSchema: StructType
Returns the data schema of the table, the schema of the columns written out to file.
-
lazy val
deltaFileIndexOpt: Option[DeltaLogFileIndex]
- Attributes
- protected
- val deltaLog: DeltaLog
-
def
emptyActions: Dataset[SingleAction]
- Attributes
- protected
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fileFormat: FileFormat
Return the underlying Spark
FileFormatof the Delta table.Return the underlying Spark
FileFormatof the Delta table.- Definition Classes
- DeltaFileFormat
-
lazy val
fileIndices: Seq[DeltaLogFileIndex]
- Attributes
- protected
-
def
filesForScan(projection: Seq[Attribute], filters: Seq[Expression], keepStats: Boolean = false): DeltaScan
- Definition Classes
- PartitionFiltering
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getNumPartitions: Int
- Attributes
- protected
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
init(): Unit
Performs validations during initialization
Performs validations during initialization
- Attributes
- protected
-
def
initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
log: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
logConsole(line: String): Unit
- Definition Classes
- DatabricksLogging
-
def
logDebug(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String, throwable: Throwable): Unit
- Definition Classes
- Snapshot → Logging
-
def
logError(msg: ⇒ String): Unit
- Definition Classes
- Snapshot → Logging
-
def
logInfo(msg: ⇒ String): Unit
- Definition Classes
- Snapshot → Logging
-
def
logInfo(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logName: String
- Attributes
- protected
- Definition Classes
- Logging
- val logSegment: LogSegment
-
def
logTrace(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Definition Classes
- Snapshot → Logging
-
def
logWarning(msg: ⇒ String): Unit
- Definition Classes
- Snapshot → Logging
- def metadata: Metadata
- val minFileRetentionTimestamp: Long
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
lazy val
numIndexedCols: Int
Number of columns to collect stats on for data skipping
- def numOfFiles: Long
- def numOfMetadata: Long
- def numOfProtocol: Long
- def numOfRemoves: Long
- def numOfSetTransactions: Long
- val path: Path
- def protocol: Protocol
-
def
recordDeltaEvent(deltaLog: DeltaLog, opType: String, tags: Map[TagDefinition, String] = Map.empty, data: AnyRef = null): Unit
Used to record the occurrence of a single event or report detailed, operation specific statistics.
Used to record the occurrence of a single event or report detailed, operation specific statistics.
- Attributes
- protected
- Definition Classes
- DeltaLogging
-
def
recordDeltaOperation[A](deltaLog: DeltaLog, opType: String, tags: Map[TagDefinition, String] = Map.empty)(thunk: ⇒ A): A
Used to report the duration as well as the success or failure of an operation.
Used to report the duration as well as the success or failure of an operation.
- Attributes
- protected
- Definition Classes
- DeltaLogging
-
def
recordEvent(metric: MetricDefinition, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, trimBlob: Boolean = true): Unit
- Definition Classes
- DatabricksLogging
-
def
recordOperation[S](opType: OpType, opTarget: String = null, extraTags: Map[TagDefinition, String], isSynchronous: Boolean = true, alwaysRecordStats: Boolean = false, allowAuthTags: Boolean = false, killJvmIfStuck: Boolean = false, outputMetric: MetricDefinition = null, silent: Boolean = true)(thunk: ⇒ S): S
- Definition Classes
- DatabricksLogging
-
def
recordUsage(metric: MetricDefinition, quantity: Double, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, forceSample: Boolean = false, trimBlob: Boolean = true, silent: Boolean = false): Unit
- Definition Classes
- DatabricksLogging
- def redactedPath: String
-
def
schema: StructType
Returns the schema of the table.
- def setTransactions: Seq[SetTransaction]
- def sizeInBytes: Long
-
def
spark: SparkSession
- Attributes
- protected
- Definition Classes
- Snapshot → StateCache
-
def
state: Dataset[SingleAction]
The current set of actions in this Snapshot.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val timestamp: Long
-
def
toString(): String
- Definition Classes
- Snapshot → AnyRef → Any
-
def
tombstones: Dataset[RemoveFile]
All unexpired tombstones.
-
lazy val
transactions: Map[String, Long]
A map to look up transaction version by appId.
-
def
uncache(): Unit
Drop any cached data for this Snapshot.
Drop any cached data for this Snapshot.
- Definition Classes
- StateCache
- val version: Long
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
withStatusCode[T](statusCode: String, defaultMessage: String, data: Map[String, Any] = Map.empty)(body: ⇒ T): T
Report a log to indicate some command is running.
Report a log to indicate some command is running.
- Definition Classes
- DeltaProgressReporter