[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2016-01-27 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15119739#comment-15119739
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

[~ijuma] [~gwenshap] Can I rely on you to tell me when I should move from 
DISCUSS to VOTE for the KIP?

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [DISCUSS] KIP-45 Standardize all client sequence interaction on j.u.Collection.

2016-01-27 Thread Pierre-Yves Ritschard

Hi Jason,

Thanks for weighing in on this. Here's my take:

- I initially opted for overloading, but this met resistance (most
  vocally from Jay Kreps). I don't have strong feelings either way (I
  tend to prefer the current proposal without overloading but would
  understand the need to add it back).
- The feedback I got around me (from an admittedly small population
  sample) is that most people are thinking of migrating to 0.9.0.0. I
  would wager that a very large majority of users are running production
  apps on 0.8 clients and would thus not be impacted. The very recent
  availability of the client libs would also indicate that those having
  already switched to 0.9.0.0 client libs have a capacity to iterate fast.

Jason Gustafson writes:

> Hi Pierre,
>
> Thanks for your persistence on this issue. I've gone back and forth on this
> a few times. The current API can definitely be annoying in some cases, but
> breaking compatibility still sucks. We do have the @Unstable annotation on
> the API, but it's unclear what exactly it means and I'm guessing most users
> haven't even noticed it. In the end, I feel we should try harder to keep
> compatibility even if it means keeping some of the annoying usage. As an
> alternative, maybe we could do the following:
>
> 1. For subscribe() and assign(), change the parameter type to collection as
> planned in the KIP. This is at least source-compatible, so as long as users
> compile against the updated release, there shouldn't be any problems.
>
> 2. Instead of changing the signatures of the current pause/resume/seek
> APIs, maybe we can overload them. This keeps compatibility and supports the
> more convenient collection usage, but the cost is some API bloat.
>
> In my opinion, the slightly increased surface area from overloading is
> worth the cost of keeping compatibility. Overloading is very common in Java
> APIs, so there's no potential for confusion, and it has basically no
> maintenance overhead. However, I know others already expressed opposition
> to this, so if it's not agreeable, then I'm probably more inclined to keep
> the current API. That said, it's not a strong preference. If the consensus
> is to allow the breakage now, it doesn't seem like too big of a deal for
> users to update their code. It might be early enough that most users
> haven't finished (or perhaps haven't even started) migrating their code to
> use the new consumer.
>
> What do you think?
>
> Thanks,
> Jason
>
>
> On Tue, Jan 26, 2016 at 11:52 AM, Pierre-Yves Ritschard <p...@spootnik.org>
> wrote:
>
>>
>> I updated the KIP accordingly.
>>
>> Cheers,
>>   - pyr
>>



