You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2012/09/09 23:42:07 UTC

[jira] [Created] (KAFKA-500) javaapi support for getTopoicMetaData

Jun Rao created KAFKA-500:
-----------------------------

             Summary: javaapi support for getTopoicMetaData
                 Key: KAFKA-500
                 URL: https://issues.apache.org/jira/browse/KAFKA-500
             Project: Kafka
          Issue Type: Bug
          Components: core
            Reporter: Jun Rao
             Fix For: 0.8


TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Updated] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Sam Meder (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sam Meder updated KAFKA-500:
----------------------------

    Comment: was deleted

(was: You can ignore my comment - turned out to be maven repository confusion on my end.)
    
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch, kafka-500-v4.patch, kafka-500-v5.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Commented] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Sam Meder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462262#comment-13462262 ] 

Sam Meder commented on KAFKA-500:
---------------------------------

Seeing the following after this patch went int:


Caused by: java.nio.BufferUnderflowException
	at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:127)
	at java.nio.ByteBuffer.get(ByteBuffer.java:675)
	at kafka.utils.Utils$.readShortString(Utils.scala:163)
	at kafka.api.TopicMetadata$.readFrom(TopicMetadata.scala:62)
	at kafka.api.TopicMetaDataResponse$$anonfun$readFrom$1.apply$mcVI$sp(TopicMetaDataResponse.scala:33)
	at scala.collection.immutable.Range$ByOne$class.foreach$mVc$sp(Range.scala:282)
	at scala.collection.immutable.Range$$anon$2.foreach$mVc$sp(Range.scala:265)
	at kafka.api.TopicMetaDataResponse$.readFrom(TopicMetaDataResponse.scala:32)
	at kafka.producer.SyncProducer.send(SyncProducer.scala:117)
	at kafka.producer.BrokerPartitionInfo.updateInfo(BrokerPartitionInfo.scala:82)
	... 17 more

                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch, kafka-500-v4.patch, kafka-500-v5.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Updated] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Swapnil Ghike (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swapnil Ghike updated KAFKA-500:
--------------------------------

    Attachment: kafka-500-v3.patch

1. Probably svn generated a wrong diff due to a simultaneous rename and modify. As advised, deleted the old file and simply added the new one.

2. Removed canEqual.

3. Removed unused imports one last time. :)
                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Closed] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao closed KAFKA-500.
-------------------------

    
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch, kafka-500-v4.patch, kafka-500-v5.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Updated] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Joel Koshy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joel Koshy updated KAFKA-500:
-----------------------------

    Priority: Blocker  (was: Major)
    
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Commented] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458780#comment-13458780 ] 

Jun Rao commented on KAFKA-500:
-------------------------------

Thanks for patch v4. Thinking about this a bit more. To be consistent with other requests, it's probably better to return TopicMetadataResponse in both SyncProducer and SimpleConsumer, instead of Seq[TopicMetadata]. So we will also need a java version of TopicMetadataResponse. The implicits will be a bit easier now since we just need to define a conversion at TopicMetadataResponse level.
                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch, kafka-500-v4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Resolved] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao resolved KAFKA-500.
---------------------------

    Resolution: Fixed

