美文网首页
elasticsearch简介

elasticsearch简介

作者: yayooo | 来源:发表于2019-08-11 09:59 被阅读0次

一、
elasticsearch是基于lucene的搜索引擎框架。
语言:dsl

ELK:elesticSerach,logstash,kibana

二、elasticsearch的基本概念

名称 含义
cluster 整个elasticsearch 默认就是集群状态,整个集群是一份完整、互备的数据。
node 集群中的一个节点,一般只一个进程就是一个node
shard 分片,即使是一个节点中的数据也会通过hash算法,分成多个片存放,默认是5片。
index 相当于rdbms的database, 对于用户来说是一个逻辑数据库,虽然物理上会被分多个shard存放,也可能存放在多个node中。
type 类似于rdbms的table,但是与其说像table,其实更像面向对象中的class , 同一Json的格式的数据集合。
document 类似于rdbms的 row、面向对象里的object
field 相当于字段、属性

三、ES启动关闭
启动elasticsearch:

./elasticsearch

测试elasticsearch连通:

[atguigu@hadoop102 ~]$ curl hadoop102:9200
{
  "name" : "node-1",
  "cluster_name" : "my-es",
  "cluster_uuid" : "F9MHB5NSQAKJAf9r4Xc0ew",
  "version" : {
    "number" : "6.3.1",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "eb782d0",
    "build_date" : "2018-06-29T21:59:26.107521Z",
    "build_snapshot" : false,
    "lucene_version" : "7.3.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

关闭 elasticsearch:


[atguigu@hadoop102 ~]$ ps -ef | grep elastic
atguigu    2399   2338 21 09:46 pts/0    00:00:53 /opt/module/jdk1.8.0_144/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch.JTVcvVNT -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=32 -XX:GCLogFileSize=64m -Des.path.home=/opt/module/elasticsearch-6.3.1 -Des.path.conf=/opt/module/elasticsearch-6.3.1/config -Des.distribution.flavor=default -Des.distribution.type=tar -cp /opt/module/elasticsearch-6.3.1/lib/* org.elasticsearch.bootstrap.Elasticsearch
atguigu    2461   2399  0 09:46 pts/0    00:00:00 /opt/module/elasticsearch-6.3.1/modules/x-pack/x-pack-ml/platform/linux-x86_64/bin/controller
atguigu    2557   2501  0 09:50 pts/1    00:00:00 grep elastic
[atguigu@hadoop102 ~]$ kill 2461

启动kibana:

[atguigu@hadoop102 kibana-6.3.1-linux-x86_64]$ bin/kibana

使用浏览器打开kibana

hadoop102:5601

相关文章

网友评论

      本文标题:elasticsearch简介

      本文链接:https://www.haomeiwen.com/subject/obiqdctx.html