You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/02/15 20:33:22 UTC

[GitHub] [incubator-pinot] yupeng9 commented on a change in pull request #6580: Add the isolation level config to kafka ingestion to support Kafka transactions

yupeng9 commented on a change in pull request #6580:
URL: https://github.com/apache/incubator-pinot/pull/6580#discussion_r576410633



##########
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:
       Good suggestion




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org