yathindranath commented on a change in pull request #631: Add mechanism to
expire old metadata versions
URL: https://github.com/apache/incubator-iceberg/pull/631#discussion_r346512714
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
##########
@@ -455,13 +521,35 @@ public TableMetadata buildReplacement(Schema
updatedSchema, PartitionSpec update
return new TableMetadata(ops, null, uuid, location,
System.currentTimeMillis(), nextLastColumnId.get(), freshSchema,
specId, builder.build(), ImmutableMap.copyOf(newProperties),
- -1, snapshots, ImmutableList.of());
+ -1, snapshots, ImmutableList.of(), previousMetadata,
removedPreviousMetadata);
}
public TableMetadata updateLocation(String newLocation) {
return new TableMetadata(ops, null, uuid, newLocation,
System.currentTimeMillis(), lastColumnId, schema, defaultSpecId,
specs, properties,
- currentSnapshotId, snapshots, snapshotLog);
+ currentSnapshotId, snapshots, snapshotLog, previousMetadata,
removedPreviousMetadata);
+ }
+
+ public TableMetadata addPreviousMetadata(String previousFile, long
timestampMillis) {
Review comment:
Just to make sure we don't delete latest metadata. Also it might be handy,
if we decided to do time based expiry in future.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]