Commit Graph

1556 Commits

Author SHA1 Message Date
Gwen Shapira 939c4244e7 KAFKA-2449: Update mirror maker docs
…s to multiple source clusters

Author: Gwen Shapira <cshapi@gmail.com>

Reviewers: Ismael Juma

Closes #356 from gwenshap/KAFKA-2449
2015-10-26 10:17:16 -07:00
Ismael Juma 16f194b20a KAFKA-2460; Fix capitalisation in SSL classes
Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Sriharsha Chintalapani <harsha@hortonworks.com>

Closes #355 from ijuma/kafka-2460-fix-capitalisation-in-ssl-classes
2015-10-24 09:42:19 -07:00
Ewen Cheslack-Postava 6f2f1f9843 KAFKA-2626: Handle null keys and value validation properly in OffsetStorageWriter.
Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Gwen Shapira

Closes #345 from ewencp/kafka-2626-offset-storage-writer-null-values
2015-10-23 17:01:33 -07:00
Ewen Cheslack-Postava 2e61773590 KAFKA-2371: Add distributed support for Copycat.
This adds coordination between DistributedHerders using the generalized consumer
support, allowing automatic balancing of connectors and tasks across workers. A
few pieces that require interaction between workers (resolving config
inconsistencies, forwarding of configuration changes to the leader worker) are
incomplete because they require REST API support to implement properly.

Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Jason Gustafson, Gwen Shapira

Closes #321 from ewencp/kafka-2371-distributed-herder
2015-10-23 16:37:30 -07:00
flavio junqueira 21443f214f KAFKA-2641; Upgrade path for ZK authentication
This pull request adds a configuration parameter and a migration tool. It is also based on pull request #303, which should go in first.

Author: flavio junqueira <fpj@apache.org>
Author: Flavio Junqueira <fpj@apache.org>
Author: Ismael Juma <ismael@juma.me.uk>

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

Closes #313 from fpj/KAFKA-2641
2015-10-23 15:11:07 -07:00
Ashish Singh 701c46b3a3 KAFKA-2671: Enable starting Kafka server with a Properties object
Author: Ashish Singh <asingh@cloudera.com>

Reviewers: Eno Thereska, Gwen Shapira

Closes #330 from SinghAsDev/KAFKA-2671
2015-10-22 22:27:46 -07:00
Guozhang Wang aa56dfb9e7 KAFKA-2686: Reset needsPartitionAssignment in SubscriptionState.assign()
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Jason Gustafson, Jun Rao

Closes #352 from guozhangwang/K2686
2015-10-22 21:06:10 -07:00
Ismael Juma bf292a6fa5 MINOR: Restore `SslConsumerTest` which was accidentally deleted in client-side assignment commit
Probably happened while resolving conflicts, commit: 86eb74d923

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

Reviewers: Jason Gustafson

Closes #350 from ijuma/restore-ssl-consumer-test
2015-10-22 09:52:09 -07:00
Dong Lin 2e25f899a1 KAFKA-2678; partition level lag metrics can be negative
Author: Dong Lin <lindong@cis.upenn.edu>
Author: Dong Lin <lindong28@gmail.com>

Reviewers: Guozhang Wang

Closes #346 from lindong28/KAFKA-2678
2015-10-22 09:26:05 -07:00
Ismael Juma 65922b5388 KAFKA-2456 KAFKA-2472; SSL clean-ups
Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Jun Rao <junrao@gmail.com>

Closes #342 from ijuma/kafka-2472-fix-kafka-ssl-config-warnings
2015-10-21 17:10:36 -07:00
Aditya Auradkar d9b1dc7081 KAFKA-2209; Change quotas dynamically using DynamicConfigManager
Changes in this patch are:
1. ClientIdConfigHandler now passes through the config changes to the quota manager.
2. Removed static KafkaConfigs for quota overrides. These are no longer needed since we can override configs through ZooKeeper.
3. Added testcases to verify that the config changes are propogated from ZK (written using AdminTools) to the actual Metric objects.

Author: Aditya Auradkar <aauradka@aauradka-mn1.(none)>
Author: Aditya Auradkar <aauradka@aauradka-mn1.linkedin.biz>

Reviewers: Dong Lin <lindong28@gmail.com>, Jun Rao <junrao@gmail.com>

Closes #298 from auradkar/K-2209
2015-10-21 16:07:39 -07:00
Ismael Juma 361686d4a9 KAFKA-2618; Disable SSL renegotiation for 0.9.0.0
Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Sriharsha Chintalapani <schintalapani@hortonworks.com>, Rajini Sivaram <rajinisivaram@googlemail.com>, Jun Rao <junrao@gmail.com>

