Commit Graph

10688 Commits

Author SHA1 Message Date
Randall Hauch
0e58dba9d6 DBZ-1 Renamed the connector modules and packages 2016-02-02 16:58:48 -06:00
Randall Hauch
44b5139ebf Merge pull request #7 from rhauch/dbz-7
DBZ-7 Require Docker 1.9 or higher rather than 1.6 or higher
2016-02-02 16:16:44 -06:00
Randall Hauch
ff25b4de0a DBZ-7 Require Docker 1.9 or higher rather than 1.6 or higher 2016-02-02 16:16:17 -06:00
Randall Hauch
baaf2ee6e9 Merge pull request #6 from rhauch/dbz-1
DBZ-1 Added the MySQL source connector
2016-02-02 15:02:58 -06:00
Randall Hauch
2da5b37f76 DBZ-1 Added support for recording and recovering database schema
Adds a small framework for recording the DDL operations on the schema state (e.g., Tables) as they are read and applied from the log, and when restarting the connector task to recover the accumulated schema state. Where and how the DDL operations are recorded is an abstraction called `DatabaseHistory`, with three options: in-memory (primarily for testing purposes), file-based (for embedded cases and perhaps standalone Kafka Connect uses), and Kafka (for normal Kafka Connect deployments).

The `DatabaseHistory` interface methods take several parameters that are used to construct a `SourceRecord`. The `SourceRecord` type was not used, however, since that would result in this interface (and potential extension mechanism) having a dependency on and exposing the Kafka API. Instead, the more general parameters are used to keep the API simple.

The `FileDatabaseHistory` and `MemoryDatabaseHistory` implementations are both fairly simple, but the `FileDatabaseHistory` relies upon representing each recorded change as a JSON document. This is simple, is easily written to files, allows for recovery of data from the raw file, etc. Although this was done initially using Jackson, the code to read and write the JSON documents required a lot of boilerplate. Instead, the `Document` framework developed during Debezium's very early prototype stages was brought back. It provides a very usable API for working with documents, including the ability to compare documents semantically (e.g., numeric values are converted to be able to compare their numeric values rather than just compare representations) and with or without field order.

