Commit Graph

2242 Commits

Author SHA1 Message Date
Ismael Juma a5f1158c31 KAFKA-3558; Add compression_type parameter to benchmarks in benchmark_test.py
* Use a fixed `Random` seed in `EndToEndLatency.scala` for determinism
* Add `compression_type` to and remove `consumer_fetch_max_wait` from `end_to_end_latency.py`. The latter was never used.
* Tweak logging of `end_to_end_latency.py` to be similar to `consumer_performance.py`.
* Add `compression_type` to `benchmark_test.py` methods and add `snappy` to `matrix` annotation
* Use randomly generated bytes from a restricted range for `ProducerPerformance` payload. This is a simple fix for now. It can be improved in the PR for KAFKA-3554.

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

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

Closes #1225 from ijuma/kafka-3558-add-compression_type-benchmark_test.py
2016-04-18 14:23:46 -07:00
Grant Henke a81ad2582e KAFKA-3563: Maintain MessageAndMetadata constructor compatibility
Author: Grant Henke <granthenke@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Ashish Singh <asingh@cloudera.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1226 from granthenke/message_constructor
2016-04-18 14:10:26 -07:00
Jason Gustafson 03817d5a26 KAFKA-3529: Fix transient failure in testCommitAsync
Author: Jason Gustafson <jason@confluent.io>

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

Closes #1234 from hachikuji/KAFKA-3529
2016-04-18 12:49:36 -07:00
Jason Gustafson 89c67727c2 KAFKA-3506: Kafka Connect restart APIs
Author: Jason Gustafson <jason@confluent.io>

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

Closes #1189 from hachikuji/KAFKA-3506
2016-04-18 10:50:58 -07:00
Bill Bejeck b1691cf49e KAFKA-3430: Allow users to set key in KTable.toStream and in KStream.
… With KStream the method selectKey was added to enable getting a key from values before perfoming aggregation-by-key operations on original streams that have null keys.

Author: bbejeck <bbejeck@gmail.com>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1222 from bbejeck/KAFKA-3430_allow_users_to_set_key_KTable_toStream
2016-04-16 20:18:27 -07:00
Liquan Pei 5236bf60de KAFKA-3526: Return string instead of object in ConfigKeyInfo and ConfigValueInfo
Author: Liquan Pei <liquanpei@gmail.com>

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

Closes #1200 from Ishiihara/config-string
2016-04-15 15:51:31 -07:00
Grant Henke 065ddf9019 KAFKA-3549: Close consumers instantiated in consumer tests
Author: Grant Henke <granthenke@gmail.com>

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

Closes #1217 from granthenke/close-consumers
2016-04-14 22:02:19 -07:00
Ismael Juma 4fa456bc6e KAFKA-3557; Update rocksdb to 4.4.1 and patch updates to snappy and slf4j
* The hope is that RocksDb 4.4.1 is more stable than 4.1.0 (occasional segfaults) and 4.2.0 (very frequent segfaults), release notes for 4.4.1: https://www.facebook.com/groups/rocksdb.dev/permalink/925995520832296/
* slf4j 1.7.21 includes thread-safety fixes: http://www.slf4j.org/news.html
* snappy 1.1.2.4 includes performance improvements requested by Spark, which apply to our usage: https://github.com/xerial/snappy-java/blob/master/Milestone.md

I ran the stream tests several times and they passed every time while 4.2.0 segfaulted every time.

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

Reviewers: Eno Thereska <eno.thereska@gmail.com>, Guozhang Wang <wangguoz@gmail.com>

Closes #1219 from ijuma/kafka-3557-update-rocks-db-4.4.1-snappy-slf4j
2016-04-14 10:44:05 -07:00
Jason Gustafson f4d3d28658 KAFKA-3470: treat commits as member heartbeats
Author: Jason Gustafson <jason@confluent.io>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Guozhang Wang <wangguoz@gmail.com>

