Commit Graph

2121 Commits

Author SHA1 Message Date
Allen Wang 951e30adc6 KAFKA-1215; Rack-Aware replica assignment option
Please see https://cwiki.apache.org/confluence/display/KAFKA/KIP-36+Rack+aware+replica+assignment for the overall design.

The update to TopicMetadataRequest/TopicMetadataResponse will be done in a different PR.

Author: Allen Wang <awang@netflix.com>
Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>, 	Grant Henke <granthenke@gmail.com>, Jun Rao <junrao@gmail.com>

Closes #132 from allenxwang/KAFKA-1215
2016-03-15 10:03:03 -07:00
MayureshGharat deb2b004cb KAFKA-3013: Display the topic-partition in the exception message for expired batches in recordAccumulator
Added topic-partition information to the exception message on batch expiry in RecordAccumulator

Author: MayureshGharat <gharatmayuresh15@gmail.com>

Reviewers: Gwen Shapira, Lin Dong, Ismael Juma

Closes #695 from MayureshGharat/kafka-3013
2016-03-14 19:22:05 -07:00
Ismael Juma 241c3ebb28 KAFKA-3375; Suppress deprecated warnings where reasonable and tweak compiler settings
* Fix and suppress number of unchecked warnings (except for Kafka Streams)
* Add `SafeVarargs` annotation to fix warnings
* Suppress unfixable deprecation warnings
* Replace deprecated by non-deprecated usage where possible
* Avoid reflective calls via structural types in Scala
* Tweak compiler settings for scalac and javac

Once we drop Java 7 and Scala 2.10, we can tweak the compiler settings further so that they warn us about more things.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Grant Henke, Gwen Shapira, Guozhang Wang

Closes #1042 from ijuma/kafka-3375-suppress-depreccated-tweak-compiler
2016-03-14 19:14:36 -07:00
Jiangjie Qin ffbe624e6f KAFKA-3373; add 'log' prefix to configurations in KIP-31/32
Author: Jiangjie Qin <becket.qin@gmail.com>

Reviewers: Gwen Shapira

Closes #1049 from becketqin/KAFKA-3373
2016-03-14 19:13:26 -07:00
Liquan Pei cf40acc2b1 MINOR: Remove unused method, redundant in interface definition and add final for object used in sychronization
guozhangwang Very minor cleanup.

Author: Liquan Pei <liquanpei@gmail.com>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1063 from Ishiihara/minor-cleanup
2016-03-14 15:09:47 -07:00
Yasuhiro Matsuda c1a56c6839 KAFKA-3395: prefix job id to internal topic names
guozhangwang

Author: Yasuhiro Matsuda <yasuhiro@confluent.io>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1062 from ymatsuda/k3395
2016-03-14 14:50:24 -07:00
Manikumar reddy O ac7b2e95d3 KAFKA-2551; Update Unclean leader election docs
Author: Manikumar reddy O <manikumar.reddy@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Sriharsha Chintalapani <mail@harsha.io>

Closes #1054 from omkreddy/KAFKA-2551
2016-03-13 20:32:47 -07:00
Ismael Juma c9311d5f4e KAFKA-3047: Explicit offset assignment in Log.append can corrupt the log
This fix was suggested by Maciek Makowski, who also reported the problem.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1029 from ijuma/KAFKA-3047-log-append-can-corrupt-the-log
2016-03-11 17:53:32 -08:00
Ashish Singh a162f6bf66 KAFKA-3380; Add system test for GetOffsetShell tool
Author: Ashish Singh <asingh@cloudera.com>

Reviewers: Gwen Shapira

Closes #1048 from SinghAsDev/KAFKA-3380
2016-03-11 12:17:45 -08:00
Jiangjie Qin 02d4da5f64 KAFKA-2960 KAFKA-1148; Clear purgatory for partitions before becoming follower
Author: Jiangjie Qin <becket.qin@gmail.com>

Reviewers: Aditya Auradkar <aauradkar@linkedin.com>, Ismael Juma <ismael@juma.me.uk>, Joel Koshy <jjkoshy.w@gmail.com>, Jun Rao <junrao@gmail.com>, Guozhang Wang <wangguoz@gmail.com>

