AndyJiang99 commented on code in PR #3806:
URL: https://github.com/apache/gobblin/pull/3806#discussion_r1375116883
##########
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/workunit/packer/KafkaTopicGroupingWorkUnitPacker.java:
##########
@@ -70,9 +70,10 @@
@Slf4j
public class KafkaTopicGroupingWorkUnitPacker extends KafkaWorkUnitPacker {
public static final String GOBBLIN_KAFKA_PREFIX = "gobblin.kafka.";
- private static final int DEFAULT_NUM_TOPIC_PARTITIONS_PER_CONTAINER = 10;
+ public static final String DEFAULT_NUM_TOPIC_PARTITIONS_PER_CONTAINER_KEY =
GOBBLIN_KAFKA_PREFIX + "default.num.topic.partitions.per.container";
+ private static final int DEFAULT_DEFAULT_NUM_TOPIC_PARTITIONS_PER_CONTAINER
= 10;
- //A global configuration for container capacity. The container capacity
refers to the peak rate (in MB/s) that a
+ //A global configuration for container capacity. The container capacity
refers to the peak rate (in MB/s) that agit
Review Comment:
Typo here
##########
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:
If the srcTiers are local cluster 1, local cluster 2, etc, rather than using
the lowest percentage completion, would instead it be srcTier / (summation of
refTiers)? Since the total records across all the refTiers should be equal to
the number of records on srcTier eventually?
Depending on what the eventual conclusion of this is, let's also update the
javadocs of this to match the behavior
--
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]