Thanks for the patch. Committed to 0.8.
                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch, kafka-500-v4.patch, kafka-500-v5.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Updated] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Swapnil Ghike (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swapnil Ghike updated KAFKA-500:
--------------------------------

    Attachment: kafka-500-v1.patch

1. Created java apis for TopicMetadataRequest and TopicMetadataResponse. 

2. Added a send(topicMetadataRequest) method in javaapi/SyncProducer.

3. Created unit tests to make sure that the underlying object is correctly created for javaapi/TopicMetadataRequest and javaapi/TopicMetadataResponse. (Are they an overkill?)

4. Removed detailedMetadata, timestamp and count from TopicMetadataRequest as those fields were not being used anywhere.

5. Refactored kafka.api.TopicMetaDataResponse to TopicMetadataResponse. Sorry, this patch will touch a couple of more files.
                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Updated] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Sam Meder (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sam Meder updated KAFKA-500:
----------------------------

    Comment: was deleted

(was: Seeing the following after this patch went int:


Caused by: java.nio.BufferUnderflowException
	at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:127)
	at java.nio.ByteBuffer.get(ByteBuffer.java:675)
	at kafka.utils.Utils$.readShortString(Utils.scala:163)
	at kafka.api.TopicMetadata$.readFrom(TopicMetadata.scala:62)
	at kafka.api.TopicMetaDataResponse$$anonfun$readFrom$1.apply$mcVI$sp(TopicMetaDataResponse.scala:33)
	at scala.collection.immutable.Range$ByOne$class.foreach$mVc$sp(Range.scala:282)
	at scala.collection.immutable.Range$$anon$2.foreach$mVc$sp(Range.scala:265)
	at kafka.api.TopicMetaDataResponse$.readFrom(TopicMetaDataResponse.scala:32)
	at kafka.producer.SyncProducer.send(SyncProducer.scala:117)
	at kafka.producer.BrokerPartitionInfo.updateInfo(BrokerPartitionInfo.scala:82)
	... 17 more
)
    
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch, kafka-500-v4.patch, kafka-500-v5.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Commented] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457138#comment-13457138 ] 

Jun Rao commented on KAFKA-500:
-------------------------------

Thanks for patch v1. Some comments:

1. javaapi.SyncProducer returns a list of the scala version of TopicMetadata. We need to create a java version of TopicMetadata and PartitionMetadata to hide things like Seq and Option. Also, since we only return TopicMetadata to the java client. There is probably no need for a java version of TopicMetadataResponse.

2. In kafka-391, we are getting rid of the java version of SyncProducer since it's no longer a public api (java users should use Producer instead). So, there is no need to put the getMetadata api in javaapi.SyncProducer. However, we should include it in javaapi.SimpleConsumer, which remains a public api.

3. TopicMetadataResponseTest: The test of the java version of the response can probably be made simpler. We just need to make sure that we can convert from a scala response to a java response correctly.

4. Patch doesn't apply cleanly, likely due to renaming class names.
                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Commented] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458340#comment-13458340 ] 

Jun Rao commented on KAFKA-500:
-------------------------------

Thanks for patch v3. Looks good. A few more things:

30. javaapi.PartitionMetadata, javaapi.TopicMetadata: no need to expose method writeTo().

31. Could you expose the getMetadata api in SimpleConsumer (both scala and java)?

32. Cloud you take care of kafka-505 in this patch too since it's small and is related to TopicMetadata?
                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Assigned] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Swapnil Ghike (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swapnil Ghike reassigned KAFKA-500:
-----------------------------------

    Assignee: Swapnil Ghike
    
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Commented] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Sam Meder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462304#comment-13462304 ] 

Sam Meder commented on KAFKA-500:
---------------------------------

You can ignore my comment - turned out to be maven repository confusion on my end.
                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch, kafka-500-v4.patch, kafka-500-v5.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Commented] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457899#comment-13457899 ] 

Jun Rao commented on KAFKA-500:
-------------------------------

Thanks for patch v2. Can't seem to apply the patch. Got the following error.

patching file core/src/main/scala/kafka/api/TopicMetaDataResponse.scala
can't find file to patch at input line 438
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: core/src/main/scala/kafka/api/TopicMetadataResponse.scala
|===================================================================
|--- core/src/main/scala/kafka/api/TopicMetadataResponse.scala	(working copy)
|+++ core/src/main/scala/kafka/api/TopicMetadataResponse.scala	(working copy)
--------------------------
File to patch: ^C

A few minor comments:
20. ByteBufferMessageSet: The way that we write equal, we don't really need canEqual.