Closes #1018 from becketqin/KAFKA-2960
2016-03-11 11:22:15 -08:00
Jason Gustafson 764d8ca9eb KAFKA-2073: migrate to client-side topic metadata request/response
Author: Jason Gustafson <jason@confluent.io>
Author: Ismael Juma <ismael@juma.me.uk>
Author: hachikuji <jason@confluent.io>

Reviewers: Grant Henke, Ismael Juma, Gwen Shapira, Flavio Junquiera

Closes #988 from hachikuji/KAFKA-2073
2016-03-11 11:11:59 -08:00
Manikumar reddy O 287cce251f MINOR: update compression design doc to include lz4 protocol
Author: Manikumar reddy O <manikumar.reddy@gmail.com>

Reviewers: Ismael Juma, Guozhang Wang

Closes #1040 from omkreddy/MINOR-DOC
2016-03-11 10:56:21 -08:00
Guozhang Wang 9c4c5ae1cd MINOR: Add unit test for internal topics
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Yasuhiro Matsuda <yasuhiro@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1047 from guozhangwang/KInternal
2016-03-10 14:54:47 -08:00
Eno Thereska 04ef9c3547 MINOR: Increased default EC2 instance size
AWS instance size increased to m3.xlarge to allow all system tests to pass. ijuma ewencp have a look please.

Author: Eno Thereska <eno.thereska@gmail.com>

Reviewers: Gwen Shapira

Closes #1046 from enothereska/minor-aws
2016-03-10 12:13:04 -08:00
Jason Gustafson e403b3c4bf KAFKA-3318: clean up consumer logging and error messages
Author: Jason Gustafson <jason@confluent.io>

Reviewers: Ismael Juma

Closes #1036 from hachikuji/KAFKA-3318
2016-03-10 11:29:08 -08:00
Gwen Shapira 6eb061fa85 MINOR: Fix system test broken by change of consumer group tool output format
… format

Author: Gwen Shapira <cshapi@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1039 from gwenshap/minor-consumer-groups
2016-03-10 11:12:07 -08:00
Grant Henke 1a451b4812 MINOR: Add header and footer to protocol docs
Because protocol.html is going to be in its own page it needs the header and footer included.

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Gwen Shapira

Closes #1043 from granthenke/protocol-docs-style
2016-03-10 10:44:58 -08:00
Ashish Singh 83f714bae1 KAFKA-3344: Remove previous system test's leftover test-log4j.properties
Author: Ashish Singh <asingh@cloudera.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1024 from SinghAsDev/KAFKA-3344
2016-03-09 23:55:22 -08:00
Grant Henke df41bc544a MINOR: KAFKA-3361 follow up
Author: Grant Henke <granthenke@gmail.com>

Reviewers: Gwen Shapira

Closes #1037 from granthenke/protocol-minor
2016-03-09 21:55:05 -08:00
Grant Henke f0a4125d3e KAFKA-3361: Initial protocol documentation page and generation
- Moves all generated docs under /docs/generated
- Generates docs for Protocol, Errors, and ApiKeys
- Adds new protocol.html page

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Gwen Shapira

Closes #970 from granthenke/protocol-doc-wip
2016-03-09 21:13:54 -08:00
Ismael Juma ee9995583a KAFKA-3357; Update to Scala 2.11.8
Scala 2.11.8 has been released with a number of bug fixes:
* http://www.scala-lang.org/news/2.11.8/

There are a few important collection fixes:
* https://issues.scala-lang.org/browse/SI-9497
* https://github.com/scala/scala/pull/4714
* https://github.com/scala/scala/pull/4693

And also some pattern matcher fixes.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Grant Henke, Ashish Singh

Closes #1032 from ijuma/kafka-3357-update-to-scala-2.11.8
2016-03-09 17:57:24 -08:00
Ismael Juma 8180803123 KAFKA-3352: Avoid DNS reverse lookups
By using `getHostString` (introduced in Java 7) instead of `getHostName`.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Jason Gustafson, Grant Henke

Closes #1030 from ijuma/kafka-3352-avoid-dns-reverse-look-ups
2016-03-09 14:19:57 -08:00
Ismael Juma 59d19cf3e9 MINOR: Update gradlew.bat as per latest gradle release
When invoking `gradle` on a recent version, it updates `gradlew.bat` to fix a typo. It's an annoyance at development time as it causes a diff on whatever branch one is working on.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Grant Henke <granthenke@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1034 from ijuma/update-gradlew.bat
2016-03-09 09:24:18 -08:00
Rajini Sivaram 324b0c85f6 KAFKA-3279: Remove checks for JAAS system property
JAAS configuration may be set using other methods and hence the check for System property doesn't  always match where the actual configuration used by Kafka is loaded from.

