ZihanLi58 commented on code in PR #3659:
URL: https://github.com/apache/gobblin/pull/3659#discussion_r1139395912
##########
gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java:
##########
@@ -947,9 +950,14 @@ private long computeCompletenessWatermark(String table,
SortedSet<ZonedDateTime>
if (timestampDT.isAfter(prevWatermarkDT)
&& TimeIterator.durationBetween(prevWatermarkDT, now, granularity)
> 0) {
long timestampMillis = timestampDT.toInstant().toEpochMilli();
- if (auditCountVerifier.get().isComplete(table,
- TimeIterator.dec(timestampDT, granularity,
1).toInstant().toEpochMilli(), timestampMillis)) {
+ ZonedDateTime auditCountCheckLowerBoundDT =
TimeIterator.dec(timestampDT, granularity, 1);
+ if (auditCountVerifier.get().isComplete(topicName,
+ auditCountCheckLowerBoundDT.toInstant().toEpochMilli(),
timestampMillis)) {
completionWatermark = timestampMillis;
+ // Also persist the watermark into State object to share this with
other MetadataWriters
+ // we enforce ourselves to always use lower-cased table name here
+ String catalogDbTableNameLowerCased =
catalogDbTableName.toLowerCase(Locale.ROOT);
+ this.state.setProp(catalogDbTableNameLowerCased + ".watermark",
completionWatermark);
Review Comment:
Can we make "%.completeion.watermark" to a static regex string, then you can
easily use that to re-construct a configuration key
--
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]