Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Kafka >> mail # dev >> Offset Request WireFormat

Copy link to this message
Offset Request WireFormat
My understanding is that on a Offset Request with incorrect partition (say
partition 1 when only partition 0 exists), it should through an error
through RESPONSE_HEADER. In particular, it should indicate an error code of

 WrongPartition      3    You tried to access a partition that doesn't exist
                           (was not between 0 and (num_partitions - 1)).

Instead Kafka through an internal exception at the server level and closes
the socket.

[2012-10-02 00:55:54,136] WARN Wrong partition 1 valid partitions (0,0)
[2012-10-02 00:55:54,136] ERROR Closing socket for / because of
error (kafka.network.Processor)
kafka.common.InvalidPartitionException: wrong partition 1
    at kafka.log.LogManager.getLogPool(LogManager.scala:163)
    at kafka.log.LogManager.getLog(LogManager.scala:185)
    at kafka.log.LogManager.getOffsets(LogManager.scala:176)
    at kafka.network.Processor.handle(SocketServer.scala:296)
    at kafka.network.Processor.read(SocketServer.scala:319)
    at kafka.network.Processor.run(SocketServer.scala:214)
    at java.lang.Thread.run(Thread.java:679)
Is this a bug?