Class ExpirationHandler
java.lang.Object
org.apache.drill.metastore.iceberg.operate.ExpirationHandler
Iceberg table generates metadata for each modification operation:
snapshot, manifest file, table metadata file. Also when performing delete operation,
previously stored data files are not deleted. These files with the time
can occupy lots of space.
Table metadata in Iceberg is expired automatically
if
TableProperties.METADATA_DELETE_AFTER_COMMIT_ENABLED
set to true.
Number of metadata files to be retained is configured using TableProperties.METADATA_PREVIOUS_VERSIONS_MAX
.
Snapshots and data expiration should be called manually to align with metadata expiration process,
the same table properties are used to determine if expiration is needed and which number
of snapshots should be retained.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
expire()
Expires snapshots and related data if needed based on the given table properties values.void
Expires snapshots and related data and ignores possible exceptions.
-
Constructor Details
-
ExpirationHandler
public ExpirationHandler(org.apache.iceberg.Table table)
-
-
Method Details
-
expire
public void expire()Expires snapshots and related data if needed based on the given table properties values. -
expireQuietly
public void expireQuietly()Expires snapshots and related data and ignores possible exceptions.
-