This repository has been archived by the owner on Aug 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into DATAPIPE-2008-abrar-license
- Loading branch information
Showing
5 changed files
with
114 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,74 @@ | ||
README for the replication handler | ||
# MySQL Streamer | ||
|
||
To make a virtualenv consistent with what will be running the batch and have all testing tools: | ||
make venv-dev | ||
|
||
Manual testing (TODO remove when acceptance testing works): | ||
fig build | ||
fig up -d | ||
mysql -h 127.0.0.1 -u yelpdev -D yelp -P 8001 < /scratch/ryani/business_small.sql | ||
python replication_handler/batch/parse_replication_stream.py -v --no-notification | ||
What is it? | ||
----------- | ||
MySQLStreamer is a database change data capture and publish system. | ||
It’s responsible for capturing each individual database change, | ||
enveloping them into messages and publishing to Kafka. | ||
|
||
make sure it prints out the topic that would be published to kafka | ||
|
||
Setting up the docs on dev: | ||
cd docs/build/html | ||
python -m SimpleHTTPServer 8888 | ||
visit http://<your dev machine>:8888/index.html, you will have mini docs server up, maybe useful. | ||
[Read More](https://engineeringblog.yelp.com/2016/08/streaming-mysql-tables-in-real-time-to-kafka.html) | ||
|
||
Why there is a directory devdbs/ instead of using standard dev database(s): | ||
When we started the development of replication handler, dbas have not upgrade the dbs to MySQL5.6, | ||
it seemed easier to just use Docker to setup some databases for development and testing. | ||
|
||
How to download | ||
--------------- | ||
``` | ||
git clone git@github.com:Yelp/mysql_streamer.git | ||
``` | ||
|
||
|
||
Requirements | ||
------------ | ||
For Ubuntu 14.04 | ||
``` | ||
run apt-get update && apt-get upgrade -y && apt-get install -y \ | ||
build-essential \ | ||
python-dev \ | ||
libmysqlclient-dev \ | ||
python-pkg-resources \ | ||
python-setuptools \ | ||
python-virtualenv \ | ||
python-pip \ | ||
libpq5 \ | ||
libpq-dev \ | ||
wget \ | ||
language-pack-en-base \ | ||
uuid-dev \ | ||
git-core \ | ||
mysql-client-5.5 | ||
``` | ||
|
||
|
||
Tests | ||
----- | ||
Running unit test | ||
``` | ||
make -f Makefile-opensource test | ||
``` | ||
|
||
|
||
Running integration test | ||
``` | ||
make -f Makefile-opensource itest | ||
``` | ||
|
||
|
||
Demo | ||
---- | ||
``` | ||
make -f Makefile-opensource interactive-streamer | ||
``` | ||
![MySQL Streamer Demo](https://giant.gfycat.com/AdmiredLiveCopepod.gif) | ||
|
||
In the bottom pane, you can execute any mysql statement on a barebones structure we’ve set up. Try creating a table and inserting into it to see it be sent (seen in the replication handler logs in the top right), and then received messages in the top left (seen in the kafka tailer’s logs). The received messages will probably look a little funky - this is because they’re avro-encoded. | ||
|
||
|
||
License | ||
------- | ||
MySQL Streamer is licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
|
||
Contributing | ||
------------ | ||
Everyone is encouraged to contribute to MySQL Streamer by forking the Github repository and making a pull request or opening an issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters