package actions
- Alphabetic
- Public
- All
Type Members
-
sealed
trait
Action extends AnyRef
Represents a single change to the state of a Delta table.
Represents a single change to the state of a Delta table. An order sequence of actions can be replayed using InMemoryLogReplay to derive the state of the table at a given point in time.
-
case class
AddFile(path: String, partitionValues: Map[String, String], size: Long, modificationTime: Long, dataChange: Boolean, stats: String = null, tags: Map[String, String] = null) extends FileAction with Product with Serializable
Adds a new file to the table.
Adds a new file to the table. When multiple AddFile file actions are seen with the same
pathonly the metadata from the last one is kept. -
case class
CommitInfo(version: Option[Long], timestamp: Timestamp, userId: Option[String], userName: Option[String], operation: String, operationParameters: Map[String, String], job: Option[JobInfo], notebook: Option[NotebookInfo], clusterId: Option[String], readVersion: Option[Long], isolationLevel: Option[String], isBlindAppend: Option[Boolean], operationMetrics: Option[Map[String, String]]) extends Action with CommitMarker with Product with Serializable
Holds provenance information about changes to the table.
Holds provenance information about changes to the table. This Action is not stored in the checkpoint and has reduced compatibility guarantees. Information stored in it is best effort (i.e. can be falsified by the writer).
-
trait
CommitMarker extends AnyRef
Interface for objects that represents the information for a commit.
Interface for objects that represents the information for a commit. Commits can be referred to using a version and timestamp. The timestamp of a commit comes from the remote storage
lastModifiedTime, and can be adjusted for clock skew. Hence we have the methodwithTimestamp. -
sealed
trait
FileAction extends Action
Actions pertaining to the addition and removal of files.
- case class Format(provider: String = "parquet", options: Map[String, String] = Map.empty) extends Product with Serializable
-
class
InMemoryLogReplay extends AnyRef
Replays a history of action, resolving them to produce the current state of the table.
Replays a history of action, resolving them to produce the current state of the table. The protocol for resolution is as follows:
- The most recent AddFile and accompanying metadata for any
pathwins. - RemoveFile deletes a corresponding AddFile and is retained as a
tombstone until
minFileRetentionTimestamphas passed. - The most recent version for any
appIdin a SetTransaction wins. - The most recent Metadata wins.
- The most recent Protocol version wins.
- For each path, this class should always output only one FileAction (either AddFile or RemoveFile)
This class is not thread safe.
- The most recent AddFile and accompanying metadata for any
-
class
InvalidProtocolVersionException extends RuntimeException
Thrown when the protocol version of a table is greater than supported by this client.
- case class JobInfo(jobId: String, jobName: String, runId: String, jobOwnerId: String, triggerType: String) extends Product with Serializable
-
class
JsonMapSerializer extends JsonSerializer[Map[String, String]]
Serializes Maps containing JSON strings without extra escaping.
-
case class
Metadata(id: String = ..., name: String = null, description: String = null, format: Format = Format(), schemaString: String = null, partitionColumns: Seq[String] = Nil, configuration: Map[String, String] = Map.empty, createdTime: Option[Long] = Some(System.currentTimeMillis())) extends Action with Product with Serializable
Updates the metadata of the table.
Updates the metadata of the table. Only the last update to the Metadata of a table is kept. It is the responsibility of the writer to ensure that any data already present in the table is still valid after any change.
- case class NotebookInfo(notebookId: String) extends Product with Serializable
-
case class
Protocol(minReaderVersion: Int = Action.readerVersion, minWriterVersion: Int = Action.writerVersion) extends Action with Product with Serializable
Used to block older clients from reading or writing the log when backwards incompatible changes are made to the protocol.
Used to block older clients from reading or writing the log when backwards incompatible changes are made to the protocol. Readers and writers are responsible for checking that they meet the minimum versions before performing any other operations.
Since this action allows us to explicitly block older clients in the case of a breaking change to the protocol, clients should be tolerant of messages and fields that they do not understand.
- class ProtocolDowngradeException extends RuntimeException
-
case class
RemoveFile(path: String, deletionTimestamp: Option[Long], dataChange: Boolean = true) extends FileAction with Product with Serializable
Logical removal of a given file from the reservoir.
Logical removal of a given file from the reservoir. Acts as a tombstone before a file is deleted permanently.
-
case class
SetTransaction(appId: String, version: Long, lastUpdated: Option[Long]) extends Action with Product with Serializable
Sets the committed version for a given application.
Sets the committed version for a given application. Used to make operations like streaming append idempotent.
-
case class
SingleAction(txn: SetTransaction = null, add: AddFile = null, remove: RemoveFile = null, metaData: Metadata = null, protocol: Protocol = null, commitInfo: CommitInfo = null) extends Product with Serializable
A serialization helper to create a common action envelope.
Value Members
- object Action
- object AddFile extends Serializable
- object CommitInfo extends Serializable
- object JobInfo extends Serializable
- object NotebookInfo extends Serializable
- object SingleAction extends Logging with Serializable