public interface CommitCoordinatorClient
commit(io.delta.storage.LogStore, org.apache.hadoop.conf.Configuration, io.delta.storage.commit.TableDescriptor, long, java.util.Iterator<java.lang.String>, io.delta.storage.commit.UpdatedActions).backfillToVersion(io.delta.storage.LogStore, org.apache.hadoop.conf.Configuration, io.delta.storage.commit.TableDescriptor, long, java.lang.Long)getCommits(io.delta.storage.commit.TableDescriptor, java.lang.Long, java.lang.Long).registerTable(org.apache.hadoop.fs.Path, java.util.Optional<io.delta.storage.commit.TableIdentifier>, long, io.delta.storage.commit.actions.AbstractMetadata, io.delta.storage.commit.actions.AbstractProtocol)| Modifier and Type | Method and Description |
|---|---|
void |
backfillToVersion(LogStore logStore,
org.apache.hadoop.conf.Configuration hadoopConf,
TableDescriptor tableDescriptor,
long version,
Long lastKnownBackfilledVersion)
API to ask the commit coordinator client to backfill all commits up to
version
and notify the commit coordinator. |
CommitResponse |
commit(LogStore logStore,
org.apache.hadoop.conf.Configuration hadoopConf,
TableDescriptor tableDescriptor,
long commitVersion,
java.util.Iterator<String> actions,
UpdatedActions updatedActions)
API to commit the given set of actions to the table represented by logPath at the
given commitVersion.
|
GetCommitsResponse |
getCommits(TableDescriptor tableDescriptor,
Long startVersion,
Long endVersion)
API to get the unbackfilled commits for the table represented by the given logPath.
|
java.util.Map<String,String> |
registerTable(org.apache.hadoop.fs.Path logPath,
java.util.Optional<TableIdentifier> tableIdentifier,
long currentVersion,
AbstractMetadata currentMetadata,
AbstractProtocol currentProtocol)
API to register the table represented by the given `logPath` at the provided
currentTableVersion with the commit coordinator this commit coordinator client represents.
|
boolean |
semanticEquals(CommitCoordinatorClient other)
Determines whether this CommitCoordinatorClient is semantically equal to another
CommitCoordinatorClient.
|
java.util.Map<String,String> registerTable(org.apache.hadoop.fs.Path logPath,
java.util.Optional<TableIdentifier> tableIdentifier,
long currentVersion,
AbstractMetadata currentMetadata,
AbstractProtocol currentProtocol)
logPath - The path to the delta log of the table that should be convertedtableIdentifier - The optional tableIdentifier for the table. Some commit coordinators may
choose to make this compulsory and error out if this is not provided.currentVersion - The currentTableVersion is the version of the table just before
conversion. currentTableVersion + 1 represents the commit that
will do the conversion. This must be backfilled atomically.
currentTableVersion + 2 represents the first commit after conversion.
This will go through the CommitCoordinatorClient and the client is
free to choose when it wants to backfill this commit.currentMetadata - The metadata of the table at currentTableVersioncurrentProtocol - The protocol of the table at currentTableVersioncommit(io.delta.storage.LogStore, org.apache.hadoop.conf.Configuration, io.delta.storage.commit.TableDescriptor, long, java.util.Iterator<java.lang.String>, io.delta.storage.commit.UpdatedActions), getCommits(io.delta.storage.commit.TableDescriptor, java.lang.Long, java.lang.Long), and backfillToVersion(io.delta.storage.LogStore, org.apache.hadoop.conf.Configuration, io.delta.storage.commit.TableDescriptor, long, java.lang.Long)
APIs to identify the table.CommitResponse commit(LogStore logStore, org.apache.hadoop.conf.Configuration hadoopConf, TableDescriptor tableDescriptor, long commitVersion, java.util.Iterator<String> actions, UpdatedActions updatedActions) throws CommitFailedException
logStore - The log store to use for writing the commit file.hadoopConf - The Hadoop configuration required to access the file system.tableDescriptor - The descriptor for the table.commitVersion - The version of the commit that is being committed.actions - The actions that need to be committed.updatedActions - The commit info and any metadata or protocol changes that are made
as part of this commit.CommitFailedException - if the commit operation fails.GetCommitsResponse getCommits(TableDescriptor tableDescriptor, Long startVersion, Long endVersion)
tableDescriptor - The descriptor for the table.startVersion - The minimum version of the commit that should be returned. Can be null.endVersion - The maximum version of the commit that should be returned. Can be null.Commits and the latestTableVersion which
is tracked by CommitCoordinatorClient.void backfillToVersion(LogStore logStore, org.apache.hadoop.conf.Configuration hadoopConf, TableDescriptor tableDescriptor, long version, Long lastKnownBackfilledVersion) throws java.io.IOException
version
and notify the commit coordinator.
If this API returns successfully, that means the backfill must have been completed, although
the commit coordinator may not be aware of it yet.logStore - The log store to use for writing the backfilled commits.hadoopConf - The Hadoop configuration required to access the file system.tableDescriptor - The descriptor for the table.version - The version till which the commit coordinator client should
backfill.lastKnownBackfilledVersion - The last known version that was backfilled before this API
was called. If it is None or invalid, then the commit
coordinator client should backfill from the beginning of
the table. Can be null.java.io.IOException - if there is an IO error while backfilling the commits.boolean semanticEquals(CommitCoordinatorClient other)
commit(io.delta.storage.LogStore, org.apache.hadoop.conf.Configuration, io.delta.storage.commit.TableDescriptor, long, java.util.Iterator<java.lang.String>, io.delta.storage.commit.UpdatedActions), getCommits(io.delta.storage.commit.TableDescriptor, java.lang.Long, java.lang.Long), etc. For example,
both instances might be pointing to the same underlying endpoint.