Commit Graph

5510 Commits

Author SHA1 Message Date
John Roesler 1bc620d1af MINOR: Clarify usage of stateful processor node (#5740)
In recent PRs, we have been confused about the proper usage of
StatefulProcessorNode (#5731 , #5737 )

This change disambiguates it.

Reviewers: Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-10-05 09:44:49 -07:00
Robert Yokota 3edd8e7333 KAFKA-7476: Fix Date-based types in SchemaProjector
Various converters (AvroConverter and JsonConverter) produce a
SchemaAndValue consisting of a logical schema type and a java.util.Date.
This is a fix for SchemaProjector to properly handle the Date.

Author: Robert Yokota <rayokota@gmail.com>

Reviewers: Konstantine Karantasis <konstantine@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5736 from rayokota/KAFKA-7476
2018-10-04 20:34:50 -07:00
John Roesler d76805f0fd MINOR: Fix generic type of ProcessorParameters (#5741)
In unrelated recent work, I noticed some warnings about the missing type parameters on ProcessorParameters.

While investigating it, it seems like there was a bug in the creation of repartition topics.

Reviewers: Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-10-04 17:37:53 -07:00
Dong Lin 2b37a041d3 MINOR: Bump version to 2.2.0-SNAPSHOT
Author: Dong Lin <lindong28@gmail.com>

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

Closes #5744 from lindong28/bump-up-version-2.2.0
2018-10-04 17:30:03 -07:00
Xiongqi Wesley Wu 7ea0655711 KAFKA-7441; Allow LogCleanerManager.resumeCleaning() to be used concurrently
Author: Xiongqi Wesley Wu <xiongqi.wu@gmail.com>

Reviewers: Dong Lin <lindong28@gmail.com>

Closes #5694 from xiowu0/fixrace2
2018-10-04 17:02:27 -07:00
Jason Gustafson f2dd6aa269
KAFKA-7415; Persist leader epoch and start offset on becoming a leader (#5678)
This patch ensures that the leader epoch cache is updated when a broker becomes leader with the latest epoch and the log end offset as its starting offset. This guarantees that the leader will be able to provide the right truncation point even if the follower has data from leader epochs which the leader itself does not have. This situation can occur when there are back to back leader elections.

Additionally, we have made the following changes:

1. The leader epoch cache enforces monotonically increase epochs and starting offsets among its entry. Whenever a new entry is appended which violates requirement, we remove the conflicting entries from the cache.
2. Previously we returned an unknown epoch and offset if an epoch is queried which comes before the first entry in the cache. Now we return the smallest . For example, if the earliest entry in the cache is (epoch=5, startOffset=10), then a query for epoch 4 will return (epoch=4, endOffset=10). This ensures that followers (and consumers in KIP-320) can always determine where the correct starting point is for the active log range on the leader.

Reviewers: Jun Rao <junrao@gmail.com>
2018-10-04 14:02:23 -07:00
Nikolay ca641b3e2e KAFKA-7277: Migrate Streams API to Duration instead of longMs times (#5682)
Reviewers: Johne Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-10-04 13:51:39 -07:00
Lincong Li 260b07a6da KAFKA-7196; Remove heartbeat delayed operation for those removed consumers at the end of each rebalance
During the consumer group rebalance, when the joining group phase finishes, the heartbeat delayed operation of the consumer that fails to rejoin the group should be removed from the purgatory. Otherwise, even though the member ID of the consumer has been removed from the group, its heartbeat delayed operation is still registered in the purgatory and the heartbeat delayed operation is going to timeout and then another unnecessary rebalance is triggered because of it.

Author: Lincong Li <lcli@linkedin.com>

Reviewers: Dong Lin <lindong28@gmail.com>

Closes #5556 from Lincong/remove_heartbeat_delayedOperation
2018-10-04 09:15:11 -07:00
Bill Bejeck 862e09f994 HOTFIX: Fix broken links (#5676)
Reviewers: Joel Hamill <11722533+joel-hamill@users.noreply.github.com>, Guozhang Wang <wangguoz@gmail.com>
2018-10-03 18:27:15 -07:00
John Roesler 87879d5152 KAFKA-7223: Add name config to Suppressed (#5731)
KIP-372 (allow naming all internal topics) was designed and developed concurrently with suppression.

Since suppression introduces a new internal topic, it also needs to be nameable.

Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2018-10-03 18:05:41 -07:00
Guozhang Wang 7bd8ada8e2
MINOR: Docs on state store instantiation (#5698)
Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2018-10-03 11:20:47 -07:00
Kevin Lu a5335e7cbd KAFKA-6123: Give client MetricsReporter auto-generated client.id (#5383) 2018-10-03 09:56:22 -07:00
John Roesler b793eaade4 KAFKA-7223: Make suppression buffer durable (#5724)
This is Part 4 of suppression (durability)
Part 1 was #5567 (the API)
Part 2 was #5687 (the tests)
Part 3 was #5693 (in-memory buffering)

Implement a changelog for the suppression buffer so that the buffer state may be recovered on restart or recovery.
As of this PR, suppression is suitable for general usage.

Reviewers: Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2018-10-03 09:52:13 -07:00
Randall Hauch 09f3205e44 MINOR: Increase timeout for starting JMX tool (#5735)
In some tests, the check monitoring the JMX tool log output doesn’t quite wait long enough before failing. Increasing the timeout from 10 to 20 seconds.
2018-10-03 08:56:44 -07:00
radai-rosenblatt 044350f28e MINOR: Reduce in-memory copies of partition objects in onJoinComplete() and onJoinPrepare()
`ConsumerCoordinator.onJoinPrepare()` currently makes multiple copies of the set of assigned partitions. We can let `subscriptions.assignedPartitions()` return a view of the underlying partition set, copy it only once and re-use the copied value.

Author: radai-rosenblatt <radai.rosenblatt@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Dong Lin <lindong28@gmail.com>

Closes #5124 from radai-rosenblatt/copy-all-the-things
2018-10-03 05:24:51 -07:00
Bill Bejeck 2a0abe55f0 MINOR KAFKA-7406: Follow up and address final comments (#5730)
Reviewers: John Roesler <john@confluent.io>, Matthias J Sax <matthias@confluent.io>
2018-10-02 15:44:33 -07:00
Rajini Sivaram 8fb5e63aa8 KAFKA-7429: Enable key/truststore update with same filename/password (#5699) 2018-10-02 12:57:31 -07:00
John Roesler 5ba9cade7b KAFKA-7223: In-Memory Suppression Buffering (#5693)
Reviewer: Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2018-10-01 23:10:34 -07:00
Bill Bejeck dff1a3799c KAFKA-7406: Name join group repartition topics (#5709)
Reviewer: John Roesler <john@confluent.io>, Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2018-10-01 23:09:12 -07:00
Guozhang Wang d568f73fc6 KAFKA-7456: Serde Inheritance in DSL (#5521)
Reviewers: John Roesler <john@confluent.io>, Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2018-10-01 16:24:12 -07:00
Amit Sela fd44dc7fb2 KAFKA-6684: Support casting Connect values with bytes schema to string
Allow to cast LogicalType to string by calling the serialized (Java) object's toString().

Added tests for `BigDecimal` and `Date` as whole record and as fields.

Author: Amit Sela <amitsela33@gmail.com>

Reviewers: Randall Hauch <rhauch@gmail.com>, Robert Yokota <rayokota@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #4820 from amitsela/cast-transform-bytes
2018-09-30 22:24:09 -07:00
Amit Sela c1457be995 KAFKA-7460: Fix Connect Values converter date format pattern
Switches to normal year format instead of week date years and day of month instead of day of year.

This is directly from #4820, but separated into a different JIRA/PR to keep the fixes independent. Original authorship should be maintained in the commit.

Author: Amit Sela <amitsela33@gmail.com>

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

Closes #5718 from ewencp/fix-header-converter-date-format
2018-09-30 19:51:59 -07:00
Zhanxiang (Patrick) Huang b35e97125f KAFKA-7459: Use thread-safe Pool for RequestMetrics.requestRateInternal (#5717)
As part of KAFKA-6514, the `apiVersion` tag was added to the `RequestsPerSec`
metric. A thread unsafe `HashMap` was used in the implementation even though
it can be accessed by multiple threads. Fix it by replacing it with the thread-safe
`Pool`.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2018-09-30 19:13:28 -07:00
John Roesler 49b5206a82 MINOR: don't log config during unit tests (#5671)
Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2018-09-30 16:52:55 -07:00
John Roesler eb61df642d KAFKA-7223: internally provide full consumer record during restore (#5710)
The Suppression buffer stores the full record context, not just the key and value,
so its changelog/restore loop will also need to preserve this information.

This change is a precondition to that, creating an option to register a
state restore callback to receive the full consumer record.

Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
2018-09-30 16:04:28 -07:00
Guozhang Wang 08dfab06e7
KAFKA-3514: Upgrade Documentation (#5714)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2018-09-30 12:01:11 -07:00
Ismael Juma 69709d70fc MINOR: Update Scala to 2.12.7, lz4-java to 1.5 and others
Highlights:
* 10% compilation speed improvement in Scala 2.12.7:
https://www.scala-lang.org/news/2.12.7
* 10% better decompression speed in lz4 1.8.2 (lz4-java 1.5.0
includes lz4 1.8.3):
https://github.com/lz4/lz4-java/blob/master/CHANGES.md#150
https://github.com/lz4/lz4/releases

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

Reviewers: Dong Lin <lindong28@gmail.com>

Closes #5715 from ijuma/scala-2.12.7-and-other-updates
2018-09-29 22:29:57 -07:00
Michał Borowiecki 22f1724123 KAFKA-7434: Fix NPE in DeadLetterQueueReporter
*More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.*

*Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.*

Author: Michał Borowiecki <mbor81@gmail.com>

Reviewers: Arjun Satish <arjun@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5700 from mihbor/KAFKA-7434
2018-09-29 10:19:10 -07:00
Rajini Sivaram cb21bca400 KAFKA-7454: Use lazy allocation for SslTransportLayer buffers and null them on close (#5713)
Lazy allocation helps when there are a large number of connections
that have been accepted, but where no data has been received from
the clients. Each buffer is often around 16k (max TLS record size).

Nulling the buffers should not make a difference in the current
implementation since we release the reference to the channel
and transport layer after we close them, but it's a good practice
to release medium/large buffers after `close` is called.

Reviewers: Jun Rao <junrao@gmail.com>, Ismael Juma <ismael@juma.me.uk>
2018-09-28 23:09:10 -07:00
Lee Dongjin e7b6d65713 KAFKA-6620: Fix documentation about 'exactly_once'
Reviewers: Matthias J. Sax <matthias@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
2018-09-28 14:41:50 -07:00
Rajini Sivaram 0a8205cb45
KAFKA-7453: Expire registered channels not selected within idle timeout (#5712)
Reviewers: Jun Rao <junrao@gmail.com>. Ismael Juma <ismael@juma.me.uk>
2018-09-28 21:07:57 +01:00
huxi 70d90c3718 KAFKA-7409; Validate message format version before creating topics or altering configs (#5651)
Values for `message.format.version` and `log.message.format.version` should be verified before topic creation or config change.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
2018-09-27 22:39:44 -07:00
Jason Gustafson 9f7267dd2f KAFKA-7437; Persist leader epoch in offset commit metadata (#5689)
This commit implements the changes described in KIP-320 for the persistence of leader epoch information in the offset commit protocol.

Reviewers:  Rajini Sivaram <rajinisivaram@googlemail.com>
2018-09-26 14:25:55 +01:00
Attila Sasvari 5916db11f6 MINOR: Fix broken link in security.html (#5670)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Rajini Sivaram <rajinisivaram@googlemail.com>
2018-09-26 10:20:11 +01:00
Colin Patrick McCabe 888423ee56 KAFKA-7428: ConnectionStressSpec: add "action", allow multiple clients (#5668) 2018-09-26 10:08:48 +01:00
John Roesler f712ce69fc KAFKA-7223: add tests in preparation for suppression (#5687)
This is Part 2 of suppression.
Part 1 was #5567

In an effort to control the scope of the review, this PR is just the tests for buffered suppression.

Reviewers: Bill Bejeck <bill@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
2018-09-25 13:41:22 -07:00
Vahid Hashemian 2933f21374 KAFKA-7403; Use default timestamp if no expire timestamp set in offset commit value (#5690)
This fixes a regression caused by KAFKA-4682 (KIP-211) which caused offset commit failures after upgrading from an older version which used the v1 inter-broker format.
2018-09-25 09:06:30 -07:00
Ismael Juma 81d124440d
MINOR: Upgrade to Jackson 2.9.7 (#5662)
This contains important fixes:

https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.9.7

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
2018-09-25 01:14:20 -07:00
Manikumar Reddy c835331c78 KAFKA-5066; Add KafkaMetricsConfig (Yammer metrics reporters) props to documentation
Author: Manikumar Reddy <manikumar.reddy@gmail.com>

Reviewers: Dong Lin <lindong28@gmail.com>

Closes #5563 from omkreddy/KAFKA-5066-KAFKA-METRICS-CONFIG
2018-09-24 22:01:00 -07:00
John Roesler 057c5307e0 KAFKA-7223: Suppress API with only immediate emit (#5567)
Part 1 of the suppression API.

* add the DSL suppress method and config objects
* add the processor, but only in "identity" mode (i.e., it will forward only if the suppression spec says to forward immediately)
* add tests

Reviewers: Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
2018-09-24 13:27:39 -07:00
Eugen Feller 86b4d9d58f KAFKA-7430: Improve Transformer interface JavaDoc (#5675)
This PR improves the JavaDoc of the transformer interface. 

Reviewers: Guozhang Wang <guozhang@confluent.io>, John Roesler <john@confluent.io>
2018-09-24 09:25:54 -07:00
John Roesler 95f9622cce MINOR: Fix compilation error in PlaintextConsumerTest under scala 2.12 (#5674) 2018-09-21 16:00:05 -07:00
Manikumar Reddy O 6ced8550b3 KAFKA-7216: Ignore unknown ResourceTypes while loading acl cache (#5673)
Reviewers: Jun Rao <junrao@gmail.com>
2018-09-21 13:47:26 -07:00
Bob Barrett 0bc7008e75 KAFKA-7400: Compacted topic segments that precede the log start offse… (#5646)
* KAFKA-7400: Compacted topic segments that precede the log start offset are not cleaned up

Currently we don't delete any log segments if the cleanup policy doesn't include delete. This patch changes the behavior to delete log segments that fully precede the log start offset even when deletion is not enabled. Tested with unit tests to verify that LogManager.cleanupLogs now cleans logs with cleanup.policy=compact and that Log.deleteOldSegments deletes segments that preced the start offset regardless of the cleanup policy.

Reviewers: Dhruvil Shah <dhruvil@confluent.io>, Jason Gustafson <jason@confluent.io>, Jun Rao <junrao@gmail.com>
2018-09-21 13:31:45 -07:00
John Roesler 96132e2dbb MINOR: rename InternalProcessorContext.initialized (#5672)
Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2018-09-21 11:55:56 -07:00
Viktor Somogyi f1f719211e KAFKA-6923; Refactor Serializer/Deserializer for KIP-336 (#5494)
This patch implements KIP-336. It adds a default implementation to the Serializer/Deserializer interface to support the use of headers and it deprecates the ExtendedSerializer and ExtendedDeserializer interfaces for later removal.

Reviewers: Satish Duggana <sduggana@hortonworks.com>, John Roesler <john@confluent.io>, Jason Gustafson <jason@confluent.io>
2018-09-20 15:55:10 -07:00
Aleksei Izmalkin 7bc1019d4b [KAFKA-7379] [streams] send.buffer.bytes should be allowed to set -1 in KafkaStreams (#5643)
What changes were proposed in this pull request?
atLeast(0) in StreamsConfig, ProducerConfig and ConsumerConfig were replaced by SEND_BUFFER_LOWER_BOUND and RECEIVE_BUFFER_LOWER_BOUND from CommonClientConfigs.

How was this patch tested?
Three unit tests were added to KafkaStreamsTest

Reviewers: Guozhang Wang <guozhang@confluent.io>, John Roesler <john@confluent.io>, Matthias J. Sax <mjsax@apache.org>
2018-09-20 12:20:03 -07:00
Matthias J. Sax 9f187a9a88 MINOR: increase number of unique keys for Streams EOS system test (#5640)
Increasing the number of unique keys, to increase likelihood that the test exposes KAFKA-7192.

Reviewers: Apurva Mehta <apurva@confluent.io>, Guozhang Wang <guozhang@confluent.io>, Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>
2018-09-19 15:09:33 -07:00
Bill Bejeck df00f1a738 MINOR: Remove ignored tests that hang, added new versions for EOS tests (#5666)
Reviewers: John Roesler <vvcephei@users.noreply.github.com>, Guozhang Wang <wangguoz@gmail.com>
2018-09-19 15:05:39 -07:00
Joan Goyeau af80dccc7d KAFKA-7399: KIP-366, Make FunctionConversions deprecated (#5562)
Reviewers: John Roesler <vvcephei@users.noreply.github.com>, Guozhang Wang <wangguoz@gmail.com>
2018-09-19 09:10:15 -07:00