[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2016-01-26 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15116960#comment-15116960
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

[~gwenshap] - thanks! the KIP is up: 
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61337336

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [DISCUSS] KIP-45 Standardize all client sequence interaction on j.u.Collection.

2016-01-26 Thread Pierre-Yves Ritschard

Hi Ismael,

Thanks for the review, I will act on these a bit later today.

  - pyr
  
Ismael Juma writes:

> Thanks Pierre. Including the dev mailing list.
>
> A few comments:
>
> 1. It's worth mentioning that the KafkaConsumer has the
> @InterfaceStability.Unstable annotation.
> 2. It would be good to show the existing signatures of the methods being
> changed before we show the changed signatures.
> 3. The proposed changes section mentions an alternative. I think the
> alternative should be moved to the "Rejected Alternatives" section.
> 4. It would be good to explain why `Collection` was chosen specifically for
> the parameters (as opposed to `Iterable` for example).\
> 5. Finally, it would be good to explain why we decided to change the method
> parameters instead of the return types (or why we should not change the
> return types).
>
> Hopefully it should be straightforward to address these points.
>
> Thanks,
> Ismael
>
> On Tue, Jan 26, 2016 at 9:00 AM, Pierre-Yves Ritschard <p...@spootnik.org>
> wrote:
>
>>
>> KAFKA-3006 is under review, and would change some commonly used
>> signatures in the Kafka client library. The idea behind the proposal is
>> to provide a unified way of interacting with anything sequence like in
>> the client.
>>
>> If the change is accepted, these would be the signatures that change:
>>
>> void subscribe(Collection topics);
>> void subscribe(Collection topics, ConsumerRebalanceListener);
>> void assign(Collection partitions);
>> void pause(Collection partitions);
>> void resume(Collection partitions);
>> void seekToBeginning(Collection);
>> void seekToEnd(Collection);
>>
>>



[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2016-01-25 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15116177#comment-15116177
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

Can anyone help with the confluence issue I'm having to create the KIP, or are 
edit rights to the wiki reserved to project members? (In which case, I couldn't 
help for the KIP).

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2016-01-22 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15112115#comment-15112115
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

Hi [~gwenshap], I'm happy to go through the process. I don't seem to have 
authorization to create pages in the Kafka space on confluence though. My 
user-id there is "pyr" 

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2016-01-21 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15110597#comment-15110597
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

[~granthenke] It's ready to be committed, but I do think there needs to be a 
final resolution from project members to move forwards.

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2016-01-13 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15096960#comment-15096960
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

[~hachikuji]  [~ewencp] [~ijuma] Can I be of any additional help moving this 
forward?

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (KAFKA-1377) transient unit test failure in LogOffsetTest

2015-12-21 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15067053#comment-15067053
 ] 

Pierre-Yves Ritschard edited comment on KAFKA-1377 at 12/21/15 9:03 PM:


[~guozhang] I'm testing against trunk.
The failure to propagater results is confined to the Sasl tests.


was (Author: pyritschard):
[~guozhang] I'm testing against trunk.

> transient unit test failure in LogOffsetTest
> 
>
> Key: KAFKA-1377
> URL: https://issues.apache.org/jira/browse/KAFKA-1377
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Reporter: Jun Rao
>Assignee: Jun Rao
>  Labels: newbie
> Fix For: 0.10.0.0
>
> Attachments: KAFKA-1377.patch, KAFKA-1377_2014-04-11_17:42:13.patch, 
> KAFKA-1377_2014-04-11_18:14:45.patch
>
>
> Saw the following transient unit test failure.
> kafka.server.LogOffsetTest > testGetOffsetsBeforeEarliestTime FAILED
> junit.framework.AssertionFailedError: expected:<List(0)> but 
> was:<Vector()>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:71)
> at 
> kafka.server.LogOffsetTest.testGetOffsetsBeforeEarliestTime(LogOffsetTest.scala:198)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-1377) transient unit test failure in LogOffsetTest

2015-12-21 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15067053#comment-15067053
 ] 

Pierre-Yves Ritschard commented on KAFKA-1377:
--

[~guozhang] I'm testing against trunk.

> transient unit test failure in LogOffsetTest
> 
>
> Key: KAFKA-1377
> URL: https://issues.apache.org/jira/browse/KAFKA-1377
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Reporter: Jun Rao
>Assignee: Jun Rao
>  Labels: newbie
> Fix For: 0.10.0.0
>
> Attachments: KAFKA-1377.patch, KAFKA-1377_2014-04-11_17:42:13.patch, 
> KAFKA-1377_2014-04-11_18:14:45.patch
>
>
> Saw the following transient unit test failure.
> kafka.server.LogOffsetTest > testGetOffsetsBeforeEarliestTime FAILED
> junit.framework.AssertionFailedError: expected:<List(0)> but 
> was:<Vector()>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:71)
> at 
> kafka.server.LogOffsetTest.testGetOffsetsBeforeEarliestTime(LogOffsetTest.scala:198)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-1377) transient unit test failure in LogOffsetTest

2015-12-21 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15067138#comment-15067138
 ] 

Pierre-Yves Ritschard commented on KAFKA-1377:
--

[~ijuma] will do. it looked to me as a generalization of the previous problem.

> transient unit test failure in LogOffsetTest
> 
>
> Key: KAFKA-1377
> URL: https://issues.apache.org/jira/browse/KAFKA-1377
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Reporter: Jun Rao
>Assignee: Jun Rao
>  Labels: newbie
> Fix For: 0.10.0.0
>
> Attachments: KAFKA-1377.patch, KAFKA-1377_2014-04-11_17:42:13.patch, 
> KAFKA-1377_2014-04-11_18:14:45.patch
>
>
> Saw the following transient unit test failure.
> kafka.server.LogOffsetTest > testGetOffsetsBeforeEarliestTime FAILED
> junit.framework.AssertionFailedError: expected:<List(0)> but 
> was:<Vector()>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:71)
> at 
> kafka.server.LogOffsetTest.testGetOffsetsBeforeEarliestTime(LogOffsetTest.scala:198)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2015-12-21 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15067633#comment-15067633
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