The `KafkaDatabaseHistory` is a bit more complicated, since it uses a Kafka broker to record all database schema changes on a single topic with single partition, and then upon restart uses it to recover the history from the dedicated topics. This implementation also records the changes as JSON documents, keeping it simple and independent of the Kafka Connect converters.
2016-02-02 14:27:14 -06:00
Randall Hauch
6796fe32be DBZ-1 Added the initial stages of a MySQL source connector
The connector is in a basic working state, although it is not well tested yet and upon restart does not recover the schema state from the previous run.
2016-01-29 10:12:28 -06:00
Randall Hauch
71cfbb16f8 Removed unused README-project.md file 2016-01-27 09:10:24 -06:00
Randall Hauch
d617f7c02b Readded copyright file with correct case. 2016-01-27 09:09:30 -06:00
Randall Hauch
9009a8e7d1 Removed copyright file 2016-01-27 09:08:43 -06:00
Randall Hauch
457c480fa2 Renamed license file to mirror form used in other top-level filenames. 2016-01-27 09:06:23 -06:00
Randall Hauch
991d1869e1 Merge pull request #5 from rhauch/dbz-5
DBZ-5 Added change log file
2016-01-27 09:04:46 -06:00
Randall Hauch
39cb1eb8d5 Merge pull request #4 from rhauch/dbz-6
DBZ-6 Enforce line ending style for most file types
2016-01-27 09:02:40 -06:00
Randall Hauch
a9de015322 DBZ-5 Added change log file. 2016-01-27 09:01:44 -06:00
Randall Hauch
9b283f5792 DBZ-6 Enforce line ending style for most file types. 2016-01-27 08:55:09 -06:00
Randall Hauch
74f5b1ad4b Merge pull request #3 from rhauch/DBZ-4
DBZ-4 Changed copyright statement in source code headers and adjusted checkstyle rules
2016-01-27 08:44:35 -06:00
Randall Hauch
1ce6e1dde5 DBZ-4 Added copyright.txt file with generated list of contributors based upon Git history and Java @author tags. 2016-01-27 08:38:10 -06:00
Randall Hauch
d9090ed67b DBZ-4 Removed unused files, most of which were originally copied from the ModeShape codebase. 2016-01-27 08:37:23 -06:00
Randall Hauch
4c538d4e54 DBZ-4 Changed copyright statement in source code headers and adjusted checkstyle rules. 2016-01-27 08:12:01 -06:00
Randall Hauch
ddf61cec46 Merge pull request #2 from rhauch/update-documentation
Update documentation to reflect new copyright approach
2016-01-25 19:04:33 -06:00
Randall Hauch
eff1f665fa Updated checkstyle rule for headers, and corrected several incorrect headers. 2016-01-25 18:59:25 -06:00
Randall Hauch
a0a8953d2a Updated the copyright dates per new approach. 2016-01-25 18:33:08 -06:00
Randall Hauch
b7f2221107 Updated the README and added a CONTRIBUTE.md file with details for developers. 2016-01-25 18:33:07 -06:00
Randall Hauch
671172a6d3 Merge pull request #1 from rhauch/fix-travis
Changed Docker usage on Travis-CI
2016-01-25 18:31:30 -06:00
Randall Hauch
d7e52165be Changed MySQL binlog reading integration test to eliminate concurrent issues. 2016-01-25 18:19:33 -06:00
Randall Hauch
4ddd4b33be Changed Docker usage on Travis-CI 2016-01-25 16:12:07 -06:00
Randall Hauch
772977f391 Attempted to correct Travis build error 2016-01-25 13:50:17 -06:00
Randall Hauch
5e4c428285 Correct return type for function 2016-01-25 13:41:38 -06:00
Randall Hauch
ed36e25861 Added Travis build status image to README 2016-01-25 13:35:03 -06:00
Randall Hauch
8b31a54495 Added support for Travis-CI builds. 2016-01-25 13:31:50 -06:00
Randall Hauch
74ddfe1ec5 Updated MySQL integration test 2016-01-25 13:01:39 -06:00
Randall Hauch
71e90b5a69 Added MySQL ingest module with support for reading DDL statements. 2016-01-23 08:26:52 -06:00
Randall Hauch
8e6c615644 Added utilities for managing a relational schema's table definitions, with support for updating those by reading DDL 2016-01-20 08:53:29 -06:00
Randall Hauch
7b2a0927ce Updated readme files 2015-12-02 11:59:01 -06:00
Randall Hauch
dffdfd8049 Added debezium-core and MySQL binary log reading tests. 2015-11-24 15:54:37 -06:00
Randall Hauch
42926f17f3 Enabled binary replication log on MySQL config used in integration tests 2015-11-19 09:14:32 -06:00
Randall Hauch
bc3be4516a Added ability to customize database configurations in Docker images used in integration tests 2015-11-19 09:03:28 -06:00
Randall Hauch
fd9e04552c Used a different base image for MySQL.
This `mysql/mysql-server` official image from the Oracle MySQL team is smaller and starts faster than the Docker "official" `mysql` image. It's also far simpler to wait for startup to complete (the `mysql` image initializes MySQL, stops it, then restarts it, so the "ready" messages appear twice, making it very difficult for the the docker maven plugin to wait reliably).
2015-11-18 17:02:08 -06:00
Randall Hauch
0a99ed67cd Initial project skeleton
This initial commit defines several modules for ingesting from JDBC and specifically from PostgreSQL and MySQL. The two latter modules define separate unit tests and integration tests, and prior to running the integration tests create a Docker image with the respective database and start a Docker container. Any *.sql or *.sh files are run on database, allowing the modules to easily create and populate databases used in the tests. The integration tests are then run (using the failsafe maven plugin), and regardless of whether there are any failures the Docker container is always shutdown (at least when running `mvn install`). See the modules' README files for details.
2015-11-18 14:23:29 -06:00