Commit Graph

4032 Commits

Author SHA1 Message Date
Robert Yokota a9ca1079bd 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

(cherry picked from commit 3edd8e7333)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
2018-10-04 20:35:59 -07:00
Randall Hauch 59991f69cd 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-04 17:05:48 -07:00
Matthias J. Sax 6a7652fe0f
MINOR: remove idempotent statement (#5659)
Reviewers: John Roesler <john@confluent.io>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-09-19 17:17:28 -07:00
Matthias J. Sax 4c9d49bd3b
KAFKA-7192: Wipe out state store if EOS is turned on and checkpoint file does not exist (#5641)
Reviews: Guozhang Wang <guozhang@confluent.io>, Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>
2018-09-14 12:05:24 -07:00
Bill Bejeck 3792111347 MINOR: Update streams upgrade system tests 0.11.0.3 (#5613)
This is a port of #5605 for the 11.3 branch

Reviewers: John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
2018-09-06 13:06:35 -07:00
Ismael Juma 6e79e5da03 MINOR: Pass `--continue` to gradle in jenkins.sh
This ensures that the whole test suite is executed even
if there are failures. It currently stops at a module
boundary if there are any failures. There is a discussion
to change the gradle default to stop after the first test failure:

https://github.com/gradle/gradle/issues/6513

`--continue` is recommended for CI in that discussion.

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

Reviewers: Dong Lin <lindong28@gmail.com>

Closes #5599 from ijuma/jenkins-script-continue
2018-09-01 11:26:00 -07:00
John Roesler 42f0784991 KAFKA-7284: streams should unwrap fenced exception (#5520)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2018-08-21 10:07:30 -07:00
Rajini Sivaram 06b8f09bf3 KAFKA-7255: Fix timing issue with create/update in SimpleAclAuthorizer (#5478)
ACL updates currently get `(currentAcls, currentVersion)` for the resource from ZK and do a conditional update using `(currentAcls+newAcl, currentVersion)`. This supports concurrent atomic updates if the resource path already exists in ZK. If the path doesn't exist, we currently do a conditional createOrUpdate using `(newAcl, 0)`. So two brokers adding acls using `(newAcl1, 0)` and `(newAcl2, 0)` will result in one broker creating the path and setting newAcl1, while the other broker can potentially update the path with `(newAcl2, 0)`, losing newAcl1. The timing window is very small, but we have seen intermittent failures in `SimpleAclAuthorizerTest.testHighConcurrencyModificationOfResourceAcls` as a result of this window.
2018-08-08 19:26:01 +01:00
Matthias J. Sax 4425c8ffbb MINOR: Caching layer should forward record timestamp (#5423) (#5426)
Reviewer: Guozhang Wang <guozhang@confluent.io>
2018-08-01 13:36:34 -07:00
Matthias J. Sax 924d27c1e1
MINOR: update release script (#5329)
Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-07-16 16:10:13 -07:00
Matthias J. Sax 1785c72ff1
MINOR: fix Streams quickstart (#5331)
Reviewer: Guozhang Wang <guozhang@confluent.io>
2018-07-03 17:06:50 -07:00
Matthias J. Sax bab1a62240
MINOR: updatd for 0.11.0.3 release (#5326)
Reviewer: Guozhang Wang <guozhang@confluent.io>
2018-07-03 13:44:58 -07:00
Jason Gustafson 156a28844f MINOR: Fix kafkatest snapshot version for 0.11.0.4 2018-07-03 13:28:20 -07:00
Rajini Sivaram 36bb0eaecb MINOR: Close timing window in SimpleAclAuthorizer startup (#5318)
ZooKeeper listener for change notifications should be created before loading the ACL cache to avoid timing window if acls are modified when broker is starting up.

Reviewers: Jun Rao <junrao@gmail.com>, Ismael Juma <ismael@confluent.io>
2018-07-02 22:34:04 +01:00
Matthias J. Sax 9383567d1e Bump version to 0.11.0.4-SNAPSHOT 2018-07-02 10:01:59 -07:00
Matthias J. Sax e9fed73b02 Merge tag '0.11.0.3-rc0' into 0.11.0
0.11.0.3-rc0
2018-07-02 09:58:22 -07:00
Jason Gustafson 0d12b586e9 Revert "MINOR: Use kill_java_processes when killing ConsoleConsumer in system tests (#5297)"
This reverts commit 530a02a1b3.
2018-07-02 09:32:14 -07:00
Anna Povzner 530a02a1b3 MINOR: Use kill_java_processes when killing ConsoleConsumer in system tests (#5297)
Use `kill_java_processes` to stop the console consumer service since it uses jcmd instead of grep to find pids, which is more reliable.
2018-06-29 09:41:05 -07:00
Matthias J. Sax 26ddb9e319 Bump version to 0.11.0.3 2018-06-22 12:12:57 -07:00
Ismael Juma 5ad8513c8d
MINOR: Upgrade to Gradle 4.8.1 (#5266)
Maven Central dropped support for all versions but
TLS 1.2, so dependency resolution fails if Gradle
builds run with JDK 7. 2.0 and trunk require JDK 8,
but every other version is affected. Gradle 4.8.1
fixes the issue by enabling TLS 1.2 by default even
when JDK 7 is used.

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
2018-06-21 09:50:25 -07:00
Gunnar Morling 95fbb2e03f KAFKA-7058: Comparing schema default values using Objects#deepEquals()
https://issues.apache.org/jira/browse/KAFKA-7058
* Summary of testing strategy: Added new unit test

Author: Gunnar Morling <gunnar.morling@googlemail.com>

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

Closes #5225 from gunnarmorling/KAFKA-7058

(cherry picked from commit be846d833c)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
2018-06-16 23:10:35 -07:00
Matthias J. Sax 8d4e4fe539 HOTFIX: remove sub-module 'kafka' (#5238)
Reviewer: Guozhang Wang <guozhang@confluent.io>
2018-06-15 22:47:53 -07:00
Guozhang Wang 88529006b4
KAFKA-7021: checkpoint offsets from committed (#5232)
This is a cherry-pick PR from #5207

1. add the committed offsets to checkpointable offset map.

2. add the restoration integration test for the source KTable case.
2018-06-14 22:21:49 -07:00
Damian Guy 42a82ac4e9 KAFKA-6360: Clear RocksDB Segments when store is closed
Now that we support re-initializing state stores, we need to clear the segments when the store is closed so that they can be re-opened.

Author: Damian Guy <damian.guy@gmail.com>

Reviewers: Bill Bejeck <bbejeck@gmail.com>, Guozhang Wang <wangguoz@gmail.com>, Ted Yu <yuzhihong@gmail.com>

Closes #4324 from dguy/kafka-6360
2018-06-14 22:07:39 -07:00
Matthias J. Sax a8e48b3f95 KAFKA-6711: GlobalStateManagerImpl should not write offsets of in-memory stores in checkpoint file (#5219) 2018-06-14 14:16:46 -07:00
Randall Hauch 369f1d73b7 KAFKA-7009: Suppress the Reflections log warning messages in system tests
This could be backported to older branches to reduce the extra log warning messages there, too.

Running Connect system tests in this branch builder job: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1773/

Author: Randall Hauch <rhauch@gmail.com>

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

Closes #5151 from rhauch/kafka-7009

(cherry picked from commit 7a1f555676)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
2018-06-12 22:57:36 -07:00
Jagadesh Adireddi 51f585dee6 KAFKA-6906: Fixed to commit transactions if data is produced via wall clock punctuation (#5105)
Reviewers: Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-06-12 19:10:38 -07:00
Guozhang Wang 341fd7b533 KAFKA-6634: Delay starting new transaction in task.initializeTopology (#4684)
As titled, not starting new transaction since during restoration producer would have not activity and hence may cause txn expiration. Also delay starting new txn in resuming until initializing topology.

Reviewers: Matthias J. Sax <mjsax@apache.org>, Bill Bejeck <bill@confluent.io>
2018-06-12 17:54:48 -07:00
Bill Bejeck fac2fa0f46 KAFKA-6205: initialize topology after state stores restoration completed
Initialize topology after state store restoration.
Although IMHO updating some of the existing tests demonstrates the correct order of operations, I'll probably add an integration test, but I wanted to get this PR in for feedback on the approach.

Author: Bill Bejeck <bill@confluent.io>

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Matthias J. Sax <mjsax@apache.org>

Closes #4415 from bbejeck/KAFKA-6205_restore_state_stores_before_initializing_topology

minor log4j edits
2018-06-12 17:24:01 -07:00
Gitomain 9bf277bc1a KAFKA-6782: solved the bug of restoration of aborted messages for GlobalStateStore and KGlobalTable (#4900)
Reviewer: Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-06-12 13:31:56 -07:00
tedyu 9c9657b102 KAFKA-6747 Check whether there is in-flight transaction before aborting transaction (#4826)
As Frederic reported on mailing list under the subject "kafka-streams Invalid transition attempted from state READY to state ABORTING_TRANSACTION", producer#abortTransaction should only be called when transactionInFlight is true.

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Matthias J. Sax <matthias@confluent.io>
2018-06-12 10:44:52 -07:00
Matthias J. Sax 8a04902cc3
MINOR: update jackson dependencies (#5180)
Reviewer: Ismael Juma <ismael@confluent.io>
2018-06-11 18:56:44 -07:00
John Roesler b5b795b302 KAFKA-6925: fix parentSensors memory leak (#5108) (#5120)
Previously, we failed to remove sensors from the parentSensors map, effectively a memory leak.

Add a test to verify that removed sensors get removed from the underlying registry as well as the parentSensors map.

Reviewers: Guozhang Wang <wangguoz@gmail.com>
2018-06-03 10:58:34 -07:00
Rajini Sivaram 66680d3545 KAFKA-6917; Process txn completion asynchronously to avoid deadlock (#5036)
Reviewers: Guozhang Wang <wangguoz@gmail.com>, Jason Gustafson <jason@confluent.io>
2018-05-18 13:42:06 -07:00
Robert Yokota 9e4d504722 KAFKA-6566: Improve Connect Resource Cleanup
This is a change to improve resource cleanup for sink tasks and source tasks.  Now `Task.stop()` is called from both `WorkerSinkTask.close()` and `WorkerSourceTask.close()`.

It is called from `WorkerXXXTask.close()` since this method is called in the `finally` block of `WorkerTask.run()`, and Connect developers use `stop()` to clean up resources.

Author: Robert Yokota <rayokota@gmail.com>

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

Closes #5020 from rayokota/K6566-improve-connect-resource-cleanup

(cherry picked from commit ee8abb2f70)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
2018-05-18 10:40:44 -07:00
Anna Povzner 906b50722d KAFKA-6857; Leader should reply with undefined offset if undefined leader epoch requested (#4967)
The leader must explicitly check if requested leader epoch is undefined, and return undefined offset so that the follower can fall back to truncating to high watermark. Otherwise, if the leader also is not tracking leader epochs, it may return its LEO, which will the follower to truncate to the incorrect offset.
2018-05-14 14:18:44 -07:00
tedyu 70fb5a42f4 KAFKA-6307: Fix KafkaMbean leak in JmxReporter (#4307)
We should remove the map entry from mbeans if it becomes
empty during metric removal.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Satish Duggana <satish.duggana@gmail.com>, Ismael Juma <ismael@juma.me.uk>

The tests were excluded from the backport to the 0.11.0
branch due to conflicts.
2018-05-14 14:00:41 -07:00
Jarek Rudzinski 7b9c4b6172 MINOR: use jdk8 to build/run system tests (#4925)
Debian installer packages are no longer available for Java 7.

Also upgrade AMI to latest ubuntu/trusty 14 amd64 as the older
one is no longer available.

Note that this only changes the JDK used to build and run
the system tests. We still have Jenkins jobs that compile
and run the JUnit tests with Java 7 so that we don't use
features that are only available in newer Java versions.
2018-04-27 15:37:14 -07:00
Matthias J. Sax 88da81b945
MINOR: StreamsConfig `upgrade.from` should not be in list of deprecated configs (#4780)
Reviewers: Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-03-27 13:46:08 -07:00
Matthias J. Sax 13dbcad9bb
KAFKA-6054: Fix upgrade path from Kafka Streams v0.10.0 (#4761)
Introduces new config parameter `upgrade.from`.

Reviewers: Guozhang Wang <guozhang@confluent.io>, Bill Bejeck <bill@confluent.io>
2018-03-26 20:32:20 -07:00
Randall Hauch 4d398e755f KAFKA-6661: Ensure sink connectors don’t resume consumer when task is paused
Changed WorkerSinkTaskContext to only resume the consumer topic partitions when the connector/task is not in the paused state.

The context tracks the set of topic partitions that are explicitly paused/resumed by the connector, and when the WorkerSinkTask resumes the tasks it currently resumes all topic partitions *except* those that are still explicitly paused in the context. Therefore, the change above should result in the desired behavior.

Several debug statements were added to record when the context is called by the connector.

This can be backported to older releases, since this bug goes back to 0.10 or 0.9.

Author: Randall Hauch <rhauch@gmail.com>

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

Closes #4716 from rhauch/kafka-6661

(cherry picked from commit e7ef719a5b)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
2018-03-15 16:05:59 -07:00
Max Zheng 57e39ab614 MINOR: Tag AWS instances with Jenkins build url (#4657)
This will allow us to trace leaked instances back to the job,
so that we can figure out what happened and fix the leak.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2018-03-12 04:41:53 -07:00
Ewen Cheslack-Postava 3bc3e40e6d MINOR: Make PushHttpMetricsReporter use daemon threads.
This is a safe guard against users that do not properly close() the reporter, which causes
the process to hang even if its main() method returns. This was the case with Kafka Streams
apps in some cases in Kafka < 1.1.0 (KAFKA-6383). Without this fix, this behavior can make
it difficult to use this class in some types of system tests.

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

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

Closes #4629 from ewencp/http-metrics-dont-block-shutdown

(cherry picked from commit 73fb1bffe1)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
2018-03-02 13:16:39 -08:00
Matthias J. Sax d98319b48e MINOR: wait for broker startup for system tests (#4363)
ensure that brokers are registered at ZK before start() returns

Author: Matthias J. Sax <matthias@confluent.io>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>, Damian Guy <damian@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-02-23 16:18:43 -08:00
Ewen Cheslack-Postava 4a0d940191 MINOR: Cancel port forwarding for HttpMetricsCollector during cleanup
Currently port forwarding is setup for HttpMetricsCollector when the Service's start_node method is called, but not canceled during stop. This hasn't presented a problem so far because we don't have tests that use this *and* restart the service. However, if a test/service does that, it will throw an exception since the port is already bound.

This just does the cleanup when stopping so a subsequent attempt to start again will succeed.

https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1320 is a test run for a Test that uses ProducerPerformanceService, which in turn uses HttpMetricsCollector to validate the change.

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

Reviewers: Ismael Juma <ismael@juma.me.uk>, Apurva Mehta <apurva@confluent.io>

Closes #4604 from ewencp/cleanup-reverse-port-forward

(cherry picked from commit da379c95e4)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
2018-02-21 10:53:08 -08:00
Jiangjie (Becket) Qin c1e0111a05 KAFKA-6568; Log cleaner should check partition state before removal from inProgress map (#4580)
The log cleaner should not naively remove the partition from in progress map without checking the partition state. This may cause the other thread calling `LogCleanerManager.abortAndPauseCleaning()` to hang indefinitely.
2018-02-16 18:22:14 -08:00
Yaswanth Kumar e37c2ddf2e KAFKA-6536: Adding versions for japicmp-maven-plugin and maven-shade-plugin in quickstart (#4569)
Author: Yaswanth Kumar <yash27422@gmail.com>

Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2018-02-16 13:27:25 -08:00
Jeremy Custenborder c64f6e151c KAFKA-5550; Connect Struct.put() should include the field name if validation fails (#3507)
Changed call to use the overload of ConnectSchema.validateValue() method with the field name passed in. Ensure that field in put call is not null.

Reviewers: Randall Hauch <rhauch@gmail.com>, Jason Gustafson <jason@confluent.io>
2018-02-12 09:21:45 -08:00
parafiend 73c646c442 KAFKA-6529: Stop file descriptor leak when client disconnects with staged receives (#4517)
If an exception is encountered while sending data to a client connection, that connection is disconnected. If there are staged receives for that connection, they are tracked to process those records. However, if the exception was encountered during processing a `RequestChannel.Request`, the `KafkaChannel` for that connection is muted and won't be processed.

Disable processing of outstanding staged receives if a send fails. This stops the leak of the memory for pending requests and the file descriptor of the TCP socket.

Test that a channel is closed when an exception is raised while writing to a socket that has been closed by the client. Since sending a response requires acks != 0, allow specifying the required acks for test requests in SocketServerTest.scala.

Author: Graham Campbell <graham.campbell@salesforce.com>

Reviewers: Jason Gustafson <jason@confluent.io>, Rajini Sivaram <rajinisivaram@googlemail.com>, Ismael Juma <ismael@juma.me.uk>, Ted Yu <yuzhihong@gmail.com>
2018-02-09 15:12:44 +00:00
Ewen Cheslack-Postava 63f4cc69ba MINOR: Update copyright year in NOTICE
Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Jason Gustafson <jason@confluent.io>, Guozhang Wang <wangguoz@gmail.com>

Closes #4529 from ewencp/update-NOTICE-year

(cherry picked from commit 2d4fb78540)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
2018-02-05 13:42:43 -08:00