Jackie-Jiang commented on a change in pull request #6580:
URL: https://github.com/apache/incubator-pinot/pull/6580#discussion_r576397500
##########
File path:
pinot-plugins/pinot-stream-ingestion/pinot-kafka-2.0/src/main/java/org/apache/pinot/plugin/stream/kafka20/KafkaPartitionLevelStreamConfig.java
##########
@@ -66,6 +69,18 @@ public KafkaPartitionLevelStreamConfig(StreamConfig
streamConfig) {
_kafkaFetcherSizeBytes = getIntConfigWithDefault(_streamConfigMap,
fetcherSizeKey, _kafkaBufferSize);
_kafkaFetcherMinBytes = getIntConfigWithDefault(_streamConfigMap,
fetcherMinBytesKey,
KafkaStreamConfigProperties.LowLevelConsumer.KAFKA_FETCHER_MIN_BYTES_DEFAULT);
+
+ if (_streamConfigMap.containsKey(isolationLevelKey)) {
+ Preconditions.checkArgument(_streamConfigMap.get(isolationLevelKey)
+
.equals(KafkaStreamConfigProperties.LowLevelConsumer.KAFKA_ISOLATION_LEVEL_READ_COMMITTED)
|| _streamConfigMap
+ .get(isolationLevelKey)
+
.equals(KafkaStreamConfigProperties.LowLevelConsumer.KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED),
+ String.format("Unrecognized Kafka isolation level: %s",
_streamConfigMap.get(isolationLevelKey)));
+ _kafkaIsolationLevel = _streamConfigMap.get(isolationLevelKey);
+ } else {
+ _kafkaIsolationLevel = null;
+ }
Review comment:
(nit)
```suggestion
_kafkaIsolationLevel = _streamConfigMap.get(isolationLevelKey);
if (_kafkaIsolationLevel != null) {
Preconditions.checkArgument(_kafkaIsolationLevel
.equals(KafkaStreamConfigProperties.LowLevelConsumer.KAFKA_ISOLATION_LEVEL_READ_COMMITTED)
||
_kafkaIsolationLevel.equals(KafkaStreamConfigProperties.LowLevelConsumer.KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED),
String.format("Unrecognized Kafka isolation level: %s",
_kafkaIsolationLevel));
}
```
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]