Author: Rajini Sivaram <rajinisivaram@googlemail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Sriharsha Chintalapani <harsha@hortonworks.com>, Flavio Junqueira <fpj@apache.org>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #967 from rajinisivaram/KAFKA-3279
2016-03-08 23:40:09 -08:00
Matthias J. Sax 689309135b MINOR: Clean up of ProducerConfig documentation, including correction for block.on.buffer.full
default value is "false" and not "true"

See: https://stackoverflow.com/questions/35578519/kafka-block-on-buffer-full-default-value
and d5b43b19bb/clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java (L232)

Author: mjsax <mjsax@apache.org>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Grant Henke <granthenke@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #954 from mjsax/hotfix-docu
2016-03-08 22:53:34 -08:00
Jeremy Custenborder 090d7220e2 KAFKA-3237: Allow ConfigDef options with no default and validator
Remove test cases testInvalidDefaultRange() and testInvalidDefaultString(). Defaults if not overridden will get checked on parse. Testing the defaults is unnecessary. This allows you to set that a parameter is required while setting a validator for that parameter. Added a test case testNullDefaultWithValidator that allows a null default with a validator for certain strings.

Author: Jeremy Custenborder <jcustenborder@gmail.com>

Reviewers: Grant Henke <granthenke@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #936 from jcustenborder/KAFKA-3237
2016-03-08 21:56:33 -08:00
Geoff Anderson 39f1c3ff83 MINOR: Ignoring streams tests until there is fix for KAFKA-3354
Per discussion with guozhangwang, `ignore` failing streams system tests until fix for KAFKA-3354 is checked in.

Author: Geoff Anderson <geoff@confluent.io>

Reviewers: Guozhang Wang

Closes #1031 from granders/ignore-streams-systest
2016-03-08 21:40:40 -08:00
Jiangjie Qin c4282371d9 KAFKA-3343; Use NoTimestamp in GroupMetadataManager when message v0 i…
…s used.

Author: Jiangjie Qin <becket.qin@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Jun Rao <junrao@gmail.com>

Closes #1023 from becketqin/KAFKA-3343
2016-03-08 18:34:07 -06:00
Jiangjie Qin 5afa166010 KAFKA-3197; Fix producer sending records out of order
This patch reuse max.in.flight.request.per.connection. When it equals to one, we take it as user wants order protection. The current approach is make sure there is only one batch per partition on the fly.

Author: Jiangjie Qin <becket.qin@gmail.com>

Reviewers: Aditya Auradkar <aauradkar@linkedin.com>, Jason Gustafson <jason@confluent.io>, Grant Henke <granthenke@gmail.com>, Ismael Juma <ismael@juma.me.uk>, Joel Koshy <jjkoshy.w@gmail.com>, Jun Rao <junrao@gmail.com>

Closes #857 from becketqin/KAFKA-3197
2016-03-08 14:06:53 -08:00
Anna Povzner f6e35dec9b KAFKA-3201: Added rolling upgrade system tests from 0.8 and 0.9 to 0.10
Three main tests:
1. Setup: Producer (0.8) → Kafka Cluster → Consumer (0.8)
First rolling bounce: Set inter.broker.protocol.version = 0.8 and message.format.version = 0.8
Second rolling bonus, use latest (default) inter.broker.protocol.version and message.format.version
2. Setup: Producer (0.9) → Kafka Cluster → Consumer (0.9)
First rolling bounce: Set inter.broker.protocol.version = 0.9 and message.format.version = 0.9
Second rolling bonus, use latest (default) inter.broker.protocol.version and message.format.version
3. Setup: Producer (0.9) → Kafka Cluster → Consumer (0.9)
First rolling bounce: Set inter.broker.protocol.version = 0.9 and message.format.version = 0.9
Second rolling bonus: use inter.broker.protocol.version = 0.10 and message.format.version = 0.9

Plus couple of variations of these tests using old/new consumer and no compression / snappy compression.

