sv2000 commented on a change in pull request #3174:
URL: https://github.com/apache/incubator-gobblin/pull/3174#discussion_r542968850
##########
File path:
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/workunit/packer/KafkaTopicGroupingWorkUnitPacker.java
##########
@@ -251,7 +251,7 @@ private void addStatsToWorkUnits(Map<String,
List<WorkUnit>> workUnitsByTopic) t
List<WorkUnit> workUnits = entry.getValue();
for (WorkUnit workUnit : workUnits) {
int partitionId =
Integer.parseInt(workUnit.getProp(KafkaSource.PARTITION_ID));
- String topicPartition = new
KafkaPartition.Builder().withTopicName(topic).withId(partitionId).toString();
+ String topicPartition = new
KafkaPartition.Builder().withTopicName(topic).withId(partitionId).build().toString();
Review comment:
@abhizen The variable is re-declared in two independent scopes. I don't
see the advantage from a code-readability standpoint to have one common
declaration. Also, I think it would be good to a unit test for
addStatsToWorkUnits(). Would create a separate PR for it.
----------------------------------------------------------------
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]