homatthew commented on code in PR #3745:
URL: https://github.com/apache/gobblin/pull/3745#discussion_r1298872650


##########
gobblin-modules/gobblin-kafka-common/src/test/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaProduceRateTrackerTest.java:
##########
@@ -58,6 +59,7 @@ public void setUp() {
     kafkaPartitions.add(new 
KafkaPartition.Builder().withTopicName("test-topic").withId(1).build());
     this.workUnitState = new WorkUnitState();
     this.workUnitState.setProp(KafkaSource.RECORD_LEVEL_SLA_MINUTES_KEY, 5L);
+    this.workUnitState.setProp(ConfigurationKeys.KAFKA_BROKERS, "testBroker");

Review Comment:
   Why do we set this in the tests? Do these tests even test the 
eventSubmitters?



##########
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaExtractor.java:
##########
@@ -354,10 +354,12 @@ public static String getKafkaBrokerSimpleName(State 
state) {
     String brokerUri = kafkaBrokerUriList.get(0);
     Map<String, String> brokerToSimpleName = 
KafkaCommonUtil.getKafkaBrokerToSimpleNameMap(state);
 
-    Preconditions.checkArgument(brokerToSimpleName.get(brokerUri) != null,
-        String.format("Unable to find simple name for the kafka cluster broker 
uri in the config. Please check the map "
-            + "value of %s. brokerUri=%s, configMapValue=%s", 
KAFKA_BROKERS_TO_SIMPLE_NAME_MAP_KEY, brokerUri, brokerToSimpleName));
-
+    if (!brokerToSimpleName.containsKey(brokerUri)) {
+      LOG.warn(String.format(

Review Comment:
   minor nit: string.format isn't necessary for logger



-- 
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]

Reply via email to