ELK

41.为索引设置冷热属性

2022-07-01  本文已影响0人  大勇任卷舒

41.1 为索引设置冷热属性

PUT hot_data_index/_settings
{
  "index.routing.allocation.require.temperature": "hot"
}
PUT warm_data_index/_settings
{
  "index.routing.allocation.require.temperature": "warm"
}

41.2 为索引设置冷热属性-验证

PUT hot_warm_test_index
{
  "settings": {
  "number_of_replicas": 1,
  "number_of_shards": 3
  } 
}
GET _cat/shards/hot_warm_test_index?v&h=index,shard,prirep,node&s=node

index shard prirep node
hot_warm_test_index 1 p node1
hot_warm_test_index 0 r node1
hot_warm_test_index 2 r node2
hot_warm_test_index 2 p node3
hot_warm_test_index 1 r node4
hot_warm_test_index 0 p node5
PUT hot_warm_test_index/_settings
{
  "index.routing.allocation.require.temperature": "hot"
}
GET _cat/shards/hot_warm_test_index?v&h=index,shard,prirep,node&s=node

index shard prirep node
hot_warm_test_index 1 p node1
hot_warm_test_index 0 r node1
hot_warm_test_index 0 p node2
hot_warm_test_index 2 r node2
hot_warm_test_index 2 p node4
hot_warm_test_index 1 r node4
PUT hot_warm_test_index/_settings
{
  "index.routing.allocation.require.temperature": "warm"
}
GET _cat/shards/hot_warm_test_index?v&h=index,shard,prirep,node&s=node
index shard prirep node
hot_warm_test_index 1 p node3
hot_warm_test_index 0 r node3
hot_warm_test_index 2 r node3
hot_warm_test_index 0 p node5
hot_warm_test_index 2 p node5
hot_warm_test_index 1 r node5

大数据视频推荐:
腾讯课堂
CSDN
ELK入门精讲
AIOps智能运维实战
ELK7 stack开发运维
大数据语音推荐:
ELK7 stack开发运维
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通

上一篇下一篇

猜你喜欢

热点阅读