ibuenros commented on a change in pull request #2576: [GOBBLIN-706]enable
dynamic mappers
URL: https://github.com/apache/incubator-gobblin/pull/2576#discussion_r268255087
##########
File path:
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaSource.java
##########
@@ -258,9 +258,15 @@ public String apply(KafkaTopic topic) {
// Create empty WorkUnits for skipped partitions (i.e., partitions that
have previous offsets,
// but aren't processed).
createEmptyWorkUnitsForSkippedPartitions(workUnits,
topicSpecificStateMap, state);
-
+ //determine the number of mappers
int numOfMultiWorkunits =
state.getPropAsInt(ConfigurationKeys.MR_JOB_MAX_MAPPERS_KEY,
ConfigurationKeys.DEFAULT_MR_JOB_MAX_MAPPERS);
+ if(state.contains(ConfigurationKeys.TARGET_MAPPER_SIZE)) {
+ double totalEstDataSize = KafkaWorkUnitPacker.getInstance(this,
state).getWorkUnitEstSizes(workUnits);
Review comment:
It be better to instantiate `KafkaWorkUnitPacker` once in line 264 then use
the same object both here and in line 270.
----------------------------------------------------------------
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