JayajP commented on code in PR #37102:
URL: https://github.com/apache/beam/pull/37102#discussion_r2615876064
##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/RecordWriterManager.java:
##########
@@ -256,8 +259,40 @@ static String getPartitionDataPath(
private final Map<WindowedValue<IcebergDestination>,
List<SerializableDataFile>>
totalSerializableDataFiles = Maps.newHashMap();
+ static final class LastRefreshedTable {
+ final Table table;
+ volatile Instant lastRefreshTime;
+ static final Duration STALENESS_THRESHOLD = Duration.ofMinutes(3);
+
+ LastRefreshedTable(Table table, Instant lastRefreshTime) {
+ this.table = table;
+ this.lastRefreshTime = lastRefreshTime;
+ }
+
+ /**
+ * Refreshes the table metadata if it is considered stale (older than 3
minutes).
Review Comment:
Updated the code to reflect this
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]