Closes #1206 from hachikuji/KAFKA-3470
2016-04-13 18:09:08 -07:00
Ismael Juma c1694833d5 KAFKA-3490; Multiple version support for ducktape performance tests
Author: Ismael Juma <ismael@juma.me.uk>
Author: Geoff Anderson <geoff@confluent.io>

Reviewers: Geoff Anderson <geoff@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1173 from ijuma/kafka-3490-multiple-version-support-perf-tests
2016-04-13 13:50:49 -07:00
Eno Thereska 667ff7ef73 KAFKA-3504; Log compaction for changelog partition
Author: Eno Thereska <eno.thereska@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Guozhang Wang <wangguoz@gmail.com>

Closes #1203 from enothereska/KAFKA-3504-logcompaction
2016-04-12 17:38:20 -07:00
Dongjoon Hyun e79d9af3cf KAFKA-3461: Fix typos in Kafka web documentations.
This PR fixes 8 typos in HTML files of `docs` module. I wrote explicitly here since Github sometimes does not highlight the corrections on long lines correctly.
- docs/api.html: compatability => compatibility
- docs/connect.html: simultaneoulsy => simultaneously
- docs/implementation.html: LATIEST_TIME => LATEST_TIME, nPartions => nPartitions
- docs/migration.html: Decomission => Decommission
- docs/ops.html: stoping => stopping, ConumserGroupCommand => ConsumerGroupCommand, youre => you're

Author: Dongjoon Hyun <dongjoon@apache.org>

Reviewers: Ismael Juma

Closes #1138 from dongjoon-hyun/KAFKA-3461
2016-04-12 13:48:18 -07:00
Grant Henke 34a5944721 MINOR: Remove unused hadoop version
All dependencies on hadoop were removed with MiniKDC. This removes the left over version entry.

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Ismael Juma

Closes #1214 from granthenke/remove-hadoop
2016-04-12 13:47:02 -07:00
Eno Thereska ba9456de2e KAFKA-3439; Added exceptions thrown
Author: Eno Thereska <eno.thereska@gmail.com>

Reviewers: Guozhang Wang

Closes #1213 from enothereska/KAFKA-3439-throws
2016-04-12 13:00:54 -07:00
Ismael Juma 319c6e7195 MINOR: Add missing `@Override` to `KStreamImpl.through`
Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1216 from ijuma/add-missing-override-to-through
2016-04-12 11:34:46 -07:00
Guozhang Wang 40fd456649 KAFKA-3519: Refactor Transformer's transform / punctuate to return nullable values
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Dan Norwood, Anna Povzner

Closes #1204 from guozhangwang/KTransformR
2016-04-11 12:33:48 -07:00
Igor Stepanov 1ec842a3ea MINOR: fix incorrect exception message in KafkaProducer
While playing with client got the next exception:
```java
java.lang.IllegalArgumentException: Invalid partition given with record: 1 is not in the range [0...1].
```
It's obviously incorrect, so I've fixed it.

Author: Igor Stepanov <igor.stepanov@keystonett.com>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1210 from stepio/trunk
2016-04-11 12:02:49 -07:00
Ewen Cheslack-Postava 411b04a3c9 MINOR: Make VerifiableProducer in system tests lookup security configuration dynamically instead of at construction.
Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Anna Povzner

Closes #1207 from ewencp/minor-dynamic-security-config-verifiable-producer
2016-04-11 10:37:04 -07:00
Guozhang Wang c76b6e6d9b HOTFIX: special handling first ever triggered punctuate
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Anna Povzner <anna@confluent.io>

