public interface TableOperations
Modifier and Type | Method and Description |
---|---|
void |
commit(TableMetadata base,
TableMetadata metadata)
Replace the base table metadata with a new version.
|
TableMetadata |
current()
Return the currently loaded table metadata, without checking for updates.
|
void |
deleteFile(java.lang.String path)
Delete a file.
|
InputFile |
newInputFile(java.lang.String path)
Create a new
InputFile for a path. |
OutputFile |
newMetadataFile(java.lang.String filename)
Create a new
OutputFile in the table's metadata store. |
long |
newSnapshotId()
Create a new ID for a Snapshot
|
TableMetadata |
refresh()
Return the current table metadata after checking for updates.
|
TableMetadata current()
TableMetadata refresh()
void commit(TableMetadata base, TableMetadata metadata)
This method should implement and document atomicity guarantees.
Implementations must check that the base metadata is current to avoid overwriting updates.
base
- table metadata on which changes were basedmetadata
- new table metadata with updatesInputFile newInputFile(java.lang.String path)
InputFile
for a path.path
- a string file pathOutputFile newMetadataFile(java.lang.String filename)
OutputFile
in the table's metadata store.filename
- a string file name, not a full pathvoid deleteFile(java.lang.String path)
path
- path to the filelong newSnapshotId()