[ 
https://issues.apache.org/jira/browse/DRILL-7388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16958935#comment-16958935
 ] 

Arina Ielchiieva edited comment on DRILL-7388 at 10/24/19 2:39 PM:
-------------------------------------------------------------------

This is also relates to the following issue:

While Kafka storage plugin works with stream/topics with multiple messages, it 
returns "No result found" if a topic contains only one message for query like
{code:java}
select * from kafka.`/s1:t1`
{code}


[~atlassdan] are you interested in submitting the PR with suggested fix?


was (Author: arina):
This is also related to the following issue:

While Kafka storage plugin works with stream/topics with multiple messages, it 
returns "No result found" if a topic contains only one message for query like
{code:java}
select * from kafka.`/s1:t1`
{code}


[~atlassdan] are you interested in submitting the PR with suggested fix?

> Apache Drill Kafka Storage module fails to return results for partitions 
> containing single offset record
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-7388
>                 URL: https://issues.apache.org/jira/browse/DRILL-7388
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.16.0
>            Reporter: daniel kelly
>            Priority: Major
>
> If a partition only contains one record - e.g.
> [topicName=myTopic, partitionId=117, startOffset=0, endOffset=1]
> no data is returned.
> I fixed this locally with the following code change in contrib/storage-kafka 
> :-
> {code:java}
> git diff 
> src/main/java/org/apache/drill/exec/store/kafka/KafkaRecordReader.java
> @@ -109,7 +109,7 @@ public class KafkaRecordReader extends 
> AbstractRecordReader {
>      currentMessageCount = 0;
>  
>      try {
> -      while (currentOffset < subScanSpec.getEndOffset() - 1 && 
> msgItr.hasNext()) {
> +      while (currentOffset < subScanSpec.getEndOffset() && msgItr.hasNext()) 
> {
>          ConsumerRecord<byte[], byte[]> consumerRecord = msgItr.next();
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to