Closes #339 from ijuma/kafka-2618-disable-renegotiation
2015-10-21 14:39:39 -07:00
Jiangjie Qin 3005653813 KAFKA-2454; Deadlock between log segment deletion and server shutdown.
Author: Jiangjie Qin <becket.qin@gmail.com>

Reviewers: Joel Koshy <jjkoshy.w@gmail.com>

Closes #153 from becketqin/KAFKA-2454
2015-10-21 13:24:10 -07:00
Jason Gustafson 86eb74d923 KAFKA-2464: client-side assignment for new consumer
Author: Jason Gustafson <jason@confluent.io>

Reviewers: Jiangjie Qin, Onur Karaman, Ewen Cheslack-Postava, Guozhang Wang

Closes #165 from hachikuji/KAFKA-2464
2015-10-21 12:13:42 -07:00
Ismael Juma 6e747d4297 MINOR: Update to Gradle 2.8
There have been a number of improvements between the version we are currently using (2.4) and the current version (2.8):

https://gradle.org/docs/2.5/release-notes
https://gradle.org/docs/2.6/release-notes
https://gradle.org/docs/2.7/release-notes
http://gradle.org/docs/current/release-notes

I'm particularly interested in the performance improvements.

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

Reviewers: Guozhang Wang

Closes #343 from ijuma/gradle-2.8
2015-10-21 11:37:57 -07:00
Ewen Cheslack-Postava 1d4a0b8811 KAFKA-2667: Fix transient error in KafkaBasedLogTest.
The test required a specific sequence of events for each Consumer.poll() call,
but the MockConsumer.waitForPollThen() method could not guarantee that,
resulting in race conditions. Add support for scheduling sequences of events
even when running in multi-threaded environments.

Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Guozhang Wang

Closes #333 from ewencp/kafka-2667-kafka-based-log-transient-error
2015-10-21 11:20:29 -07:00
Eno Thereska 0785feeb0f KAFKA-2459: Mark last committed timestamp to fix connection backoff
This fix applies to three JIRAs, since they are all connected.

KAFKA-2459Connection backoff/blackout period should start when a connection is disconnected, not when the connection attempt was initiated
Backoff when connection is disconnected

KAFKA-2615Poll() method is broken wrt time
Added Time through the NetworkClient API. Minimal change.

KAFKA-1843Metadata fetch/refresh in new producer should handle all node connection states gracefully
I’ve partially addressed this for a specific failure case in the JIRA.

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

Reviewers: Ewen Cheslack-Postava, Jason Gustafson, Ismael Juma, Guozhang Wang

Closes #290 from enothereska/trunk
2015-10-21 10:04:49 -07:00
benstopford 44f6c4b946 KAFKA-2338; Warn on max.message.bytes change
- Both TopicCommand and ConfigCommand warn if message.max.bytes increases
- Log failures on the broker if replication gets stuck due to an oversized message
- Added blocking call to warning.

Author: benstopford <benstopford@gmail.com>

Reviewers: Jun Rao <junrao@gmail.com>

Closes #322 from benstopford/CPKAFKA-61
2015-10-20 17:21:46 -07:00
Sriharsha Chintalapani 403158b54b KAFKA-1686; Implement SASL/Kerberos
This PR implements SASL/Kerberos which was originally submitted by harshach as https://github.com/apache/kafka/pull/191.

I've been submitting PRs to Harsha's branch with fixes and improvements and he has integrated all, but the most recent one. I'm creating this PR so that the Jenkins can run the tests on the branch (they pass locally).

Author: Ismael Juma <ismael@juma.me.uk>
Author: Sriharsha Chintalapani <harsha@hortonworks.com>
Author: Harsha <harshach@users.noreply.github.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Rajini Sivaram <rajinisivaram@googlemail.com>, Parth Brahmbhatt <brahmbhatt.parth@gmail.com>, Jun Rao <junrao@gmail.com>

Closes #334 from ijuma/KAFKA-1686-V1
2015-10-20 14:13:34 -07:00
Guozhang Wang 8f32617e65 HOTFIX: check logic of KAFKA-2515 should be on buffer.limit()
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Ewen Cheslack-Postava, Guozhang Wang

