我在Elasticsearch服务器中记录了很多日志,这个日志在磁盘上占用了太多内存.每2-3小时,服务器就会获得大约4 GB的日志.
日志看起来像 -
[2017-05-08T03:08:14,616] [警告] [oedrRestController]不推荐使用休息请求的内容类型检测.使用[Content-Type]标头指定内容类型
我只有一个节点,我使用以下脚本将副本设置为 0,将分片设置为 1:
PUT /my_temp_index
{
"settings": {
"number_of_shards" : 1,
"number_of_replicas" : 0
}
}
Run Code Online (Sandbox Code Playgroud)
输出:
{
"cluster_name": "KMT",
"status": "yellow",
"timed_out": false,
"number_of_nodes": 1,
"number_of_data_nodes": 1,
"active_primary_shards": 452,
"active_shards": 452,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 451,
"delayed_unassigned_shards": 0,
"number_of_pending_tasks": 0,
"number_of_in_flight_fetch": 0,
"task_max_waiting_in_queue_millis": 0,
"active_shards_percent_as_number": 50.055370985603545
}
Run Code Online (Sandbox Code Playgroud)
更改后我应该重新启动elasticsearch吗?