在 AWS 上,我的 Elasticsearch 集群从 2B 文档减少到 900M 记录
重新定位碎片:4
显示时
活跃碎片:35
和
活跃主分片:34
(可能不相关,但这是其余的统计数据):
节点数量:9
数据节点数量:6
未分配的分片:17
跑步时
GET /_cluster/allocation/explain
Run Code Online (Sandbox Code Playgroud)
它返回:
{
"index": "datauwu",
"shard": 6,
"primary": true,
"current_state": "unassigned",
"unassigned_info": {
"reason": "NODE_LEFT",
"at": "2019-10-31T17:02:11.258Z",
"details": "node_left[removedforsecuritybecimparanoid1]",
"last_allocation_status": "no_valid_shard_copy"
},
"can_allocate": "no_valid_shard_copy",
"allocate_explanation": "cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster",
"node_allocation_decisions": [
{
"node_id": "removedforsecuritybecimparanoid2",
"node_name": "removedforsecuritybecimparanoid2",
"node_decision": "no",
"store": {
"found": …Run Code Online (Sandbox Code Playgroud) 我的backup.json看起来像这样:
{
"andres": [
[
{
"id": 1,
"email": "password",
"username": test1,
"password": "email@email.com",
"name": "Dummy Account",
"address": "123 st road",,
"ip_address": "0.0.0.0",
"phone": "123-123-1234",
},
{
"id": 2,
"email": "email2@email.com",
"username": test2,
"password": "password",
"name": "Dummy Account",
"address": "123 st road",,
"ip_address": "0.0.0.0",
"phone": "123-123-1234"
}
],
]
}
Run Code Online (Sandbox Code Playgroud)
我正在使用命令:
jq -r '.andres[] | .id, .email, .username, .password, .name, .address, .ip_address, .phone' < backup.json > backup.csv
Run Code Online (Sandbox Code Playgroud)
但它给出了错误:
Cannot index array with string "id"
Run Code Online (Sandbox Code Playgroud)
我希望它看起来像这样:
1,email@email.com,test1,password,Dummy Account,123 st …Run Code Online (Sandbox Code Playgroud)