[~hachikuji] [~ijuma] I went through the re-factor. I had to fight gradle and 
some unrelated tests which fail for me (on both trunk and this branch), which 
explains the many commits. As it stands the branch builds and passes all tests.

Along the way I discovered that a SinkTask uses similar signatures, I propose 
converging to the same signatures in a separate patch, to get this under way.

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Reopened] (KAFKA-1377) transient unit test failure in LogOffsetTest

2015-12-21 Thread Pierre-Yves Ritschard (JIRA)

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

Pierre-Yves Ritschard reopened KAFKA-1377:
--

I am getting these errors consistently.
This is against trunk on Linux. 64 bit, i7 processor 16G. JDK version:

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)


> transient unit test failure in LogOffsetTest
> 
>
> Key: KAFKA-1377
> URL: https://issues.apache.org/jira/browse/KAFKA-1377
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Reporter: Jun Rao
>Assignee: Jun Rao
>  Labels: newbie
> Fix For: 0.10.0.0
>
> Attachments: KAFKA-1377.patch, KAFKA-1377_2014-04-11_17:42:13.patch, 
> KAFKA-1377_2014-04-11_18:14:45.patch
>
>
> Saw the following transient unit test failure.
> kafka.server.LogOffsetTest > testGetOffsetsBeforeEarliestTime FAILED
> junit.framework.AssertionFailedError: expected:<List(0)> but 
> was:<Vector()>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:71)
> at 
> kafka.server.LogOffsetTest.testGetOffsetsBeforeEarliestTime(LogOffsetTest.scala:198)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-1377) transient unit test failure in LogOffsetTest

2015-12-21 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15066345#comment-15066345
 ] 

Pierre-Yves Ritschard commented on KAFKA-1377:
--

FWIW, bumping the waitTime parameter in TestUtils.scala does not change the 
behavior, so this is not timing related (waiting for 15s instead of 5s still 
exhibits the same behavior).

> transient unit test failure in LogOffsetTest
> 
>
> Key: KAFKA-1377
> URL: https://issues.apache.org/jira/browse/KAFKA-1377
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Reporter: Jun Rao
>Assignee: Jun Rao
>  Labels: newbie
> Fix For: 0.10.0.0
>
> Attachments: KAFKA-1377.patch, KAFKA-1377_2014-04-11_17:42:13.patch, 
> KAFKA-1377_2014-04-11_18:14:45.patch
>
>
> Saw the following transient unit test failure.
> kafka.server.LogOffsetTest > testGetOffsetsBeforeEarliestTime FAILED
> junit.framework.AssertionFailedError: expected:<List(0)> but 
> was:<Vector()>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:71)
> at 
> kafka.server.LogOffsetTest.testGetOffsetsBeforeEarliestTime(LogOffsetTest.scala:198)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2015-12-18 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15064119#comment-15064119
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

[~granthenke] I am not going to argue with this, given the language I mostly 
consume the API from. I will wait for feedback from Jenkins and then push a 
clean-up which removes the superfluous signatures.

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2015-12-18 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15064182#comment-15064182
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

[~granthenke] ok, i'll wait for more opinions on the matter. Now that 
regressions tests have passed on the PR, except for the final decision on this 
aspect and pushing a single cleaned-up commit the PR should be ready.

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2015-12-18 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15064819#comment-15064819
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

Hi,

I just wanted to clarify something. The switch is transparent and uneventful 
from List types to Collection, and it makes perfect sense to remove the List 
signatures.
I would just like a confirmation that Array signatures should go as well since 
if they do, the refactor is going to be much bigger.

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2015-12-18 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15064879#comment-15064879
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

I pushed a version with the superfluous signatures removed for comparison

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (KAFKA-3006) kafka client should offer Collection alternative to Array call signatures

2015-12-17 Thread Pierre-Yves Ritschard (JIRA)
Pierre-Yves Ritschard created KAFKA-3006:


 Summary: kafka client should offer Collection alternative to Array 
call signatures
 Key: KAFKA-3006
 URL: https://issues.apache.org/jira/browse/KAFKA-3006
 Project: Kafka
  Issue Type: Improvement
  Components: clients
Affects Versions: 0.9.0.0
Reporter: Pierre-Yves Ritschard


Some languages (in my case, clojure) make it a bit cumbersome to deal with java 
arrays. 

In the consumer, these four signatures only accepts arrays:

seekToBeginning, seekToEnd, pause, resume.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KAFKA-3006) kafka client should offer Collection alternative to Array call signatures

2015-12-17 Thread Pierre-Yves Ritschard (JIRA)

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

Pierre-Yves Ritschard updated KAFKA-3006:
-
Status: Patch Available  (was: Open)

> kafka client should offer Collection alternative to Array call signatures
> -
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> Some languages (in my case, clojure) make it a bit cumbersome to deal with 
> java arrays. 
> In the consumer, these four signatures only accepts arrays:
> seekToBeginning, seekToEnd, pause, resume.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2015-12-17 Thread Pierre-Yves Ritschard (JIRA)

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

Pierre-Yves Ritschard updated KAFKA-3006:
-
Description: 
The KafkaConsumer API has some annoying inconsistencies in the usage of 
collection types. For example, subscribe() takes a list, but subscription() 
returns a set. Similarly for assign() and assignment(). We also have pause() , 
seekToBeginning(), seekToEnd(), and resume() which annoyingly use a variable 
argument array, which means you have to copy the result of assignment() to an 
array if you want to pause all assigned partitions. We can solve these issues 
by adding the following variants:


{code}
void subscribe(Collection topics);
void subscribe(Collection topics, ConsumerRebalanceListener);
void assign(Collection partitions);
void pause(Collection partitions);
void resume(Collection partitions);
void seekToBeginning(Collection);
void seekToEnd(Collection);
{code}

This issues supersedes KAFKA-2991

  was:
The KafkaConsumer API has some annoying inconsistencies in the usage of 
collection types. For example, subscribe() takes a list, but subscription() 
returns a set. Similarly for assign() and assignment(). We also have pause() , 
seekToBeginning(), seekToEnd(), and resume() which annoyingly use a variable 
argument array, which means you have to copy the result of assignment() to an 
array if you want to pause all assigned partitions. We can solve these issues 
by adding the following variants:


{code}
void subscribe(Collection topics);
void subscribe(Collection topics, ConsumerRebalanceListener);
void assign(Collection partitions);
void pause(Collection partitions);
void resume(Collection partitions);
void seekToBeginning(Collection);
void seekToEnd(Collection);
{code}



> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) kafka client should offer Collection alternative to Array call signatures

2015-12-17 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15062799#comment-15062799
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

[~hachikuji] I added the necessary changes for KAFKA-2991 (still waiting for 
Jenkins to run through the whole test-suite) and incorporated your comments.
To better address the concerns [~jkreps] had in KAFKA-2991, should I mark the 
List and Array signatures as deprecated?

> kafka client should offer Collection alternative to Array call signatures
> -
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> Some languages (in my case, clojure) make it a bit cumbersome to deal with 
> java arrays. 
> In the consumer, these four signatures only accepts arrays:
> seekToBeginning, seekToEnd, pause, resume.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KAFKA-3006) make collection default container type for sequences in the consumer API

2015-12-17 Thread Pierre-Yves Ritschard (JIRA)

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

Pierre-Yves Ritschard updated KAFKA-3006:
-
Summary: make collection default container type for sequences in the 
consumer API  (was: kafka client should offer Collection alternative to Array 
call signatures)

> make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API

2015-12-17 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15063589#comment-15063589
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

I'm open to fixing the PR both ways. The consensus seems to go towards having a 
single signature for each call which would be collections, right?

> Make collection default container type for sequences in the consumer API
> 
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> The KafkaConsumer API has some annoying inconsistencies in the usage of 
> collection types. For example, subscribe() takes a list, but subscription() 
> returns a set. Similarly for assign() and assignment(). We also have pause() 
> , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a 
> variable argument array, which means you have to copy the result of 
> assignment() to an array if you want to pause all assigned partitions. We can 
> solve these issues by adding the following variants:
> {code}
> void subscribe(Collection topics);
> void subscribe(Collection topics, ConsumerRebalanceListener);
> void assign(Collection partitions);
> void pause(Collection partitions);
> void resume(Collection partitions);
> void seekToBeginning(Collection);
> void seekToEnd(Collection);
> {code}
> This issues supersedes KAFKA-2991



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) kafka client should offer Collection alternative to Array call signatures

2015-12-17 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15062613#comment-15062613
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

[~hachikuji] Yes will do so in a couple of hours, thanks for the quick feedback.

