01 2018 档案

摘要:curl -XGET 'localhost:9200/_cluster/health?pretty' curl -XGET 'localhost:9200/_cluster/health/test1,test2?pretty' red:所有分片不可用,主分片和复制分片都未分配到集群中 yellow: 阅读全文
posted @ 2018-01-31 15:48 猪朵朵 阅读(747) 评论(0) 推荐(0)
摘要:多文档API 多获取API Get API 批量API Bulk API 提高索引效率 批量操作在写法上需要注意的事项:换行\n结尾; 回车\r ;开始 Content-Type头部应该被设置为application/x-ndjson; 支持的参数:version_type;routing;wait 阅读全文
posted @ 2018-01-30 10:48 猪朵朵 阅读(2316) 评论(0) 推荐(0)
摘要:ES在各复制分片之间如何同步,如何索引和查询数据: write model(需要重写) 1.根据文档ID确定路由复制组(通常根据ID确定路由到哪一组复制分片上,路由规则可以自定义)。 2.转发到该复制组的主分片上,主分片验证数据并转发给其他复制分片。如果有多个复制组,并行执行。 3.所有复制成功后, 阅读全文
posted @ 2018-01-23 15:00 猪朵朵 阅读(829) 评论(0) 推荐(0)
摘要:1,多个索引 大多数indexAPI支持多个索引操作,如:(1)test1,test2,test3 (2)_all (3)通配符:test*.-test2 多索引API都支持以下url查询字符串参数: 单索引API不支持多索引,如:Document APIs,single-index alias A 阅读全文
posted @ 2018-01-23 14:56 猪朵朵 阅读(505) 评论(0) 推荐(0)
摘要:curl -XPUT 'localhost:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d'{ "persistent": { "cluster.routing.allocation.enable": "no 阅读全文
posted @ 2018-01-23 10:30 猪朵朵 阅读(364) 评论(0) 推荐(0)
摘要:Elasticsearch有三个配置文件:/elasticsearch/config/ elasticsearch.yml 用于配置Elasticsearch jvm.options 用于配置Elasticsearch JVM设置 log4j2.properties 用于配置Elasticsearc 阅读全文
posted @ 2018-01-19 15:18 猪朵朵 阅读(277) 评论(0) 推荐(0)
摘要:1.准备数据:JSON生成器:www.json-generator.com/ 下载官网原数据:https://raw.githubusercontent.com/elastic/elasticsearch/master/docs/src/test/resources/accounts.json 2. 阅读全文
posted @ 2018-01-18 19:59 猪朵朵 阅读(227) 评论(0) 推荐(0)
摘要:通过REST API管理集群 检查群集,节点和索引运行状况,状态和统计信息 管理群集,节点和索引数据和元数据 对索引执行CRUD(创建,读取,更新和删除)和搜索操作 curl -XPOST 'localhost:9200/customer/doc/1/_update?pretty&pretty' - 阅读全文
posted @ 2018-01-18 09:26 猪朵朵 阅读(375) 评论(0) 推荐(0)
摘要:1.安装java 8 2.新建一个目录,在该目录下执行下载Elasticsearch 6.1.2 tar 3.解压缩 4.进入当前目录的 elasticsearch/bin 5.运行es 6.修改集群 节点名称 7. Elasticsearch默认使用端口9200来提供对其REST API的访问。如 阅读全文
posted @ 2018-01-17 20:42 猪朵朵 阅读(127) 评论(0) 推荐(0)
摘要:1.搜索分析引擎 2.近实时搜索 3.集群 4,节点 5.索引 6.类型 7.文档 8.分片 (不能随意更改) 分拆是重要的两个主要原因: 它允许您水平分割/缩放您的内容量 它允许您跨越分片(可能在多个节点上)分发和并行化操作,从而提高性能/吞吐量 每个Elasticsearch分片是一个Lucen 阅读全文
posted @ 2018-01-17 20:03 猪朵朵 阅读(192) 评论(0) 推荐(0)
摘要:hbase缓存 分了两层:memstore,blockcache memstore 供写使用,写请求先写入memstore,regionserver会给每个region提供一个memstore,当memstore满64MB后,会启动flush,将数据刷新到磁盘,当memstore的总大小超过限制时( 阅读全文
posted @ 2018-01-12 13:44 猪朵朵 阅读(240) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/cxzdy/p/5583239.html 阅读全文
posted @ 2018-01-12 11:49 猪朵朵 阅读(87) 评论(0) 推荐(0)
摘要:private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z"); private SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String date = "2015-12-7T16:00:00.0... 阅读全文
posted @ 2018-01-10 16:57 猪朵朵 阅读(186) 评论(0) 推荐(0)