Author: Anna Povzner <anna@confluent.io>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #980 from apovzner/kafka-3201-02
2016-03-07 23:18:17 -08:00
Grant Henke 8d0c298c8c KAFKA-2068; KAFKA-2069; Replace OffsetCommit and OffsetFetch Request/…
…Response with o.a.k.c.requests equivalent

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Ismael Juma

Closes #927 from granthenke/offset-refactor
2016-03-07 18:33:52 -08:00
Christian Posta 2fed0c62db MINOR: tidy up spacing for ConsumerGroupCommand related to KAFKA-1476 …
https://issues.apache.org/jira/browse/KAFKA-1476

Let me know if these kind of contributions should have their own requisite JIRA opened in advance.

Cheers..

Author: Christian Posta <christian.posta@gmail.com>

Reviewers: Gwen Shapira

Closes #945 from christian-posta/ceposta-tidy-up-consumer-groups-describe
2016-03-07 18:30:01 -08:00
Grant Henke 33fcaad26e MINOR: Remove usage of deprecated junit.framework.Assert
Author: Grant Henke <granthenke@gmail.com>

Reviewers: Gwen Shapira

Closes #938 from granthenke/junit-dep
2016-03-07 18:24:16 -08:00
Ismael Juma 94c2343419 KAFKA-3341: Improve error handling on invalid requests
* Include request id when parsing of request header fails
* Don't mute selector on a connection that was closed due to an error (otherwise a second exception is thrown)
* Throw appropriate exception from `ApiKeys.fromId` if invalid id is passed
* Fail fast in `AbstractRequest.getRequest` if we fail to handle an instance of `ApiKeys` (if this happens, it's a programmer error and the code in `getRequest` needs to be updated)

I ran into the top two issues while trying to figure out why a connection from a producer to a broker was failing (and it made things harder than necessary). While fixing them, I noticed the third and fourth issues.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Gwen Shapira

Closes #1017 from ijuma/kafka-3341-improve-error-handling-invalid-requests
2016-03-07 11:34:12 -08:00
Manikumar reddy O 5761a9ec72 MINOR: streams javadoc corrections
Author: Manikumar reddy O <manikumar.reddy@gmail.com>

Reviewers: Gwen Shapira

Closes #1019 from omkreddy/JAVADOC
2016-03-07 11:32:34 -08:00
Ashish Singh 25bde48e6a KAFKA-3339: Fix java docs for seekToEnd and seekToBeginning.
Author: Ashish Singh <asingh@cloudera.com>

Reviewers: Gwen Shapira

Closes #1021 from SinghAsDev/KAFKA-3339
2016-03-07 11:28:41 -08:00
Yifan Ying 33f3307546 KAFKA-3233: expose consumer per-topic metrics
In version of 0.8.2.1, the old consumer will provide the metrics reporter per-topic consumer metrics under group 'ConsumerTopicMetrics'. For example:

*.ConsumerTopicMetrics.clientId.[topic name].BytesPerSec.count
*.ConsumerTopicMetrics.clientId.[topic name].MessagesPerSec.count

These consumer metrics are useful since it helps us monitor consumer rate for each topic. But the new consumer(0.9.0.0) doesn't expose per topic metrics anymore, even though I did find sensor objects in consumer metrics object collecting per-topic metrics.

After investigation, I found that these sensors are not registering any KafkaMetrics.

Author: Yifan Ying <yying@fitbit.com>

Reviewers: Grant Henke, Jason Gustafson, Guozhang Wang

Closes #939 from happymap/KAFKA-3233
2016-03-05 15:17:21 -08:00
Gwen Shapira b7d6fae59e KAFKA-3299: Ensure that reading config log on rebalance doesn't hang the herder
Author: Gwen Shapira <cshapi@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #981 from gwenshap/KAFKA-3299
2016-03-04 14:21:22 -08:00
Michael G. Noll 6d65edebae HOTFIX: Generate javadocs for all Streams packages with the exception of internals
Author: Michael G. Noll <michael@confluent.io>

Reviewers: Eno Thereska, Gwen Shapira

Closes #1013 from miguno/trunk-streams-javadocs-fixes
2016-03-04 10:28:55 -08:00
Sasaki Toru f7887bd6f9 KAFKA-3281: Improve message of *-server-stop.sh when process is not running
Stop scritps such as kafka-server-stop.sh log messages of kill command's error when processes aren't running.
This PR changes this message to "No kafka server to stop".

Author: Sasaki Toru <sasakitoa@nttdata.co.jp>

Reviewers: Gwen Shapira

Closes #971 from sasakitoa/stop_scripts_says_not_good_message
2016-03-03 17:41:47 -08:00
Ashish Singh d63bdc28ca KAFKA-3187: Make kafka-acls.sh help messages more generic.
Author: Ashish Singh <asingh@cloudera.com>

Reviewers: Gwen Shapira

Closes #892 from SinghAsDev/KAFKA-3187
2016-03-03 17:34:38 -08:00
Aditya Auradkar 5d89365448 KAFKA-3310; Fix for NPEs observed when throttling clients.
The fix basically ensures that the throttleTimeSensor is non-null before handing off to record the metric value. We also record the throttle time to 0 so that we don't recreate the sensor always.

Author: Aditya Auradkar <aauradkar@linkedin.com>

Reviewers: Jiangjie Qin <becket.qin@gmail.com>, Jun Rao <junrao@gmail.com>

Closes #989 from auradkar/KAFKA-3310
2016-03-03 16:16:56 -08:00
Grant Henke f25fe02d99 KAFKA-3286: Add plugin to quickly check for outdated dependencies
Adds a gradle task to generate a report of outdate release dependencies:
`gradle dependencyUpdates`

Updates a few minor versions.

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Ismael Juma, Gwen Shapira

Closes #973 from granthenke/outdated-deps
2016-03-03 15:10:16 -08:00
Jason Gustafson 7079f57f70 KAFKA-3290: fix race condition with worker task shutdown and mock validation
Author: Jason Gustafson <jason@confluent.io>

Reviewers: Gwen Shapira

Closes #1008 from hachikuji/KAFKA-3290-REVISITED
2016-03-03 14:58:43 -08:00
Michael G. Noll c8b6c18f68 HOTFIX: Include RocksDB dependency in release tarballs
Without this change `./gradlew releaseTarGz` (and its variants) will not include the RocksDB jar, which is required for Kafka Streams, in Kafka's `libs/` folder.  The impact is that any Streams job will fail when it runs against a broker that was installed via a release tarball.

guozhangwang junrao : please review.

Author: Michael G. Noll <michael@confluent.io>

Reviewers: Jun Rao <junrao@gmail.com>

Closes #1007 from miguno/trunk-rocksdb-fixes
2016-03-03 13:41:17 -08:00
Duncan Sands ae1fd08587 KAFKA-3325: Out of date instructions in quickstart guide
Adjust the listeners property rather than the port.  Following the original instructions would result in all of the brokers being started with the same listeners setting, and so fail to work.

Author: Duncan Sands <baldrick@free.fr>

Reviewers: Ismael Juma, Gwen Shapira

Closes #1002 from CunningBaldrick/quickstart
2016-03-03 11:47:33 -08:00
Sasaki Toru 291f430d9c MINOR: Fix typos in docs
Author: Sasaki Toru <sasakitoa@nttdata.co.jp>

Reviewers: Gwen Shapira

Closes #1003 from sasakitoa/Fix_typo_in_docs
2016-03-03 11:46:16 -08:00
Jun Rao 0d49a54269 KAFKA-3314: Add CDDL license to LICENSE and NOTICE file
Author: Jun Rao <junrao@gmail.com>

Reviewers: Guozhang Wang, Ismael Juma, Gwen Shapira

Closes #997 from junrao/kafka-3314
2016-03-03 11:43:09 -08:00
Guozhang Wang 1d19ac9fea HOTFIX: Avoid NPE in StreamsPartitionAssignor
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Michael G. Noll <michael@confluent.io>

Closes #1004 from guozhangwang/KStreamPANPE
2016-03-03 08:57:21 -08:00
jinxing 079c88178d KAFKA-2934; Offset storage file configuration in Connect standalone mode is not included in StandaloneConfig
Added offsetBackingStore config to StandaloneConfig and DistributedConfig;
Added config for offset.storage.topic and config.storage.topic into DistributedConfig;

Author: jinxing <jinxing@fenbi.com>

Reviewers: Jason Gustafson <jason@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #734 from ZoneMayor/trunk-KAFKA-2934
2016-03-03 08:54:37 -08:00