kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swapnil Ghike (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KAFKA-458) remove errorcode from ByteBufferMessageSet
Date Fri, 07 Sep 2012 22:36:07 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Swapnil Ghike updated KAFKA-458:

    Attachment: kafka-458-v3.patch

2.1 As discussed with Jun, since any use of javaapi/ByteBufferMessageSet must happen through
the iterator, I have removed the getSerialized() method and made the buffer field private.
The buffer field in non javaapi version of ByteBufferMessageSet is a public val. The getSerialized()
method is removed from non javaapi version of ByteBufferMessageSet, MessageSet and FileMessageSet
as well (where it merely threw an UnsupportedOperationException). This introduces a need for
a typecast in ProducerRequest.writeTo(buffer) and it perhaps could look like another hack
introduced to get rid of the UnsupportedOperationException hack in FileMessageSet. This could
be taken care of with KAFKA-289.

2.2. Removed unused imports. 

2.3 The hashCode method is now overridden. Jay, thanks for catching that!

2.4 Just to be sure, did you mean that the behaviour achieved by Either should be achieved
by throwing an exception in KafkaApis.readMessageSet and catching it in KafkaApis.readMessageSets?
That's what I have done in this patch.

2.5 Removed testValidBytes() in javaapi/ByteBufferMessageSetTest because it was merely running
the test on underlying.validBytes and there is already another test that does the same thing
on non javaapi version of ByteBufferMessageSet. Moved testValidBytesWithCompression() from
javaapi/ByteBufferMessageSetTest to the other ByteBufferMessageSetTest.
> remove errorcode from ByteBufferMessageSet
> ------------------------------------------
>                 Key: KAFKA-458
>                 URL: https://issues.apache.org/jira/browse/KAFKA-458
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>              Labels: optimization
>             Fix For: 0.8
>         Attachments: kafka-458-v1.patch, kafka-458-v2.patch, kafka-458-v3.patch
>   Original Estimate: 72h
>  Remaining Estimate: 72h
> Since the FetchResponse already has errorcode, there is no need to keep errorcode in
ByteBufferMessageSet any more.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message