# 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. linux学习(七)文件打包和压缩命令

    一.前言 在Windows操作系统下,我们会使用WinRAR或者快压等等的压缩软件来进行压缩或者解压. 在Linux下当然也存在压缩或解压的操作,下面我们就来学习一下在Linux下是怎么压缩和解压的! ...

  2. 简单版 Promise/A+,通过官方872个测试用例

    promise 标准 在实现 Promise 之前要清楚的是 JavaScript 中的 Promise 遵循了 Promises/A+ 规范,所以我们在编写 Promise 时也应当遵循这个规范,建 ...

  3. Java源码赏析(三)初识 String 类

    由于String类比较复杂,现在采用多篇幅来讲述 这一期主要从String使用的关键字,实现的接口,属性以及覆盖的方法入手.省略了大部分的字符串操作,比如split().trim().replace( ...

  4. Spring Boot 第一弹,问候一下世界!!!

    持续原创输出,点击上方蓝字关注我吧 目录 前言 什么是Spring Boot? 如何搭建一个Spring Boot项目? 第一个程序 Hello World 依赖解读 什么是配置文件? 什么是启动类? ...

  5. 黑菜菌的JAVA学习笔记

    简介 本文是笔者对<JAVA编程思想>的学习笔记.以自己的思维理解来写下这篇文章,尽可能地简练,易懂.本文将随本人学习进度实时更新 对象导论 抽象过程 汇编语言是对底层机器码的抽象,而面向 ...

  6. Redis 作者 Antirez 与 Contributor Mattsta 之间关于 CRC 的 Battle

    大家好,我是 yes. 昨天表弟说有个学妹问他 Redis 为什么要用 CRC16(key) mod 16384 来计算 key 所处槽的位置,我想这 CRC 一般都是用来校验的,通过多项式转换成二进 ...

  7. Kafka处理请求的全流程分析

    大家好,我是 yes. 这是我的第三篇Kafka源码分析文章,前两篇讲了日志段的读写和二分算法在kafka索引上的应用 今天来讲讲 Kafka Broker端处理请求的全流程,剖析下底层的网络通信是如 ...

  8. Linux MMC 驱动子系统简述(源码剖析)

    1. Linux MMC 驱动子系统 块设备是Linux系统中的基础外设之一,而 MMC/SD 存储设备是一种典型的块设备.Linux内核设计了 MMC子系统,用于管理 MMC/SD 设备. MMC ...

  9. P6268 [SHOI2002]舞会

    题目描述 Link 某学校要召开一个舞会.已知学校所有 \(n\) 名学生中,有些学生曾经互相跳过舞.当然跳过舞的学生一定是一个男生和一个女生.在这个舞会上,要求被邀请的学生中的任何一对男生和女生互相 ...

  10. Go 接口类型

    接口作用 Go语言中的接口是一种类型,类似于Python中的抽象基类. Go语言中使用接口来体现多态,是duck-type的一种体现. 如,只要一个东西会叫,会走,那么我们就可以将它定义为一个动物的接 ...