morningman commented on a change in pull request #1642: add
kafka_default_offsets when no partiotion specify .support read kafka partition
from start
URL: https://github.com/apache/incubator-doris/pull/1642#discussion_r313837594
##########
File path:
fe/src/main/java/org/apache/doris/load/routineload/KafkaRoutineLoadJob.java
##########
@@ -368,11 +370,21 @@ private void updateNewPartitionProgress() {
for (Integer kafkaPartition : currentKafkaPartitions) {
if (!((KafkaProgress) progress).containsPartition(kafkaPartition))
{
// if offset is not assigned, start from OFFSET_END
- ((KafkaProgress)
progress).addPartitionOffset(Pair.create(kafkaPartition,
KafkaProgress.OFFSET_END_VAL));
+ long beginOffSet = KafkaProgress.OFFSET_END_VAL;
+ if(!kafkaDefaultOffSet.isEmpty()) {
+
if(kafkaDefaultOffSet.equals(KafkaProgress.OFFSET_BEGINNING)) {
+ beginOffSet = KafkaProgress.OFFSET_BEGINNING_VAL;
+ }else
if(kafkaDefaultOffSet.equals(KafkaProgress.OFFSET_END)) {
Review comment:
```suggestion
} else
if(kafkaDefaultOffSet.equals(KafkaProgress.OFFSET_END)) {
```
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]