> kafka client should offer Collection alternative to Array call signatures
> -
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> Some languages (in my case, clojure) make it a bit cumbersome to deal with 
> java arrays. 
> In the consumer, these four signatures only accepts arrays:
> seekToBeginning, seekToEnd, pause, resume.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3006) kafka client should offer Collection alternative to Array call signatures

2015-12-17 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15062599#comment-15062599
 ] 

Pierre-Yves Ritschard commented on KAFKA-3006:
--

[~hachikuji] Hi Jason, I'm happy to cover KAFKA-2991 in the patch as well.

> kafka client should offer Collection alternative to Array call signatures
> -
>
> Key: KAFKA-3006
> URL: https://issues.apache.org/jira/browse/KAFKA-3006
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Affects Versions: 0.9.0.0
>    Reporter: Pierre-Yves Ritschard
>  Labels: patch
>
> Some languages (in my case, clojure) make it a bit cumbersome to deal with 
> java arrays. 
> In the consumer, these four signatures only accepts arrays:
> seekToBeginning, seekToEnd, pause, resume.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Review Request 32290: Patch for KAFKA-2033

2015-03-20 Thread Pierre-Yves Ritschard

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32290/
---

Review request for kafka.


Bugs: KAFKA-2033
https://issues.apache.org/jira/browse/KAFKA-2033


Repository: kafka


Description
---

ConsumerConfig now expects bootstrap.servers in config.


Diffs
-

  clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java 
862f1f80a625d0d81506643882721aa9864861e1 

Diff: https://reviews.apache.org/r/32290/diff/


Testing
---


Thanks,

Pierre-Yves Ritschard



[jira] [Commented] (KAFKA-2033) Small typo in documentation

2015-03-20 Thread Pierre-Yves Ritschard (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14370917#comment-14370917
 ] 

Pierre-Yves Ritschard commented on KAFKA-2033:
--

Created reviewboard https://reviews.apache.org/r/32290/diff/
 against branch origin/trunk

 Small typo in documentation
 ---

 Key: KAFKA-2033
 URL: https://issues.apache.org/jira/browse/KAFKA-2033
 Project: Kafka
  Issue Type: Bug
  Components: consumer
Affects Versions: 0.8.3, 0.9.0
Reporter: Pierre-Yves Ritschard
Assignee: Neha Narkhede
 Attachments: KAFKA-2033.patch


 The javadoc still mentions metadata.broker.list in the consumer config.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KAFKA-2033) Small typo in documentation

2015-03-20 Thread Pierre-Yves Ritschard (JIRA)

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

Pierre-Yves Ritschard updated KAFKA-2033:
-
Assignee: Pierre-Yves Ritschard  (was: Neha Narkhede)
  Status: Patch Available  (was: Open)

 Small typo in documentation
 ---

 Key: KAFKA-2033
 URL: https://issues.apache.org/jira/browse/KAFKA-2033
 Project: Kafka
  Issue Type: Bug
  Components: consumer
Affects Versions: 0.8.3, 0.9.0
Reporter: Pierre-Yves Ritschard
Assignee: Pierre-Yves Ritschard
 Attachments: KAFKA-2033.patch


 The javadoc still mentions metadata.broker.list in the consumer config.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (KAFKA-2033) Small typo in documentation

2015-03-20 Thread Pierre-Yves Ritschard (JIRA)
Pierre-Yves Ritschard created KAFKA-2033:


 Summary: Small typo in documentation
 Key: KAFKA-2033
 URL: https://issues.apache.org/jira/browse/KAFKA-2033
 Project: Kafka
  Issue Type: Bug
  Components: consumer
Affects Versions: 0.8.3, 0.9.0
Reporter: Pierre-Yves Ritschard
Assignee: Neha Narkhede
 Attachments: KAFKA-2033.patch

The javadoc still mentions metadata.broker.list in the consumer config.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KAFKA-2033) Small typo in documentation

2015-03-20 Thread Pierre-Yves Ritschard (JIRA)

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

Pierre-Yves Ritschard updated KAFKA-2033:
-
Attachment: KAFKA-2033.patch

 Small typo in documentation
 ---

 Key: KAFKA-2033
 URL: https://issues.apache.org/jira/browse/KAFKA-2033
 Project: Kafka
  Issue Type: Bug
  Components: consumer
Affects Versions: 0.8.3, 0.9.0
Reporter: Pierre-Yves Ritschard
Assignee: Neha Narkhede
 Attachments: KAFKA-2033.patch


 The javadoc still mentions metadata.broker.list in the consumer config.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)