[
https://issues.apache.org/jira/browse/GOBBLIN-1933?focusedWorklogId=887672&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-887672
]
ASF GitHub Bot logged work on GOBBLIN-1933:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 28/Oct/23 00:16
Start Date: 28/Oct/23 00:16
Worklog Time Spent: 10m
Work Description: ZihanLi58 commented on code in PR #3806:
URL: https://github.com/apache/gobblin/pull/3806#discussion_r1375129839
##########
gobblin-completeness/src/main/java/org/apache/gobblin/completeness/verifier/KafkaAuditCountVerifier.java:
##########
@@ -171,16 +171,19 @@ private double calculateClassicCompleteness(String
datasetName, long beginInMill
for (String refTier: this.refTiers) {
long refCount = countsByTier.get(refTier);
long srcCount = countsByTier.get(this.srcTier);
+ double tmpPercent;
/*
If we have a case where an audit map is returned, however, one of the
source tiers on another fabric is 0,
and the reference tiers from Kafka is reported to be 0, we can say
that this hour is complete.
This needs to be added as a non-zero double value divided by 0 is
infinity, but 0 divided by 0 is NaN.
*/
if (srcCount == 0 && refCount == 0) {
- return 1.0;
+ tmpPercent = 1;
+ } else {
+ tmpPercent = (double) srcCount / (double) refCount;
}
- percent = Double.max(percent, (double) srcCount / (double) refCount);
+ percent = percent < 0 ? tmpPercent : Double.min(percent, tmpPercent);
Review Comment:
[It's not necessarily for local tier, but in general to support multiple
](https://github.com/apache/gobblin/pull/3806#discussion_r1375129804)
##########
gobblin-completeness/src/main/java/org/apache/gobblin/completeness/verifier/KafkaAuditCountVerifier.java:
##########
@@ -171,16 +171,19 @@ private double calculateClassicCompleteness(String
datasetName, long beginInMill
for (String refTier: this.refTiers) {
long refCount = countsByTier.get(refTier);
long srcCount = countsByTier.get(this.srcTier);
+ double tmpPercent;
/*
If we have a case where an audit map is returned, however, one of the
source tiers on another fabric is 0,
and the reference tiers from Kafka is reported to be 0, we can say
that this hour is complete.
This needs to be added as a non-zero double value divided by 0 is
infinity, but 0 divided by 0 is NaN.
*/
if (srcCount == 0 && refCount == 0) {
- return 1.0;
+ tmpPercent = 1;
+ } else {
+ tmpPercent = (double) srcCount / (double) refCount;
}
- percent = Double.max(percent, (double) srcCount / (double) refCount);
+ percent = percent < 0 ? tmpPercent : Double.min(percent, tmpPercent);
Review Comment:
https://github.com/apache/gobblin/pull/3806#discussion_r1375129804
Issue Time Tracking
-------------------
Worklog Id: (was: 887672)
Time Spent: 1h 10m (was: 1h)
> Change the logic in completeness verifier to support multi reference tier
> -------------------------------------------------------------------------
>
> Key: GOBBLIN-1933
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1933
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Zihan Li
> Priority: Major
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Change the logic in completeness verifier to support multi reference tier and
> use the lowest completeness percentage as the result.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)