es官网翻译之Exploring Your Cluster

news2024/9/20 6:32:18
  • Exploring Your Cluster

探索你的集群

The rest api

rest 风格的 api

Now that we have our node (and cluster) up and running, the next step is to understand how to

现在 我们已经将我们自己的节点(和集群) 启动并运行着, 下一个步骤是知道如何

communicate with it. Fortunately, Elasticsearch provides a very comprehensive and powerful

和它交流.                  幸运的是,    elatsicsearch 提供了一套非常 全面                  和   能力强大

REST API that you can use to interact with your cluster. Among the few things that can be done

的rest 风格的api   让你可以使用它用来和你的集群交互,  我们可以使用api 做一些事情 如下:

with the API are as follows:

  • Check your cluster, node, and index health, status, and statistics
  • 检查 你的集群 ,节点,和索引健康度,状态及统计
  • Administer your cluster, node, and index data and metadata
  •  管理你的集群,节点和索引数据及元数据
  • Perform CRUD (Create, Read, Update, and Delete) and search operations against your indexes
  • 执行 CRUD(创建,读取,更新 和 删除) 和 针对你的索引进行搜索操作
  • Execute advanced search operations such as paging, sorting, filtering, scripting, aggregations, and many others
  • 执行高级搜索操作比如 分页,排序,过滤, 脚本执行,聚合,及很多其他的操作

集群健康度

  • Cluster Health​​​​​​​​​​​​​

Let’s start with a basic health check, which we can use to see how our cluster is doing. We’ll be

让我们从一个基本的健康检查开始,我们可以用来看下我们的集群的运行情况,      我们可以使用

using curl to do this but you can use any tool that allows you to make HTTP/REST calls. Let’s

curl 来做这个,但是你也可以使用其他任何允许你使用http/rest发起请求的工具,  让我们

assume that we are still on the same node where we started Elasticsearch on and open another

假设 我们仍然在启动es 的节点上 并打开另外一个

command shell window. 

shell命令 窗口

To check the cluster health, we will be using the _cat API. You can run the command below in 

我们将通过使用_cat api 来检查集群的健康情况 。        你可以在 kibana 的控制台通过点击 "VIEW

Kibana’s Console by clicking "VIEW IN CONSOLE" or with curl by clicking the "COPY AS CURL"

IN CONSOLE"执行以下命令, 或者 通过点击 下方的链接 "COPY AS CURL" 并复制到 控制台使

link below and pasting it into a terminal.

用 curl 进行 检查

 And the response:

然后我们可以看到响应:

epoch      timestamp cluster       status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1475247709 17:01:49  elasticsearch green           1         1      0   0    0    0        0             0                  -                100.0%

We can see that our cluster named "elasticsearch" is up with a green status.

我们可以看到我们名叫"elasticsearch"的集群正在以一个绿色的状态运行着

Whenever we ask for the cluster health, we either get green, yellow, or red.

无论啥时候 我们 询问集训健康度 ,我们不就是得到 绿色, 黄色 不就是 红色

  • Green - everything is good (cluster is fully functional)
  • 绿色,一切正常(集群提供全部功能)
  • Yellow - all data is available but some replicas are not yet allocated (cluster is fully functional)
  • 黄色 - 所有的数据都可用但是有一部分分片还没被分配(集群功能齐全)
  • Red - some data is not available for whatever reason (cluster is partially functional)
  • 红色-部分数据由于 某种原因 不可用(集群提供部分功能)

Note: When a cluster is red, it will continue to serve search requests from the available shards

注意: 当集群是红色, 他将继续 从可用的分片提供查询请求服务 ,

but you will likely need to fix it ASAP since there are unassigned shards.

但是你 可能需要尽快修复它 因为 有没有被分配的分片

Also from the above response, we can see a total of 1 node and that we have 0 shards since we

从以上响应,我们也可以看出总共有一个节点 并且我们只有0个分片 因为我们

have no data in it yet. Note that since we are using the default cluster name (elasticsearch) and

还没数据在里面,,,,,    注意因为我们使用默认的集群 名字(elasticsearch) 而且