21. TopicMetadataRequest: remove unused imports



                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Updated] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Swapnil Ghike (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swapnil Ghike updated KAFKA-500:
--------------------------------

    Attachment: kafka-500-v2.patch

1. Rebased. javaapi/SyncProducer is gone.

2. Removed the two step creation of underlying objects for objects that won't be created by producer/consumer clients. This will be the case of javaapi/{TopicMetadata, PartitionMetadata, ByteBufferMessageSet, FetchResponse, and the future TopicMetadataResponse that will be added with the completion of KAFKA-473}. The underlying object is now directly passed as a constructor private val. 

3. Added java apis for TopicMetadata and PartitionMetadata given their respective scala objects. I am not sure if we need to expose all the fields to clients via getters, please advise.

4. Removed unit tests from the v1 patch as the new javaapi code merely wraps over the scala code.

5. Cleaned up ByteBufferMessageSetTest, javaapi/Implicits.scala.

6. Removed the logMetadata field from PartitionMetadata as it was not used anywhere and was merely going around in buffers. Removed the classes LogMetadata and LogSegmentMetadata as well.

7.  Removed detailedMetadata, timestamp and count from TopicMetadataRequest as those fields were not being used anywhere. 

8. Refactored kafka.api.TopicMetaDataResponse to TopicMetadataResponse.
                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Updated] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Swapnil Ghike (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swapnil Ghike updated KAFKA-500:
--------------------------------

    Attachment: kafka-500-v4.patch

1. Removed writeTo() from javaapi.{PartitionMetadata, TopicMetadata}.

2. Exposed send(TopicMetadataRequest) in javaapi/Simpleconsumer and kafka/api/SimpleConsumer. 

3. Removed errorCode from TopicMetadataResponse, accordingly modified server.handleTopicMetadataRequest.

4. I tried to use generic parameters in javaapi/Implicits.scala but that's probably not going to work because we have different return types for the implicit defs. So in order to keep the javaapi code clean, I created two implicit defs to convert Seq[api.*] to java.util.List[*] and one implicit def to convert Option[*] to *.
                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch, kafka-500-v4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Updated] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Swapnil Ghike (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swapnil Ghike updated KAFKA-500:
--------------------------------

    Attachment: kafka-500-v5.patch

1. Yes, {SyncProducer, SimpleConsumer}.send() now returns TopicMetadataResponse. 

2. Added the javaapi for TopicMetadataResponse.

3. Rearranged implicits as discussed.
                
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch, kafka-500-v4.patch, kafka-500-v5.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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

[jira] [Comment Edited] (KAFKA-500) javaapi support for getTopoicMetaData

Posted by "Swapnil Ghike (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458543#comment-13458543 ] 

Swapnil Ghike edited comment on KAFKA-500 at 9/19/12 9:13 PM:
--------------------------------------------------------------

1. Removed writeTo() from javaapi.{PartitionMetadata, TopicMetadata}.

2. Exposed send(TopicMetadataRequest) in javaapi/Simpleconsumer and kafka/api/SimpleConsumer. 

3. KAFKA-505 : Removed errorCode from TopicMetadataResponse, accordingly modified server.handleTopicMetadataRequest.

4. I tried to use generic parameters in javaapi/Implicits.scala but that's probably not going to work because we have different return types for the implicit defs. So in order to keep the javaapi code clean, I created two implicit defs to convert Seq[api.*] to java.util.List[*] and one implicit def to convert Option[*] to *.
                
      was (Author: swapnilghike):
    1. Removed writeTo() from javaapi.{PartitionMetadata, TopicMetadata}.

2. Exposed send(TopicMetadataRequest) in javaapi/Simpleconsumer and kafka/api/SimpleConsumer. 

3. Removed errorCode from TopicMetadataResponse, accordingly modified server.handleTopicMetadataRequest.

4. I tried to use generic parameters in javaapi/Implicits.scala but that's probably not going to work because we have different return types for the implicit defs. So in order to keep the javaapi code clean, I created two implicit defs to convert Seq[api.*] to java.util.List[*] and one implicit def to convert Option[*] to *.
                  
> javaapi support for getTopoicMetaData
> -------------------------------------
>
>                 Key: KAFKA-500
>                 URL: https://issues.apache.org/jira/browse/KAFKA-500
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-500-v1.patch, kafka-500-v2.patch, kafka-500-v3.patch, kafka-500-v4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> TopicMetaRequest and TopicMetaResponse use scala Seq and Option. We need a version so that java applications can use more easily.

--
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