Closes #332 from guozhangwang/K2515-hotfix
2015-10-19 19:33:27 -07:00
Ewen Cheslack-Postava 14c128a162 MINOR: Capture stderr in ConsumerPerformanceService.
Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Guozhang Wang

Closes #331 from ewencp/minor-capture-consumer-performance-stderr
2015-10-19 17:18:52 -07:00
Dong Lin 343db8a7f4 KAFKA-2669; Fix LogCleaner.awaitCleaned for LogCleanerIntegrationTest
LogCleanerIntegrationTest calls LogCleaner.awaitCleaned() to wait until cleaner has processed up to given offset. However, existing awaitCleaned() implementation doesn't wait for this. This patch fix the problem.

Author: Dong Lin <lindong@cis.upenn.edu>
Author: Dong Lin <lindong28@gmail.com>

Reviewers: Ismael Juma, Guozhang Wang

Closes #327 from lindong28/KAFKA-2669
2015-10-19 14:50:18 -07:00
Rajini Sivaram 6745435251 KAFKA-2656; Remove hardcoded default key and truststores
Removed default hardcoded keystore and truststore in /tmp so that default JVM keystore/truststore may be used when keystore/truststore is not specified in Kafka server or client properties

Author: Rajini Sivaram <rajinisivaram@googlemail.com>

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

Closes #312 from rajinisivaram/KAFKA-2656
2015-10-19 13:49:09 -07:00
Ismael Juma 964114a8aa MINOR: Reduce logging level for controller connection failures from `error` to `warn`
Before we switched from `BlockingChannel` to `NetworkClient`, we were
always reporting a successful connection due to the fact that
`BlockingChannel.connect` catches and swallows all exceptions. We
are now reporting failures (which is better), but `error` seems too
noisy (as can be seen in our tests).

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

Reviewers: Jun Rao <junrao@gmail.com>

Closes #280 from ijuma/reduce-connection-failure-logging-level
2015-10-19 13:39:19 -07:00
Gabriel Avellaneda 241b9ab58d MINOR: Fixed README examples on running specific tests.
Author: GabrielNicolasAvellaneda <avellaneda.gabriel@gmail.com>

Reviewers: Ismael Juma, Ewen Cheslack-Postava

Closes #268 from GabrielNicolasAvellaneda/readme-updates
2015-10-18 22:45:27 -07:00
flavio junqueira ce306ba4eb KAFKA-2639: Refactoring of ZkUtils
I've split the work of KAFKA-1695 because this refactoring touches a large number of files. Most of the changes are trivial, but I feel it will be easier to review this way.

This pull request includes the one Parth-Brahmbhatt started to address KAFKA-1695.

Author: flavio junqueira <fpj@apache.org>
Author: Flavio Junqueira <fpj@apache.org>

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

Closes #303 from fpj/KAFKA-2639
2015-10-18 15:23:52 -07:00
Gwen Shapira 78a2e2f8f3 KAFKA-2665: Add images to code github
…art of the code github

Author: Gwen Shapira <cshapi@gmail.com>

Reviewers: Guozhang Wang

Closes #325 from gwenshap/KAFKA-2665
2015-10-16 17:52:06 -07:00
Onur Karaman 636e14a991 KAFKA-2397: add leave group request to force coordinator trigger rebalance
Let's say every consumer in a group has session timeout s. Currently, if a consumer leaves the group, the worst case time to stabilize the group is 2s (s to detect the consumer failure + s for the rebalance window). If a consumer instead can declare they are leaving the group, the worst case time to stabilize the group would just be the s associated with the rebalance window.

This is a low priority optimization!

Author: Onur Karaman <okaraman@linkedin.com>

Reviewers: Jason Gustafson, Guozhang Wang

Closes #103 from onurkaraman/leave-group
2015-10-16 17:46:17 -07:00
Guozhang Wang e2e5c89142 KAFKA-2515: Handle oversized messages properly in new consumer
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Dong Lin, Jun Rao

Closes #318 from guozhangwang/K2515
2015-10-16 17:39:39 -07:00
Liquan Pei ef65d0a360 KAFKA-2484: Add schema projection utilities
This PR adds schema projection utilities to copycat.

Author: Liquan Pei <liquanpei@gmail.com>

Reviewers: Ewen Cheslack-Postava