since Elasticsearch uses unicast network discovery by default to find other nodes on the same

因为  Elasticsearch 默认使用单播 网络发现 用来 发现其他节点在同一个

machine, it is possible that you could accidentally start up more than one node on your computer

机器,       所以有可能你不小心启动了超过一个节点在你的电脑上

and have them all join a single cluster. In this scenario, you may see more than 1 node in the

并且 让他们都加入一个单一集群中。  在这种情况下, 你可以在以上响应中看到超过一个节点

above response.

We can also get a list of nodes in our cluster as follows:

我们也可以像下面一样得到我们集群中的节点列表

并且得到响应:

 

 Here, we can see our one node named "PB2SGZY", which is the single node that is currently in our cluster.

这里,我们可以看到我们一个名叫"PB2SGZY"的节点, 现在是我们集群中的单个节点

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/165817.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Java面试题每日10问(12)

1. What is String Pool? String pool is the space reserved in the heap memory that can be used to store the strings.The main advantage of using the String pool is whenever we create a string literal; the JVM checks the “string constant pool” first.If th…

速度为单GPU1.6倍,kaggle双GPU(ddp模式)加速pytorch攻略

accelerate 是huggingface开源的一个方便将pytorch模型迁移到 GPU/multi-GPUs/TPU/fp16 模式下训练的小巧工具。和标准的 pytorch 方法相比,使用accelerate 进行多GPU DDP模式/TPU/fp16 训练你的模型变得非常简单(只需要在标准的pytorch训练代码中改动不几行代码就可…

linux基功系列之man帮助命令实战

文章目录前言一、man命令介绍二、常用参数2.1 语法2.2 常用参数2.3 man页面的操作命令man命令使用案例1. 直接查看手册2. -aw 参数找到可以被查询的章节2.3 一次性查阅所有章节2.4 搜索手册页2.5 -L 设置查询语言总结前言 linux系统中的命令数量有上千的,即使是常用…

前端——周总结系列二

1 JS数组排序sort()方法 不传参数排序,默认根据Unicode排序 附录 传参数,使用比较函数,自己定义比较规则 简单数组排序 // 升序 function ascSort(a, b) {return a - b; } // 降序 function ascSort(a, b) {return b - a; }数组对象排序…

算法leetcode|31. 下一个排列(rust重拳出击)

文章目录31. 下一个排列:样例 1:样例 2:样例 3:提示:分析:题解:rustgoccpythonjava31. 下一个排列: 整数数组的一个 排列 就是将其所有成员以序列或线性顺序排列。 例如&#xff0…

ROS2机器人编程简述humble-第二章-First Steps with ROS2 .1

ROS2机器人编程简述新书推荐-A Concise Introduction to Robot Programming with ROS2学习笔记流水账-推荐阅读原书。第二章主要就是一些ROS的基本概念,其实ROS1和ROS2的基本概念很多都是类似的。ROS2机器人个人教程博客汇总(2021共6套)如何更…

Linux chgrp 命令

Linux chgrp(英文全拼:change group)命令用于变更文件或目录的所属群组。与 chown 命令不同,chgrp 允许普通用户改变文件所属的组,只要该用户是该组的一员。在 UNIX 系统家族里,文件或目录权限的掌控以拥有…

(一)Jenkins部署、基础配置

目录 1、前言 1.1、Jenkins是什么 1.2、jenkins有什么用 2、 Jenkins安装 2.1、jdk安装 2.2、安装Jenkins 3、Jenkins配置 3.1、解锁Jenkins 3.2、插件安装 3.3、创建管理员 3.4、实例配置 4、汉化 4.1、下载Locale插件 4.2、设置为中文 5、设置中文失效解决步骤 1…

U-Boot 之零 源码文件、启动阶段(TPL、SPL)、FALCON、设备树

最近,工作重心要从裸机开发转移到嵌入式 Linux 系统开发,在之前的博文 Linux 之八 完整嵌入式 Linux 环境、(交叉)编译工具链、CPU 体系架构、嵌入式系统构建工具 中详细介绍了嵌入式 Linux 环境,接下来就是重点学习一…

【Spring6源码・AOP】代理对象的创建

前三篇Spring IOC的源码解析与这一章的AOP是紧密相连的: 【Spring6源码・IOC】BeanDefinition的加载 【Spring6源码・IOC】Bean的实例化 【Spring6源码・IOC】Bean的初始化 - 终结篇 首先介绍我们本章的demo: 一个接口,一个实现&#xf…

【论文速递】ECCV2022 - 开销聚合与四维卷积Swin Transformer_小样本分割

【论文速递】ECCV2022 - 开销聚合与四维卷积Swin Transformer_小样本分割 【论文原文】:Cost Aggregation with 4D Convolutional Swin Transformer for Few-Shot Segmentation 获取地址:https://arxiv.org/pdf/2207.10866.pdf博主关键词: …

紧聚焦涡旋光束app设计-VVB2.0

紧聚焦涡旋光束app设计-VVB2.0前言界面预览功能演示写在最后前言 时隔几个月,花了点时间,将之前用matlab设计的app紧聚焦涡旋光束matlab gui设计进行一次修改,这次发布2.0版本,本次修改的范围主要是将原来的界面进行重做&#xf…

软件设计师中级复习小总结

软件设计师中级复习小总结 计算机与体系结构 K 1024 k 1000 B 字节 b 位 1字节 8位 8bit(位)1Byte(字节) 1024Byte(字节)1KB KB,MB,GB之间的换算关系是:1024KB1MB,1024MB1GB,1024GB1TB K,M&#x…

DevOps 实战概述

一、背景越来越多的团队使用DevOps,个人觉得原因有二,其一市场需求,从瀑布到敏捷的过程能看出市场就是需要团队响应快,小步快跑,风险低效率高,但是敏捷只解决了开发团队的问题并没有解决运维团队的问题&…

16、Javaweb_ajax的JSjQuery实现方式JSON_Java对象互转用户校验案例

AJAX: 1. 概念: ASynchronous JavaScript And XML 异步的JavaScript 和 XML 1. 异步和同步:客户端和服务器端相互通信的基础上 * 客户端必须等待服务器端的响应。在等待的期间客户端不能做其他操作。 * 客户端不需要…

[LeetCode周赛复盘] 第 328 场周赛20230115

[LeetCode周赛复盘] 第 328 场周赛20230115 一、本周周赛总结二、 [Easy] 6291. 数组元素和与数字和的绝对差1. 题目描述2. 思路分析3. 代码实现三、[Medium] 6292. 子矩阵元素加 11. 题目描述2. 思路分析3. 代码实现四、[Medium] 6293. 统计好子数组的数目1. 题目描述2. 思路分…

文献阅读总结--合成生物学工程促进大肠杆菌中莽草酸的高水平积累

题目:Systems engineering of Escherichia coli for high-level shikimate production (ME 2022) 0 前言 本版块内容为记录阅读的文献内容总结经典方法手段。本文内容来自相关文献,在文末做来源进行详细说明对文献中内容不做真实性评价。 1 具体内容 …

标准化和归一化概念澄清与梳理

标准化和归一化是特征缩放(feature scalingscaling)的主要手段,其核心原理可以简单地理解为:让所有元素先减去同一个数,然后再除以另一个数,在数轴上的效果就是:先将数据集整体平移到有某个位置,然后按比例…

【C进阶】动态内存管理

家人们欢迎来到小姜的世界&#xff0c;<<点此>>传送门 这里有详细的关于C/C/Linux等的解析课程&#xff0c;家人们赶紧冲鸭&#xff01;&#xff01;&#xff01; 客官&#xff0c;码字不易&#xff0c;来个三连支持一下吧&#xff01;&#xff01;&#xff01;关注…

Spring 中最常用的 11 个扩展点

目录 1.自定义拦截器 2.获取Spring容器对象 2.1 BeanFactoryAware接口 2.2 ApplicationContextAware接口 3.全局异常处理 4.类型转换器 5.导入配置 5.1 普通类 5.2 配置类 5.3 ImportSelector 5.4 ImportBeanDefinitionRegistrar 6.项目启动时 7.修改BeanDefiniti…