properties

canal同步mysql至elasticsearch中

泄露秘密 提交于 2020-02-04 06:38:23
环境准备 zookeeper集群 elasticsearch-6.8.6 canal admin-1.1.4 canal deployer-1.1.4 canal adapter-1.1.4 关于elasticsearch版本要求具体可自行百度,另需准备postman创建es索引,获取canal网址: https://github.com/alibaba/canal/ 搭建zookeeper集群 在这里直接使用docker-compose创建 version : '3.1' services : zoo1 : image : zookeeper restart : always hostname : zoo1 ports : - 2181 : 2181 environment : ZOO_MY_ID : 1 ZOO_SERVERS : server.1=0.0.0.0 : 2888 : 3888;2181 server.2=zoo2 : 2888 : 3888;2181 server.3=zoo3 : 2888 : 3888;2181 volumes : - / : /opt/compose - volumes/zk - volumes/zoo1 zoo2 : image : zookeeper restart : always hostname : zoo2 ports : -

分布式消息队列Kafka

我只是一个虾纸丫 提交于 2020-02-03 12:16:37
一.Kafka架构 producer:生产馒头 consumer:吃馒头 broker:篮子来装馒头 topic:馒头的标签 馒头A,馒头B 二.安装zookeeper 配置环境变量 zoo.cfg 配置tmp路径(自己定义位置) 默认端口2181 启动:./zkServer.sh start 三.安装Kafka 配置环境变量 server.properties 配置: broker.id(要唯一,一个Kafka相当于一个篮子) 接听端口默认 9092 log.dirs(配置tmp路径,自己定义位置) hostname=hadoop000 zookeeper.connection=hadoop000:2181 启动:kafka-server-start.sh $KAFKA_HOME/config/server.properties 创建topic:kafka-topics.sh --create --zookeeper hadoop000:2181 --replication-factor 1 --partitions 1 --topic test 查看topic:kafka-topics.sh --list --zookeeper hadoop000:2181 发送消息:kafka-console-producer.sh --broker-list hadoop000:9092

Python property callable

我的未来我决定 提交于 2020-02-03 04:24:31
问题 Is there any way to have a property and a method with the same name? I mean a property that can be used the usual way and to be callable at the same time? Like this: >>> b = Book() >>> b.pages 123 >>> b.pages() 123 >>> b.pages(including_toc=False) 123 >>> b.pages(including_toc=True) 127 回答1: No, you can't. () always calls an object from the expression on its left-hand side. What this means is, that b.pages() can be read as follows: _tmp = b.pages _tmp() As you can see, methods are attributes.

Java疑难杂症

孤人 提交于 2020-02-03 00:08:23
目录 1、父项目的的包依赖和plugin结构 2、SpringBoot中application.properties相关坑 3、properties文件中有中文时,需要在设置中的file encoding勾选 1、父项目的的包依赖和plugin结构 <dependencyManagement> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> </dependencies> </dependencyManagement> <build> <pluginManagement> <plugins> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>3.1.0</version> </plugin> </plugins> </pluginManagement> </build> 子项目继承 <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring

elasticsearch之mappings

感情迁移 提交于 2020-02-02 19:28:00
前言 mappings 就相当于 关系型数据库中的 表结构 例: GET t1 { "t1" : { "aliases" : { }, # 该索引是否有别名 "mappings" : { #mappings 信息 "doc" : { #索引类型 doc "properties" : { #字段详细映射关系 在 properties中 "name" : { "type" : "text", "fields" : { "keyword" : { "type" : "keyword", "ignore_above" : 256 } } } } } }, "settings" : { #关于索引 t1 的settings 设置 "index" : { "creation_date" : "1553334893136", #索引创建时间 "number_of_shards" : "5", #主分片 "number_of_replicas" : "1", #副分片 "uuid" : "lHfujZBbRA2K7QDdsX4_wA", "version" : { "created" : "6050499" }, "provided_name" : "t1" } } } } 映射是什么? ES 中的 映射 用来 定义一个文档及其包含的字段如何存储 和索引的过程。 例如,我们可以使用映射来定义:

Update textbox based on combobox selection (.CSV/Array)

安稳与你 提交于 2020-02-02 16:15:42
问题 I have a .csv file containing columns. I already have a form which allows the user to insert and save the information to this .csv file. On a separate form, I created the ability to select items by their Item ID. I have a combobox which is displaying a drop down of Item IDs from the .csv file. Right now, the only Item IDs are 1000-1003. public void Items() { int itemID = 0; Inventory[] IArray = Inventory.getInv(); for (int v = 0; v < IArray.Length; v++) { if (IArray[v] != null) { itID =

Update textbox based on combobox selection (.CSV/Array)

只谈情不闲聊 提交于 2020-02-02 16:10:58
问题 I have a .csv file containing columns. I already have a form which allows the user to insert and save the information to this .csv file. On a separate form, I created the ability to select items by their Item ID. I have a combobox which is displaying a drop down of Item IDs from the .csv file. Right now, the only Item IDs are 1000-1003. public void Items() { int itemID = 0; Inventory[] IArray = Inventory.getInv(); for (int v = 0; v < IArray.Length; v++) { if (IArray[v] != null) { itID =

need to transform an xml file into another xml using xslt whose xsl file uses a Properties.xml file

六月ゝ 毕业季﹏ 提交于 2020-02-02 13:05:29
问题 Consider my input xml file as below <?xml version="1.0" encoding="UTF-8"?> <com xsi:schemaLocation="http://do.way.com/sales/Amb http://do.way.com/temp/sales/ale/ax.xsd" xmlns:w="http://do.way.com/sales/W" xmlns="http://do.way.com/sales/Amb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wire="http://do.way.com/sales/Wire"> <content> <wire:wire> <wire:sI> <w:aH> <text>Ccc <dynamic name="C_R_N"/>: More</text> <w:contact value="false"/> </w:aH> <w:page> <nL>Please call us</nL> </w

need to transform an xml file into another xml using xslt whose xsl file uses a Properties.xml file

若如初见. 提交于 2020-02-02 13:04:03
问题 Consider my input xml file as below <?xml version="1.0" encoding="UTF-8"?> <com xsi:schemaLocation="http://do.way.com/sales/Amb http://do.way.com/temp/sales/ale/ax.xsd" xmlns:w="http://do.way.com/sales/W" xmlns="http://do.way.com/sales/Amb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wire="http://do.way.com/sales/Wire"> <content> <wire:wire> <wire:sI> <w:aH> <text>Ccc <dynamic name="C_R_N"/>: More</text> <w:contact value="false"/> </w:aH> <w:page> <nL>Please call us</nL> </w

need to transform an xml file into another xml using xslt whose xsl file uses a Properties.xml file

五迷三道 提交于 2020-02-02 13:03:26
问题 Consider my input xml file as below <?xml version="1.0" encoding="UTF-8"?> <com xsi:schemaLocation="http://do.way.com/sales/Amb http://do.way.com/temp/sales/ale/ax.xsd" xmlns:w="http://do.way.com/sales/W" xmlns="http://do.way.com/sales/Amb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wire="http://do.way.com/sales/Wire"> <content> <wire:wire> <wire:sI> <w:aH> <text>Ccc <dynamic name="C_R_N"/>: More</text> <w:contact value="false"/> </w:aH> <w:page> <nL>Please call us</nL> </w