Skip to content

Comments

BEAM-307: Upgrade/Test to Kafka 0.10#2069

Closed
mingmxu wants to merge 5 commits intoapache:masterfrom
mingmxu:master
Closed

BEAM-307: Upgrade/Test to Kafka 0.10#2069
mingmxu wants to merge 5 commits intoapache:masterfrom
mingmxu:master

Conversation

@mingmxu
Copy link

@mingmxu mingmxu commented Feb 22, 2017

Run KafkaIOTest.java with mvn test -Dkafka.clients.version=0.10.1.1, or mvn test -Dkafka.clients.version=0.9.0.1 for either Kafka client version.

it can work with Kafka client 0.9 and 0.10 as:

  1. SpEL can find this function, either input is List or Collection;
  2. List extends Collection, so super.assign() could find either assign(List) or assign(Collection).

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.007%) to 69.294% when pulling 07e207d on XuMingmin:master into 0d639e6 on apache:master.

@asfbot
Copy link

asfbot commented Feb 22, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/7689/
--none--

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 69.305% when pulling 71f83b7 on XuMingmin:master into fbaac0f on apache:master.

@asfbot
Copy link

asfbot commented Feb 22, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/7707/
--none--

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 69.312% when pulling 71f83b7 on XuMingmin:master into fbaac0f on apache:master.

@asfbot
Copy link

asfbot commented Feb 22, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/7708/
--none--

@davorbonaci
Copy link
Member

Copy link
Contributor

@rangadi rangadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @xumingmin.
Couple of comments. LGTM with the those fixed.

<description>Library to read Kafka topics.</description>

<properties>
<kafka.clients.version>0.10.1.1</kafka.clients.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep the default to 0.9.0.1? Looks like in Kafka, older clients can connect to newer Kafka servers, but not the other way around.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad, it should be kept as 0.9.0.1

* Kafka version 0.9 and 0.10 are supported. If you need a specific version of Kafka
* client(e.g. 0.9 for 0.9 servers, or 0.10 for security features), specify explicit
* kafka-client dependency.
* kafka-client dependency with Maven property ${kafka.clients.version}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove this update. Uses are not building beam or beam modules by themselves, rather are just using published mvn artifacts. This property is not irrelevant to them.

@Override
//remove keyword '@Override' here, it can work with Kafka client 0.9 and 0.10 as:
//1. SpEL can find this function, either input is List or Collection;
//2. List extends Collection, so super.assign() could find either assign(List)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks for the comment.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 69.31% when pulling 9310275 on XuMingmin:master into fbaac0f on apache:master.

@asfbot
Copy link

asfbot commented Feb 23, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/7731/
--none--

@rangadi
Copy link
Contributor

rangadi commented Feb 23, 2017

👍 LGTM. Thanks Xu.

Copy link
Member

@davorbonaci davorbonaci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Merging.

The next step would be to automate execution of this in the CI system. @xumingmin, let me know if you are interested in taking this on.

@asfgit asfgit closed this in 4f56acb Feb 24, 2017
@mingmxu
Copy link
Author

mingmxu commented Feb 24, 2017

@davorbonaci , more details about 'taking this on'?

@davorbonaci
Copy link
Member

This PR is making it possible to run against multiple versions of Kafka with a single flag. The CI infrastructure is, however, using one, specific version. So, we won't know if/when something breaks here. It would be great to automate testing against multiple versions.

This task would be non-trivial. It can be a new module that changes the dependency. Or, it can be another test invocation in the same module that overrides the version for the second invocation. (Other options available too.) All this may or may not involve spinning multiple-versions of Kafka clusters via, say, Kubernates.

Overall, this is a complex infrastructure work -- it is totally fine if this is not something you are personally interested in. We'll get there eventually ;-)

@rangadi
Copy link
Contributor

rangadi commented Feb 24, 2017

Simplest is extra test invocation in one one of the builds (ci, jenkins, or nightly):
mvn test -Dkafka.clients.version=0.10.1.1 -Dtest=Kafka\* -DfailIfNoTests=false.

e.g. we could add this to /.travis.yml. This ensures the code itself works ok.

@davorbonaci
Copy link
Member

Indeed -- but, that approach won't scale for our project-wide needs, and goes against many of the goals we have set out for our engineering system (e.g., easy for contributors to run the tests, no complicated commands to reproduce what the CI is running, interop with plugins, etc.). So, I'd like to go beyond this.

@mingmxu
Copy link
Author

mingmxu commented Feb 24, 2017

I'll look into this after timestamp support.
Mostly I'll look for a test plugin in pom, so the impact is limited to this module only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants