[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] RestfulBlue opened a new issue #5990: fromIndex(0) to toIndex(-1) exception in kafka indexing task

RestfulBlue opened a new issue #5990: fromIndex(0) to toIndex(-1) exception in kafka indexing task
   Currently in our dev environment kafka indexing task throw exception like this:
   java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1)
   	at java.util.ArrayList.subListRangeCheck( ~[?:1.8.0_121]
   	at java.util.ArrayList.subList( ~[?:1.8.0_121]
   	at io.druid.segment.realtime.appenderator.AppenderatorImpl.persistAll( ~[druid-server-0.12.1.jar:0.12.1]
   	at io.druid.segment.realtime.appenderator.AppenderatorImpl.push( ~[druid-server-0.12.1.jar:0.12.1]
   	at io.druid.segment.realtime.appenderator.BaseAppenderatorDriver.pushInBackground( ~[druid-server-0.12.1.jar:0.12.1]
   	at io.druid.segment.realtime.appenderator.StreamAppenderatorDriver.publish( ~[druid-server-0.12.1.jar:0.12.1]
   	at io.druid.indexing.kafka.KafkaIndexTask.lambda$createAndStartPublishExecutor$1( ~[?:?]
   	at java.util.concurrent.Executors$ [?:1.8.0_121]
   	at [?:1.8.0_121]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_121]
   	at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_121]
   	at [?:1.8.0_121]
   If we look into this exception, the source is [AppenderatorImpl ]( , function persistAll . 
         final int limit = sink.isWritable() ? hydrants.size() - 1 : hydrants.size();
         for (FireHydrant hydrant : hydrants.subList(0, limit)) {
           if (!hydrant.hasSwapped()) {
   "Hydrant[%s] hasn't persisted yet, persisting. Segment[%s]", hydrant, identifier);
             indexesToPersist.add(Pair.of(hydrant, identifier));
   here subList throw this exception. As i understand, when sink is writable and hydrants.size == 0 ( for some reason) -> this exception is thrown. Will adding check to zero fix this problem or it will broke something?=)
   for example 
    final int limit = sink.isWritable() && hydrants.size() > 0 ? hydrants.size() - 1 : hydrants.size();

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxx