Es pulls mysql incremental update code _ MySQL

Source: Internet
Author: User
Elasticsearch pulls mysql incremental update code based on open-source plug-ins. See http://my.oschina.net/qiangzigege/blog/220224 for details

~~~~~~

Objective: to implement incremental update

Principle

1) This task is deleted after the first full update is completed.

2) release the incremental update task.

~~~~~~~~~

The incremental update task template is as follows:

Curl-XPUT 'IP: 9200/_ river/my_jdbc_river/_ meta'-d' {"type": "jdbc", "jdbc": {"url": "jdbc: mysql: // IP: 3306/fastooth "," user ":" dewmobile "," password ":" dewmobile "," SQL ": "select * from users where updated_at between UNIX_TIMESTAMP (now () * 1000-60000 86400000 and UNIX_TIMESTAMP (now () * 1000 or created_at between UNIX_TIMESTAMP (now ()) * 1000-60000 86400000 and UNIX_TIMESTAMP (now () * 1000 "," schedule ":" 0 0-59 0-23 * *? "," Index ":" ccc "," type ":" ddd "}}'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.