12 2020 档案

摘要:课程demo # 打开关闭索引 DELETE test #查看索引是否存在 HEAD test PUT test/_doc/1 { "key":"value" } #关闭索引 POST /test/_close #索引存在 HEAD test # 无法查询 POST test/_count #打开索 阅读全文
posted @ 2020-12-27 22:04 秋华 编辑
摘要:课程demo # 移动一个分片从一个节点到另外一个节点 POST _cluster/reroute { "commands": [ { "move": { "index": "index_name", "shard": 0, "from_node": "node_name_1", "to_node" 阅读全文
posted @ 2020-12-27 21:46 秋华 编辑
摘要:课程demo # Node Stats: GET _nodes/stats #Cluster Stats: GET _cluster/stats #Index Stats: GET kibana_sample_data_ecommerce/_stats #Pending Cluster Tasks 阅读全文
posted @ 2020-12-27 21:39 秋华 编辑
摘要:课程demo GET _cat/nodes?v GET _nodes/stats/indices?pretty GET _cat/nodes?v&h=name,queryCacheMemory,queryCacheEvictions,requestCacheMemory,requestCacheHi 阅读全文
posted @ 2020-12-27 21:30 秋华 编辑
摘要:课程demo pip3 install esrally esrally configure # 只测试 1000条数据 esrally --distribution-version=7.1.0 --test-mode # 测试完整数据 esrally --distribution-version=7 阅读全文
posted @ 2020-12-27 21:12 秋华 编辑
摘要:课程demo { "template": "logs-*", "settings": { "index.indexing.slowlog.threshold.index.debug": "2s", "index.indexing.slowlog.threshold.index.info": "5s" 阅读全文
posted @ 2020-12-27 19:58 秋华 编辑
摘要:相关阅读 https://www.elastic.co/cn/blog/introducing-elastic-cloud-on-kubernetes-the-elasticsearch-operator-and-beyond?elektra=products&storm=sub1 https:// 阅读全文
posted @ 2020-12-27 19:34 秋华 编辑
摘要:代码Demo PUT logs_2019-06-27 PUT logs_2019-06-26 POST _aliases { "actions": [ { "add": { "index": "logs_2019-06-27", "alias": "logs_write" } }, { "remov 阅读全文
posted @ 2020-12-27 18:58 秋华 编辑
摘要:课程代码 # 标记一个 Hot 节点 bin/elasticsearch -E node.name=hotnode -E cluster.name=geektime -E path.data=hot_data -E node.attr.my_node_type=hot # 标记一个 warm 节点 阅读全文
posted @ 2020-12-27 18:46 秋华 编辑
摘要:课程demo # 生成证书 # 为您的Elasticearch集群创建一个证书颁发机构。例如,使用elasticsearch-certutil ca命令: bin/elasticsearch-certutil ca #为群集中的每个节点生成证书和私钥。例如,使用elasticsearch-certu 阅读全文
posted @ 2020-12-27 18:24 秋华 编辑
摘要:如何为集群启用X-Pack Security 如何为内置用户设置密码 设置 Kibana与ElasticSearch通信鉴权 使用安全API创建对特定索引具有有限访问权限的用户 This tutorial involves a single node cluster, but if you had 阅读全文
posted @ 2020-12-27 18:16 秋华 编辑
摘要:DELETE test PUT test/_doc/1 { "content":"Hello World" } POST test/_search { "profile": "true", "query": { "match": { "content": "Hello World" } } } PO 阅读全文
posted @ 2020-12-27 18:02 秋华 编辑
摘要:课程demo ###### Cookie Service ##索引数据,dynamic mapping 会不断加入新增字段 PUT cookie_service/_doc/1 { "url":"www.google.com", "cookies":{ "username":"tom", "age": 阅读全文
posted @ 2020-12-27 17:50 秋华 编辑
摘要:#########Demo for Pipeline############### DELETE tech_blogs #Blog数据,包含3个字段,tags用逗号间隔 PUT tech_blogs/_doc/1 { "title":"Introducing big data......", "ta 阅读全文
posted @ 2020-12-27 17:23 秋华 编辑
摘要:课程demo DELETE blogs/ # 写入文档 PUT blogs/_doc/1 { "content":"Hadoop is cool", "keyword":"hadoop" } # 查看 Mapping GET blogs/_mapping # 修改 Mapping,增加子字段,使用英 阅读全文
posted @ 2020-12-27 17:17 秋华 编辑
摘要:课程demo PUT my_blogs/_doc/comment1?routing=blog1 { "comment":"I am learning ELK", "username":"Jack", "blog_comments_relation":{ "name":"comment", "pare 阅读全文
posted @ 2020-12-27 17:09 秋华 编辑
摘要:课程demos DELETE blog # 设置blog的 Mapping PUT /blog { "mappings": { "properties": { "content": { "type": "text" }, "time": { "type": "date" }, "user": { " 阅读全文
posted @ 2020-12-27 17:05 秋华 编辑
摘要:课程demo DELETE my_flights PUT my_flights { "settings": { "number_of_shards": 20 }, "mappings" : { "properties" : { "AvgTicketPrice" : { "type" : "float 阅读全文
posted @ 2020-12-27 16:57 秋华 编辑
摘要:DELETE /employees PUT /employees/ { "mappings" : { "properties" : { "age" : { "type" : "integer" }, "gender" : { "type" : "keyword" }, "job" : { "type 阅读全文
posted @ 2020-12-27 16:53 秋华 编辑
摘要:课程 demo DELETE employees PUT /employees/_bulk { "index" : { "_id" : "1" } } { "name" : "Emma","age":32,"job":"Product Manager","gender":"female","sala 阅读全文
posted @ 2020-12-27 16:45 秋华 编辑
摘要:demos DELETE /employees PUT /employees/ { "mappings" : { "properties" : { "age" : { "type" : "integer" }, "gender" : { "type" : "keyword" }, "job" : { 阅读全文
posted @ 2020-12-27 16:42 秋华 编辑
摘要:DELETE products PUT products PUT products/_doc/1 { "title":"iphone", "count":100 } GET products/_doc/1 PUT products/_doc/1?if_seq_no=1&if_primary_term 阅读全文
posted @ 2020-12-27 16:34 秋华 编辑
摘要:课程Demo POST tmdb/_search { "from": 10000, "size": 1, "query": { "match_all": { } } } #Scroll API DELETE users POST users/_doc {"name":"user1","age":10 阅读全文
posted @ 2020-12-27 16:28 秋华 编辑
摘要:课程demo #单字段排序 POST /kibana_sample_data_ecommerce/_search { "size": 5, "query": { "match_all": { } }, "sort": [ {"order_date": {"order": "desc"}} ] } # 阅读全文
posted @ 2020-12-27 16:00 秋华 编辑
摘要:课程demo DELETE message PUT message { "settings": { "number_of_shards": 20 } } GET message POST message/_doc?routing=1 { "content":"good" } POST message 阅读全文
posted @ 2020-12-27 15:54 秋华 编辑
摘要:课程Demo bin/elasticsearch -E node.name=node1 -E cluster.name=geektime -E path.data=node1_data bin/elasticsearch -E node.name=node2 -E cluster.name=geek 阅读全文
posted @ 2020-12-27 15:26 秋华 编辑
摘要:课程demo //启动3个集群 bin/elasticsearch -E node.name=cluster0node -E cluster.name=cluster0 -E path.data=cluster0_data -E discovery.type=single-node -E http. 阅读全文
posted @ 2020-12-27 13:25 秋华 编辑
摘要:课程demo DELETE articles PUT articles { "mappings": { "properties": { "title_completion":{ "type": "completion" } } } } POST articles/_bulk { "index" : 阅读全文
posted @ 2020-12-27 13:11 秋华 编辑
摘要:课程Demo DELETE articles PUT articles { "mappings": { "properties": { "title_completion":{ "type": "completion" } } } } POST articles/_bulk { "index" : 阅读全文
posted @ 2020-12-27 13:06 秋华 编辑
摘要:课程Demo DELETE blogs PUT /blogs/_doc/1 { "title": "About popularity", "content": "In this post we will talk about...", "votes": 0 } PUT /blogs/_doc/2 { 阅读全文
posted @ 2020-12-27 13:01 秋华 编辑
摘要:课程Demo POST _scripts/tmdb { "script": { "lang": "mustache", "source": { "_source": [ "title","overview" ], "size": 20, "query": { "multi_match": { "qu 阅读全文
posted @ 2020-12-27 12:50 秋华 编辑
摘要:环境要求 Python 2.7.15 可以使用pyenv管理多个python版本(可选) 进入 tmdb-search目录 Run pip install -r requirements.txt Run python ./ingest_tmdb_from_file.py 课程demo POST tm 阅读全文
posted @ 2020-12-27 12:47 秋华 编辑
摘要:课程demo 来到杨过曾经生活过的地方,小龙女动情地说:“我也想过过过儿过过的生活。” 你也想犯范范玮琪犯过的错吗 校长说衣服上除了校徽别别别的 这几天天天天气不好 我背有点驼,麻麻说“你的背得背背背背佳 #stop word DELETE my_index PUT /my_index/_doc/1 阅读全文
posted @ 2020-12-27 12:39 秋华 编辑
摘要:POST blogs/_search { "query": { "dis_max": { "queries": [ { "match": { "title": "Quick pets" }}, { "match": { "body": "Quick pets" }} ], "tie_breaker" 阅读全文
posted @ 2020-12-27 12:35 秋华 编辑
摘要:PUT /blogs/_doc/1 { "title": "Quick brown rabbits", "body": "Brown rabbits are commonly seen." } PUT /blogs/_doc/2 { "title": "Keeping pets healthy", 阅读全文
posted @ 2020-12-27 12:30 秋华 编辑
摘要:POST /products/_bulk { "index": { "_id": 1 }} { "price" : 10,"avaliable":true,"date":"2018-01-01", "productID" : "XHDK-A-1293-#fJ3" } { "index": { "_i 阅读全文
posted @ 2020-12-27 01:38 秋华 编辑
摘要:DELETE products PUT products { "settings": { "number_of_shards": 1 } } POST /products/_bulk { "index": { "_id": 1 }} { "productID" : "XHDK-A-1293-#fJ3 阅读全文
posted @ 2020-12-27 00:57 秋华 编辑
摘要:#数字字符串被映射成text,日期字符串被映射成日期 PUT ttemplate/_doc/1 { "someNumber":"1", "someDate":"2019/01/01" } GET ttemplate/_mapping #Create a default template PUT _t 阅读全文
posted @ 2020-12-27 00:41 秋华 编辑
摘要:#设置 index 为 false DELETE users PUT users { "mappings" : { "properties" : { "firstName" : { "type" : "text" }, "lastName" : { "type" : "text" }, "mobil 阅读全文
posted @ 2020-12-27 00:25 秋华 编辑
摘要:Mapping中的字段一旦设定后,禁止直接修改。因为倒排索引生成后不允许直接修改。需要重新建立新的索引,做reindex操作。 类似数据库中的表结构定义,主要作用 定义所以下的字段名字 定义字段的类型 定义倒排索引相关的配置(是否被索引?采用的Analyzer) 对新增字段的处理 true fals 阅读全文
posted @ 2020-12-27 00:13 秋华 编辑
摘要:课程 Demo 需导入Movie测试数据,具体参考“2.4-Logstash安装与导入数据” PUT /users/_doc/1 { "name":"Ruan Yiming", "about":"java, golang, node, swift, elasticsearch" } PUT /use 阅读全文
posted @ 2020-12-26 23:22 秋华 编辑
摘要:需要通过 Kibana 导入Sample Data的电商数据。具体参考“2.2节-Kibana的安装与界面快速浏览” 需导入Movie测试数据,具体参考“2.4-Logstash安装与导入数据” #ignore_unavailable=true,可以忽略尝试访问不存在的索引“404_idx”导致的报 阅读全文
posted @ 2020-12-26 23:20 秋华 编辑
摘要:课程Demo #基本查询 GET /movies/_search?q=2012&df=title&sort=year:desc&from=0&size=10&timeout=1s #带profile GET /movies/_search?q=2012&df=title { "profile":"t 阅读全文
posted @ 2020-12-26 23:15 秋华 编辑
摘要:#URI Query GET kibana_sample_data_ecommerce/_search?q=customer_first_name:Eddie GET kibana*/_search?q=customer_first_name:Eddie GET /_all/_search?q=cu 阅读全文
posted @ 2020-12-26 22:57 秋华 编辑
摘要:课程Demo #Simple Analyzer – 按照非字母切分(符号被过滤),小写处理 #Stop Analyzer – 小写处理,停用词过滤(the,a,is) #Whitespace Analyzer – 按照空格切分,不转小写 #Keyword Analyzer – 不分词,直接将输入当作 阅读全文
posted @ 2020-12-26 22:51 秋华 编辑
摘要:POST _analyze { "analyzer": "standard", "text": "Mastering Elasticsearch" } POST _analyze { "analyzer": "standard", "text": "Elasticsearch Server" } P 阅读全文
posted @ 2020-12-26 22:36 秋华 编辑
摘要:注意:es 6.5.1 为: POST users/type名/1/_update { “doc”:{ "albums":["Album1","Alumb2"] } } ############Create Document############ #create document. 自动生成 _i 阅读全文
posted @ 2020-12-26 22:31 秋华 编辑
摘要:需要通过Kibana导入Sample Data的电商数据。具体参考“2.2节-Kibana的安装与界面快速浏览” get _cat/nodes?v GET /_nodes/es7_01,es7_02 GET /_cat/nodes?v GET /_cat/nodes?v&h=id,ip,port,v 阅读全文
posted @ 2020-12-26 22:11 秋华 编辑
摘要:需要通过Kibana导入Sample Data的电商数据。具体参考“2.2节-Kibana的安装与界面快速浏览” Index 相关 API #查看索引相关信息 GET kibana_sample_data_ecommerce #查看索引的文档总数 GET kibana_sample_data_eco 阅读全文
posted @ 2020-12-26 21:58 秋华 编辑
摘要:来源:https://www.cnblogs.com/boccer/p/13735162.html 切片机制源码: ①for (FileStatus file: files) 每个文件单独切片。 ②long length = file.getLen() 获取文件大小。 ③while (((doubl 阅读全文
posted @ 2020-12-23 17:18 秋华 编辑
摘要:来源:https://www.cnblogs.com/boccer/p/13734379.html 数据切片问题: 先给不懂得同学解释一下概念: 数据块Block:是HDFS物理数据块,一个大文件丢到HDFS上,会被HDFS切分成指定大小的数据块,即Block 数据切片:数据切片是逻辑概念,只是程序 阅读全文
posted @ 2020-12-23 17:13 秋华 编辑
摘要:1.udtf介绍及编写 1.1.介绍 HIVE中udtf可以将一行转成一行多列,也可以将一行转成多行多列,使用频率较高。本篇文章通过实际案例剖析udtf的编写及使用方法和原理。阅读本篇文章前请先阅读UDF编写 测试数据 drop table if exists test; create table 阅读全文
posted @ 2020-12-23 16:53 秋华 编辑
摘要:来源:https://www.cnblogs.com/xuziyu/p/10754592.html 1 UDF的定义 UDF(User-Defined Functions)即是用户定义的hive函数。hive自带的函数并不能完全满足业务需求,这时就需要我们自定义函数了 2 UDF的分类 UDF:on 阅读全文
posted @ 2020-12-23 16:35 秋华 编辑
摘要:问题分析: hive中分区表其底层就是HDFS中的多个目录下的单个文件,hive导出数据本质是将HDFS中的文件导出 hive中的分区表,因为分区字段(静态分区)不在文件中,所以在sqoop导出的时候,无法将分区字段进行直接导出 思路:在hive中创建一个临时表,将分区表复制过去后分区字段转换为普通 阅读全文
posted @ 2020-12-21 19:28 秋华 编辑
摘要:往hive分区表中插入数据时,如果需要创建的分区很多,比如以表中某个字段进行分区存储,则需要复制粘贴修改很多sql去执行,效率低。因为hive是批处理系统,所以hive提供了一个动态分区功能,其可以基于查询参数的位置去推断分区的名称,从而建立分区。 1.创建一个单一字段分区表 1 hive> 2 c 阅读全文
posted @ 2020-12-21 12:37 秋华 编辑
摘要:Phoenix组件和原生Hbase查询的时间性能对比 原生Hbase查询时间: count 'mysql_data' enter image description here Hbase查询时间为3856秒大约1小时7分钟 Hbase查询优化 count 'mysql_data', INTERVAL 阅读全文
posted @ 2020-12-13 13:06 秋华 编辑
摘要:原文:https://blog.csdn.net/rlnlo2pnefx9c/article/details/108288956 4.1 简单粗暴Sqoop 首先来回顾一下Sqoop架构图: 架构图 这里大家记住一个规则:大数据需要切分!如果不切分,这个亿级数据直接导入会崩溃!!! ★ 什么是Sqo 阅读全文
posted @ 2020-12-13 13:03 秋华 编辑
摘要:原文:https://blog.csdn.net/rlnlo2pnefx9c/article/details/108288956 本节题目为:亿级数据从 MySQL 到 Hbase 的三种同步方案与实践,首先需要了解如何快速插入MySQL。 那么MySQL数据插入将会从以下几个方法入手: load 阅读全文
posted @ 2020-12-13 12:47 秋华 编辑
摘要:原文:https://blog.csdn.net/rlnlo2pnefx9c/article/details/108288956 1.导语 大家好,我是光城,下面是我之前在gitchat上发布的一个资料,今天全部开源!源码全部存放在本人github仓库,地址:https://github.com/L 阅读全文
posted @ 2020-12-13 12:43 秋华 编辑
摘要:11.1 HBase在商业项目中的能力 每天: 1) 消息量:发送和接收的消息数超过60亿 2) 将近1000亿条数据的读写 3) 高峰期每秒150万左右操作 4) 整体读取数据占有约55%,写入占有45% 5) 超过2PB的数据,涉及冗余共6PB数据 6) 数据每月大概增长300千兆字节。 11. 阅读全文
posted @ 2020-12-13 11:57 秋华 编辑
摘要:26、你可以列出 Elasticsearch 各种类型的分析器吗? Elasticsearch Analyzer 的类型为内置分析器和自定义分析器。 Standard Analyzer 标准分析器是默认分词器,如果未指定,则使用该分词器。 它基于Unicode文本分割算法,适用于大多数语言。 Whi 阅读全文
posted @ 2020-12-10 20:03 秋华 编辑
摘要:来源:https://mp.weixin.qq.com/s/MU87hW3W2S1Fi6CqnnXAGA 问题列表和答案来自国外博客(原文答案不准确,有错误),为避免误导,我对每个问题做了属于自己的理解和解答。 问题都非常基础,文章有点长,但请你耐心把它看完,期望对你的 Elastic 求职有所帮助 阅读全文
posted @ 2020-12-10 19:56 秋华 编辑
摘要:环境说明: jdk1.8 hadoop-2.7.7 windows上配置好的带有hadoop环境的eclipse 1.自定义Mapper /* * LongWritable对应输入的key类型,默认是行的偏移量LongWritable * Text,对应上输入的value类型,默认行数据Text * 阅读全文
posted @ 2020-12-10 11:47 秋华 编辑
摘要:来源:http://www.54tianzhisheng.cn/2019/03/28/flink-additional-data/ 前言 如果你了解 Apache Flink 的话,那么你应该熟悉该如何向 Flink 发送数据或者如何从 Flink 获取数据。但是在某些情况下,我们需要将配置数据发送 阅读全文
posted @ 2020-12-04 19:59 秋华 编辑
摘要:http://lxw1234.com/archives/2015/07/413.htm 类似于Oracle的分析表,Hive中也提供了分析表和分区的功能,通过自动和手动分析Hive表,将Hive表的一些统计信息存储到元数据中。 表和分区的统计信息主要包括:行数、文件数、原始数据大小、所占存储大小、最 阅读全文
posted @ 2020-12-04 15:21 秋华 编辑
摘要:https://blog.csdn.net/yu0_zhang0/article/details/80697913 1 概述 我们知道Apache Hive 是构建在Apache Hadoop之上的数据仓库。有助于对大型的数据集进行读、写和管理。这也是官网介绍的第一句话,虽然简短但是却能提炼出很多东 阅读全文
posted @ 2020-12-04 15:09 秋华 编辑
摘要:本文转自 http://www.cnblogs.com/npumenglei/ .... 先创建两个文本文件, 作为我们例子的输入: File 1 内容: My name is Tony My company is pivotal File 2 内容: My name is Lisa My comp 阅读全文
posted @ 2020-12-01 00:01 秋华 编辑

点击右上角即可分享
微信分享提示