# MySQL address, user and password
# user must have replication privilege in MySQL.
my_addr = "127.0.0.1:3306"
my_user = "root"
my_pass = "数据库密码" # Elasticsearch address
es_addr = "Elasticsearch的IP地址:9200" # Path to store data, like master.info, and dump MySQL data
data_dir = "./var" # Inner Http status address
stat_addr = "127.0.0.1:12800" # pseudo server id like a slave
<span style="color: #ff0000;">server_id = 1001 #此ID必须与上面的server_id一致</span> # mysql or mariadb
flavor = "mysql" # mysqldump execution path
# if not set or empty, ignore mysqldump.
mysqldump = "mysqldump" # MySQL data source
[[source]]
schema = "torrent" #数据库名 # Only below tables will be synced into Elasticsearch.
# "test_river_[0-9]{4}" is a wildcard table format, you can use it if you have many sub tables, like table_0000 - table_1023
# I don't think it is necessary to sync all tables in a database.
# 这里就是需要添加索引的表
tables = ["torrent[0-9]{1}","torrenta","torrentb","torrentc","torrentd","torrente","torrentf"] # Below is for special rule mapping
[[rule]]
schema = "torrent" # 数据库名
table = "torrent[0-9]{1}" # 表名
index = "torrent" # 索引名,跟之前程序创立的一致即可 [[rule]]
schema = "torrent"
table = "torrenta"
index = "torrent" [[rule]]
schema = "torrent"
table = "torrentb"
index = "torrent" [[rule]]
schema = "torrent"
table = "torrentc"
index = "torrent" [[rule]]
schema = "torrent"
table = "torrentd"
index = "torrent" [[rule]]
schema = "torrent"
table = "torrente"
index = "torrent" [[rule]]
schema = "torrent"
table = "torrentf"
index = "torrent"

./bin/go-mysql-elasticsearch -config=./etc/river.toml

etc/river.toml的更多相关文章

  1. elasticsearch搭建并通过go-mysql-elasticsearch同步db数据达到搜索引擎的目的

    logstash-input-jdbc/elasticsearch-jdbc缺点:删除记录没有办法同步,只能两边执行自己的删除命令,版本16年后未更新. go-mysql-elasticsearch缺 ...

  2. ElasticSearch 安装 go-mysql-elasticsearch 同步mysql的数据

    一.首先在Centos6.5上安装 go 语言环境 下载Golang语言包:https://studygolang.com/dl [hoojjack@localhost src]$ ls apache ...

  3. mysql数据实时同步到Elasticsearch

    业务需要把mysql的数据实时同步到ES,实现低延迟的检索到ES中的数据或者进行其它数据分析处理.本文给出以同步mysql binlog的方式实时同步数据到ES的思路, 实践并验证该方式的可行性,以供 ...

  4. laravel5+ElasticSearch+go-mysql-elasticsearch MySQL数据实时导入(mac)

    1. ElasticSearch安装 直接使用brew install elasticsearch 安装最新版本的es,基本没有障碍. 2.Laravel5 框架添加elasticsearch支持 在 ...

  5. 使用go-mysql-elasticsearch同步mysql数据库信息到ElasticSearch

    本文介绍如何使用go-mysql-elasticsearch同步mysql数据库信息到ElasticSearch. 1.go-mysql-elasticsearch简介 go-mysql-elasti ...

  6. 几篇关于MySQL数据同步到Elasticsearch的文章---第四篇:使用go-mysql-elasticsearch同步mysql数据库信息到ElasticSearch

    文章转载自: https://www.cnblogs.com/dalaoyang/p/11018541.html 1.go-mysql-elasticsearch简介 go-mysql-elastic ...

  7. Moon River

    读书笔记系列链接地址http://www.cnblogs.com/shoufengwei/p/5714661.html.        昨晚无意中听到了一首英文歌曲,虽不知其意,但是瞬间就被优美的旋律 ...

  8. poj[3093]Margaritas On River Walk

    Description One of the more popular activities in San Antonio is to enjoy margaritas in the park alo ...

  9. Crossing River

    Crossing River 题目链接:http://acm.hust.edu.cn/vjudge/problem/visitOriginUrl.action?id=26251 题意: N个人希望去过 ...

随机推荐

  1. P4742 【[Wind Festival]Running In The Sky】

    相信来做这道题的人肯定都学过\(Tarjan\)缩点吧,如果没有建议先去做P3387 [模板]缩点,如果你忘了,建议也去看看 满足上面要求后,你会惊奇发现,这两道题基本一样,唯一的差别就是这道题需要记 ...

  2. 容器云平台No.6~企业级分布式存储Ceph

    简介 ceph作为一个统一的分布式存储系统,提供了高性能,高可用性,高扩展性.ceph的统一体现在其可以提供文件系统.块存储.对象存储,在云环境中,通常采用ceph作为后端存储来保证数据的高可用性. ...

  3. noSql 的应用场景简述

    选型一定要结合实际情况而不是照本宣科,比如: 企业发展之初,明明一个关系型数据库就能搞定且支撑一年的架构,搞一套大而全的技术方案出来 有一些数据条件查询多,更适合使用ElasticSearch做存储降 ...

  4. java.lang.UnsupportedOperationException: A TupleBackedMap cannot be modified.解决以及探究

    java.lang.UnsupportedOperationException: A TupleBackedMap cannot be modified. at org.springframework ...

  5. 微信小程序结合微信公众号进行消息发送

    微信小程序结合微信公众号进行消息发送 由于小程序的模板消息已经废弃了,官方让使用订阅消息功能.而订阅消息的使用限制比较大,用户必须得订阅.需要获取用户同意接收消息的权限.用户必须得和小程序有交互的时候 ...

  6. mongodb安装教程(亲测有效)

    网上太多教程了,都是说的不明不白,所以自己整理一份 #参考官网: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat ...

  7. Git多人项目开发流程演练

    1. 前言 本文利用 GitHub 平台进行一个多人项目开发流程的演练,以加深课上所学内容. 参考文献:五⼤场景玩转 Git,只要这一篇就够了! 2. 初始化项目 2.1 新建远程项目 一个多人项目通 ...

  8. 【Python】使用Python解释器

    使用Python解释器 调用解释器 python -c command [arg] - 其中 command 要换成想执行的指令,就像命令行的 -c 选项. Python 模块也可以作为脚本使用 py ...

  9. 2020.09.05【NOIP提高组&普及组】模拟赛C组1总结

    T1:机器翻译 这一道题是一个很简单的队列题目,我们只要每次维护队列元素数量保持在m以内即可 T2:乌龟棋 这一道题我一开始比赛是暴力枚举(万事先暴力),很明显这个肯定会超时(30分)那么考虑动态规划 ...

  10. 伺服电机的Arduino库函数

    servo.attach(pin)  //连接伺服电机的信号线于控制板的引脚,9或10号引脚servo.attach(pin, min, max) servo: a variable of type ...