Closes #1208 from guozhangwang/KPunctuate
2016-04-10 23:09:43 -07:00
bbejeck 7c27989860 KAFKA-3338: Add print and writeAsText to KStream/KTable in Kafka Streams
Addresses comments from previous PR [#1187]
    Changed print and writeAsText method return signature to void
    Flush System.out on close
    Changed IllegalStateException to TopologyBuilderException
    Updated MockProcessorContext.topic method to return a String
    Renamed KStreamPrinter to KeyValuePrinter
    Updated the printing of null keys to 'null' to match ConsoleConsumer
    Updated JavaDoc stating need to override toString

Author: bbejeck <bbejeck@gmail.com>

Reviewers: Dan Norwood, Guozhang Wang

Closes #1209 from bbejeck/KAFKA-3338_Adding_print/writeAsText_to_Streams_DSL
2016-04-10 17:43:47 -07:00
Guozhang Wang 8c59565761 KAFKA-3521: validate null keys in Streams DSL implementations
Author: Guozhang Wang <wangguoz@gmail.com>

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

Closes #1197 from guozhangwang/K3521
2016-04-08 13:30:46 -07:00
Jason Gustafson 2a8fa28786 KAFKA-3528: handle wakeups while rebalancing more gracefully
Author: Jason Gustafson <jason@confluent.io>

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

Closes #1201 from hachikuji/KAFKA-3528
2016-04-08 12:55:21 -07:00
Jason Gustafson cbdd70ec0d MINOR: improve logging of consumer system tests
Author: Jason Gustafson <jason@confluent.io>

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

Closes #1199 from hachikuji/improve-consumer-systests
2016-04-08 10:04:46 -07:00
Stig Rohde Døssing 4d467c2ec2 KAFKA-725: Return OffsetOutOfRange error from ReplicaManager when non-follower attempts reading an offset that's above high watermark.
This should make Log.read act the same when startOffset is larger than maxOffset as it would if startOffset was larger than logEndOffset. The current behavior can result in an IllegalArgumentException from LogSegment if a consumer attempts to fetch an offset above the high watermark which is present in the leader's log. It seems more correct if Log.read presents the view of the log to consumers as if it simply ended at maxOffset (high watermark).

I've tried to describe an example scenario of this happening here https://issues.apache.org/jira/browse/KAFKA-725?focusedCommentId=15221673&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15221673

I'm not sure I understand why ReplicaManager sets maxOffset to the high watermark, and not high watermark + 1. Isn't the high watermark the last committed message, and readable by consumers?

Tests passed for me locally on second try, seems like it just hit a flaky test.

Author: Stig Rohde Døssing <sdo@it-minds.dk>

Reviewers: Jiangjie Qin <becket.qin@gmail.com>, Guozhang Wang <wangguoz@gmail.com>

Closes #1178 from srdo/KAFKA-725
2016-04-08 09:44:51 -07:00
Eno Thereska 9beafae23a KAFKA-3512: Added foreach operator
miguno guozhangwang please have a look if you can.

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

Reviewers: Michael G. Noll <michael@confluent.io>, Guozhang Wang <wangguoz@gmail.com>

Closes #1193 from enothereska/kafka-3512-ForEach
2016-04-08 09:17:05 -07:00
Guozhang Wang 3a58407e2e KAFKA-3505: Fix punctuate generated record metadata
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Anna Povzner <anna@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1190 from guozhangwang/K3505
2016-04-08 08:59:50 -07:00
Anna Povzner 8b9b07e5d6 MINOR: ensure original use of prop_file in verifiable producer
This PR: https://github.com/apache/kafka/pull/958 fixed the use of prop_file in the situation when we have multiple producers (before, every producer will add to the config). However, it assumes that self.prop_file is initially "". This is correct for all existing tests, but it precludes us from extending verifiable producer and adding more properties to the producer config (same as console consumer).

This is a small PR to change the behavior to the original, but also make verifiable producer use prop_file method to be consistent with console consumer.

Also few more fixes to verifiable producer came up during the review:
-- fixed each_produced_at_least() method
-- more straightforward use of compression types

granders please review.

Author: Anna Povzner <anna@confluent.io>

Reviewers: Geoff Anderson <geoff@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1192 from apovzner/fix_verifiable_producer
2016-04-07 18:17:40 -07:00
Rajini Sivaram 9c34df1511 KAFKA-3488; Avoid failing of unsent requests in consumer where possible
Fail unsent requests only when returning from KafkaConsumer.poll().

Author: Rajini Sivaram <rajinisivaram@googlemail.com>

Reviewers: Jason Gustafson <jason@confluent.io>, Ismael Juma <ismael@juma.me.uk>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1183 from rajinisivaram/KAFKA-3488
2016-04-07 15:48:50 -07:00
Eno Thereska 8dbd688b16 KAFKA-3497: Streams ProcessorContext should support forward() based on child name
Author: Eno Thereska <eno.thereska@gmail.com>

Reviewers: Yuto Kawamura, Michael G. Noll, Guozhang Wang

Closes #1194 from enothereska/kafka-3497-forward
2016-04-07 10:20:17 -07:00
Matthias J. Sax 99d2329227 KAFKA-3477: extended KStream/KTable API to specify custom partitioner for sinks
Author: mjsax <matthias@confluent.io>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1180 from mjsax/kafka-3477-streamPartitioner-DSL
2016-04-05 15:56:09 -07:00
Grant Henke 8218a4a153 KAFKA-3508: Fix transient SimpleACLAuthorizerTest failures
Allows the the maximum retires when writing to zookeeper to be overridden in tests and sets the value to Int.MaxValue to avoid transient failure.

Author: Grant Henke <granthenke@gmail.com>

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

Closes #1156 from granthenke/transient-acl-test
2016-04-05 15:17:46 -07:00
Ismael Juma 893e79af88 KAFKA-3489; Update request metrics if a client closes a connection while the broker response is in flight
I also fixed a few issues in `SocketServerTest` and included a few clean-ups.

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

Reviewers: Jun Rao <junrao@gmail.com>

Closes #1172 from ijuma/kafka-3489-update-request-metrics-if-client-closes
2016-04-05 18:16:48 -04:00
Ismael Juma aee8ebb46c KAFKA-3510; OffsetIndex thread safety
* Make all fields accessed outside of a lock `volatile`
* Only allow mutation within the class
* Remove unnecessary `AtomicInteger` since mutation always happens inside a lock

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

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1188 from ijuma/kafka-3510-offset-index-thread-safety
2016-04-05 11:46:04 -07:00
Matt McClure 732b111f45 KAFKA-3384: Conform to POSIX kill usage
I believe this addresses KAFKA-3384.

The POSIX kill manpage is at http://pubs.opengroup.org/onlinepubs/9699919799/utilities/kill.html

Author: Matt McClure <mlm@aya.yale.edu>

Reviewers: Geoff Anderson <geoff@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1148 from matthewlmcclure/KAFKA-3384
2016-04-04 22:07:20 -07:00
Jason Gustafson 4ff667711f KAFKA-2998: log warnings when client is disconnected from bootstrap brokers
Author: Jason Gustafson <jason@confluent.io>

Reviewers: Grant Henke, Guozhang Wang

Closes #769 from hachikuji/KAFKA-2998
2016-04-04 21:28:59 -07:00
Ewen Cheslack-Postava c3c9289c12 KAFKA-3464: Add system tests for Connect with Kafka security enabled
Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Ismael Juma, Gwen Shapira

Closes #1141 from ewencp/kafka-3464-connect-security-system-tests
2016-04-04 18:49:29 -07:00
Yasuhiro Matsuda 31e263e829 HOTFIX: set timestamp in SinkNode
guozhangwang
Setting the timestamp in produced records in SinkNode. This forces the producer record's timestamp same as the context's timestamp.

Author: Yasuhiro Matsuda <yasuhiro@confluent.io>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1137 from ymatsuda/set_timestamp_in_sinknode
2016-04-04 14:57:15 -07:00
Grant Henke 45c585b4f7 KAFKA-3483: Restructure ducktape tests to simplify running subsets of tests
… tests

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Geoff Anderson <geoff@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1162 from granthenke/ducktape-structure
2016-04-03 20:04:36 -07:00
Liquan Pei 83cf38545b MINOR: Clean up of SourceTaskOffsetCommiter
Author: Liquan Pei <liquanpei@gmail.com>

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

Closes #1170 from Ishiihara/minor-cleanup
2016-04-03 19:04:48 -07:00
Paul Cavallaro 3a20ba3055 MINOR: Fix small typo in design section
Sentence was missing "as", minor grammar clean up.

Author: Paul Cavallaro <paulcavallaro@gmail.com>

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

Closes #1151 from paulcavallaro/docs-fix
2016-04-03 18:14:53 -07:00
Ismael Juma b94a7812be KAFKA-3495; NetworkClient.blockingSendAndReceive` should rely on requestTimeout
Also removed the code for handling negative timeouts in `blockingReady` as `Selector.poll` has not supported that for a while.

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

Reviewers: Jun Rao <junrao@gmail.com>

Closes #1177 from ijuma/kafka-3495-blocking-send-and-receive-request-timeout
2016-04-03 16:34:46 -07:00
Jason Gustafson ef3f053155 KAFKA-3419: clarify difference between topic subscription and partition assignment
Author: Jason Gustafson <jason@confluent.io>

Reviewers: Ashish Singh, Ismael Juma, Guozhang Wang

Closes #1158 from hachikuji/KAFKA-3419
2016-04-03 13:44:05 -07:00
Jason Gustafson dd5480a47e KAFKA-3486: fix autocommit when partitions assigned manually
Author: Jason Gustafson <jason@confluent.io>

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

Closes #1169 from hachikuji/KAFKA-3486
2016-04-02 23:02:19 -07:00
Yasuhiro Matsuda bd5325dd8b MINOR: small code optimizations in streams
guozhangwang

Author: Yasuhiro Matsuda <yasuhiro@confluent.io>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1176 from ymatsuda/optimize
2016-04-01 17:14:29 -07:00
Flavio Junqueira 75ec67eda8 KAFKA-2930: Update references to ZooKeeper in the docs.
Author: Flavio Junqueira <fpj@apache.org>

Reviewers: Ismael Juma, Gwen Shapira

Closes #615 from fpj/KAFKA-2930
2016-04-01 15:57:39 -07:00
Ismael Juma 89fd97f8c9 KAFKA-2844; Separate keytabs for sasl tests
Use a different keytab for server and client in SASL tests

Also:
* Improve approach used to build the JAAS files programmatically
* Delete stale `kafka_jaas.conf` file
* Move `FourLetterWords` to its own file, add `Zk` prefix and clean-up its usage

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

Reviewers: Harsha Chintalapani, Gwen Shapira

Closes #533 from ijuma/separate-keytabs-for-sasl-tests
2016-04-01 15:25:35 -07:00
Ashish Singh a4d6f1dce5 MINOR: Add check for empty topics iterator in ReplicaVerificationTool.
Author: Ashish Singh <asingh@cloudera.com>

Reviewers: Guozhang Wang, Gwen Shapira

Closes #1167 from SinghAsDev/minorFixRelicaLagTool
2016-04-01 14:12:49 -07:00
Grant Henke b865413cd8 MINOR: Fix BNF output for protocol arrays conataining primitives in docs
Before this patch arrays containing primitive types were not output:
```
Metadata Request (Version: 0) => [topics]
```

After this patch the type is listed:
```
Metadata Request (Version: 0) => [topics]
      topics => STRING
```

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Ashish Singh, Gwen Shapira

Closes #1174 from granthenke/protocol-arrays
2016-04-01 13:56:11 -07:00
Guozhang Wang ae939467e8 MINOR: add null check for aggregate and reduce operators
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Yasuhiro Matsuda, Gwen Shapira

Closes #1175 from guozhangwang/KSNullPointerException
2016-04-01 13:14:47 -07:00
Rajini Sivaram 77142f6bae KAFKA-2910: Close Zookeeper clients in unit tests
Zookeeper clients that are not closed after the server is shutdown keep trying to reconnect, reloading JAAS configuration. This impacts subsequent tests which rely on JAAS config to be reset.

Author: Rajini Sivaram <rajinisivaram@googlemail.com>

Reviewers: Flavio Junqueira <fpj@apache.org>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1171 from rajinisivaram/KAFKA-2910
2016-04-01 10:52:26 -07:00