这篇小菜给大家演示和讲解一些Elasticsearch的API,如在工作中用到时,方便查阅。一、IndexAPI创建索引库curl-XPUT‘http://127.0.0.1:9200/test_index/‘-d‘{
"settings":{
"index":{
"number_of_shards":3,
"number_of_replicas":1
}
},
"mappings":{
"type_test_01":{
"proper..
redis节点有设置密码,然后在创建集群的时候没有设置密码的命令 ./redis-trib.rb create --replicas 1 127.0.0.1:6381 127.0.0.1:6382 127.0.0.1:6383 127.0.0.1:6384127.0.0.1:6385 127.0.0 ...
分类:
其他好文 时间:
2016-10-11 16:30:34
阅读次数:
873
使用如下语句创建一个名字为:user_document,别名为user的索引 PUT:http://localhost:9200/user_document { "settings" : { "number_of_shards" : 1, "number_of_replicas" : 0 }, "m ...
分类:
其他好文 时间:
2016-07-19 23:39:36
阅读次数:
228
1、创建新索引 PUT:http://localhost:9200/twitter { "settings" : { "number_of_shards" : 3, "number_of_replicas" : 2 }, "mappings" : { "type1" : { "properties" ...
分类:
其他好文 时间:
2016-07-17 23:03:43
阅读次数:
222
kafka topic的制定,我们要考虑的问题有很多,比如生产环境中用几备份、partition数目多少合适、用几台机器支撑数据量,这些方面如何去考量?笔者根据实际的维护经验,写一些思考,希望大家指正。 1.replicas数目 可以从上图看到,备份越多,性能越低,因为kafka的写入只写入主分区, ...
分类:
其他好文 时间:
2016-07-09 01:57:49
阅读次数:
4331
用mongdb也大半年了,一直是业务上的逻辑实现了就ok。然而这样并不能进步……因此今天查了查java连接mongodb驱动的源码,搜到的各种信息整合一下,方便以后深入的使用。先贴连接数据库代码List<ServerAddress>replicaSet=new
ArrayList<ServerAddress>();
replicaS..
分类:
数据库 时间:
2016-04-14 19:32:56
阅读次数:
448
首先解释下2个名词:
AR(assignreplicas):分配副本 ISR(in-sync replicas):在同步中的副本,即下图:
Partition {
topic : string //topic名称
partition_id...
分类:
其他好文 时间:
2016-04-01 18:24:25
阅读次数:
254
Whenever a broker stops or crashes leadership for that broker's partitions transfers to other replicas. This means that by default when the broker is
分类:
其他好文 时间:
2016-02-25 13:41:16
阅读次数:
136
02-16T10:22:38 Skipping table xoxdb.tb_valuelog because on the master it would be checksummed in one chunk but on these replicas it has too many rows:
分类:
其他好文 时间:
2016-02-16 13:00:51
阅读次数:
227
通过代码创建了索引名称为demoindex,索引类型为school,以下是索引类型的数据映射结构:{ "state": "open", "settings": { "index.number_of_replicas": "1", "index.number_o...
分类:
其他好文 时间:
2015-12-25 22:24:55
阅读次数:
1876