Closes #307 from Ishiihara/schema-projection
2015-10-16 15:44:31 -07:00
Randall Hauch c553249b4e KAFKA-2594: Add InMemoryLRUCacheStore as a preliminary method for bounding in-memory stores
Added a new `KeyValueStore` implementation called `InMemoryLRUCacheStore` that keeps a maximum number of entries in-memory, and as the size exceeds the capacity the least-recently used entry is removed from the store and the backing topic. Also added unit tests for this new store and the existing `InMemoryKeyValueStore` and `RocksDBKeyValueStore` implementations. A new `KeyValueStoreTestDriver` class simplifies all of the other tests, and can be used by other libraries to help test their own custom implementations.

This PR depends upon [KAFKA-2593](https://issues.apache.org/jira/browse/KAFKA-2593) and its PR at https://github.com/apache/kafka/pull/255. Once that PR is merged, I can rebase this PR if desired.

Two issues were uncovered when creating these new unit tests, and both are also addressed as separate (small) commits in this PR:
* The `RocksDBKeyValueStore` initialization was not creating the file system directory if missing.
* `MeteredKeyValueStore` was casting to `ProcessorContextImpl` to access the `RecordCollector`, which prevent using `MeteredKeyValueStore` implementations in tests where something other than `ProcessorContextImpl` was used. The fix was to introduce a `RecordCollector.Supplier` interface to define this `recordCollector()` method, and change `ProcessorContextImpl` and `MockProcessorContext` to both implement this interface. Now, `MeteredKeyValueStore` can cast to the new interface to access the record collector rather than to a single concrete implementation, making it possible to use any and all current stores inside unit tests.

Author: Randall Hauch <rhauch@gmail.com>

Reviewers: Edward Ribeiro, Guozhang Wang

Closes #256 from rhauch/kafka-2594
2015-10-16 14:46:26 -07:00
Aditya Auradkar aa66b42dac KAFKA-2419 - Fix to prevent background thread from getting created when not required
See here for more discussion: https://issues.apache.org/jira/browse/KAFKA-2419
Basically, the fix involves adding a param to Metrics to indicate if it is capable of metric cleanup or not.

Author: Aditya Auradkar <aauradka@aauradka-mn1.linkedin.biz>

Reviewers: Jun Rao <junrao@gmail.com>

Closes #323 from auradkar/KAFKA-2419-fix
2015-10-16 09:47:04 -07:00
Mayuresh Gharat 7efa12705d KAFKA-2120: cleaning follow-up
Trivial fix to get rid of unused statements in kafkaProducer.

Author: Mayuresh Gharat <mgharat@mgharat-ld1.linkedin.biz>

Reviewers: Edward Ribeiro, Guozhang Wang

Closes #320 from MayureshGharat/kafka-2120-followup
2015-10-16 09:45:32 -07:00
Ashish Singh 5338f8432f KAFKA-2487: change kafka.examples.Consumer to use the new java consumer
Author: Ashish Singh <asingh@cloudera.com>

Reviewers: Guozhang Wang

Closes #297 from SinghAsDev/KAFKA-2487
2015-10-15 17:28:23 -07:00
Yasuhiro Matsuda 50a076d1e9 MINOR: set up temp directories properly in StreamTaskTest
guozhangwang
StreamTaskTest did not set up a temp directory for each test. This occasionally caused interference between tests through state directory locking.

Author: Yasuhiro Matsuda <yasuhiro@confluent.io>

Reviewers: Guozhang Wang

Closes #317 from ymatsuda/fix_StreamTaskTest
2015-10-15 11:49:44 -07:00
Manikumar reddy O a4dbf90107 KAFKA-2295; Support dynamically loaded classes from context class loader
Rebased code..

Author: Manikumar reddy O <manikumar.reddy@gmail.com>

Reviewers: Guozhang Wang

Closes #314 from omkreddy/KAFKA-2295
2015-10-15 11:11:32 -07:00
Yasuhiro Matsuda c50d39ea82 KAFKA-2654: optimize unnecessary poll(0) away in StreamTask
guozhangwang
This change aims to remove unnecessary ```consumer.poll(0)``` calls.
* ```once``` after some partition is resumed
* whenever the size of the top queue in any task is below ```BUFFERED_RECORDS_PER_PARTITION_CONFIG```

Author: Yasuhiro Matsuda <yasuhiro@confluent.io>

Reviewers: Guozhang Wang

Closes #315 from ymatsuda/less_poll_zero
2015-10-15 11:06:51 -07:00
Guozhang Wang 28e59a1df7 TRIVIAL: add @throws ConsumerWakeupException in KafkaConsumer
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Gwen Shapira

Closes #311 from guozhangwang/wakeupComments
2015-10-14 14:53:12 -07:00
Grant Henke 3626133473 KAFKA-2536: topics tool should allow users to alter topic configuration
This is a minimal revert of some backward incompatible changes made in KAFKA-2205, with the addition of the deprecation logging message.

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Gwen Shapira

Closes #305 from granthenke/topic-configs
2015-10-14 14:28:14 -07:00
Grant Henke 5013a41a51 KAFKA-2650: Change ConfigCommand --deleted-config option to align wit…
…h TopicCommand

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Gwen Shapira

Closes #308 from granthenke/configcommand
2015-10-14 14:06:14 -07:00
Randall Hauch 6e571225d5 KAFKA-2593: Key value stores can use specified serializers and deserializers
Add support for the key value stores to use specified serializers and deserializers (aka, "serdes"). Prior to this change, the stores were limited to only the default serdes specified in the topology's configuration and exposed to the processors via the ProcessorContext.

Now, using InMemoryKeyValueStore and RocksDBKeyValueStore are similar: both are parameterized on the key and value types, and both have similar multiple static factory methods. The static factory methods either take explicit key and value serdes, take key and value class types so the serdes can be inferred (only for the built-in serdes for string, integer, long, and byte array types), or use the default serdes on the ProcessorContext.

Author: Randall Hauch <rhauch@gmail.com>

Reviewers: Guozhang Wang

Closes #255 from rhauch/kafka-2593
2015-10-14 13:59:10 -07:00
Rajini Sivaram f13d115596 KAFKA-2603: Add timeout arg to ConsoleConsumer for new consumer
Added --timeout-ms argument to ConsoleConsumer that works with both old and new consumer. Also modified ducktape ConsoleConsumer service to use this arg instead of consumer.timeout.ms config that works only with the old consumer.

Author: Rajini Sivaram <rajinisivaram@googlemail.com>

Reviewers: Aditya Auradkar, Ismael Juma, Guozhang Wang

Closes #274 from rajinisivaram/KAFKA-2603
2015-10-14 13:35:49 -07:00
Jason Gustafson 27c099b043 MINOR: ignore wakeups when committing offsets on consumer close
Author: Jason Gustafson <jason@confluent.io>

Reviewers: Gwen Shapira

Closes #306 from hachikuji/handle-wakeup-in-consumer-close
2015-10-13 18:50:32 -07:00
Guozhang Wang d8c5750799 KAFKA-2632: move fetchable check ahead in handleFetchResponse
Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Jason Gustafson

Closes #295 from guozhangwang/K2632
2015-10-13 18:48:45 -07:00
Yasuhiro Matsuda b1ce9494e3 MINOR: flush record collector after local state flush
guozhangwang
Fix the order of flushing. Undoing the change I did sometime ago.

Author: Yasuhiro Matsuda <yasuhiro@confluent.io>

Reviewers: Guozhang Wang

Closes #304 from ymatsuda/flush_order
2015-10-13 15:31:27 -07:00
Dong Lin 123d27e4d0 KAFKA-2527; System Test for Quotas in Ducktape
granders Can you take a look at this quota system test?

Author: Dong Lin <lindong28@gmail.com>

Reviewers: Geoff Anderson, Ewen Cheslack-Postava

Closes #275 from lindong28/KAFKA-2527
2015-10-13 13:54:40 -07:00
Ewen Cheslack-Postava 36d4469326 KAFKA-2372: Add Kafka-backed storage of Copycat configs.
This also adds some other needed infrastructure for distributed Copycat, most
importantly the DistributedHerder, and refactors some code for handling
Kafka-backed logs into KafkaBasedLog since this is shared betweeen offset and
config storage.

Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Gwen Shapira, James Cheng

Closes #241 from ewencp/kafka-2372-copycat-distributed-config
2015-10-13 10:23:21 -07:00
benstopford e2ec02e1d1 KAFKA-2637; Cipher suite setting should be configurable for SSL
Enables Cipher suite setting. Code was previously reviewed by ijuma, harshach. Moving to an independent PR.

Author: benstopford <benstopford@gmail.com>

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

Closes #301 from benstopford/cipher-switch
2015-10-13 06:59:25 -07:00
Gwen Shapira 373332b0f9 Closes #206 . *WONT FIX* - no new release planned for 0.8.2 branch 2015-10-12 20:14:44 -07:00
Gwen Shapira 518f78be0b closes pr #206. *WONT FIX* - no new release planned for 0.8.2 branch 2015-10-12 18:53:06 -07:00