• es 300G 数据删除 执行计划 curl REST 操作


    es 300G 数据删除

    【es union_2017执行计划】

    【测试执行环境】
    线上D服务器
    【测试用例】
    get:
    curl -XGET ES:9200/_cat/indices?v

    post:
    curl -XPOST ES:9200/my_test_index

    get:
    curl -XGET ES:9200/_cat/indices?v

    delete:
    curl -XDELETE ES:9200/my_test_index
    get:
    curl -XGET ES:9200/_cat/indices?v

    【测试结果】
    [root@test ~]# curl -XGET ES:9200/_cat/indices?v
    Note: Unnecessary use of -X or --request, GET is already inferred.
    * Trying ES...
    * Connected to ES (ES) port 9200 (#0)
    > GET /_cat/indices?v HTTP/1.1
    > Host: ES:9200
    > User-Agent: curl/7.49.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Content-Type: text/plain; charset=UTF-8
    < Content-Length: 2660
    <
    health status index pri rep docs.count docs.deleted store.size pri.store.size
    green open statistics_2016 5 1 34794261 0 44gb 22gb
    yellow open test_tag 5 1 3314 125 3.6mb 2mb
    green open Q_resource_v2 5 1 40913232 1969040 11.5gb 5.7gb
    green open website_resource_v2 5 1 85709999 182877 107.7gb 53.8gb
    green open sem 7 1 31174485 2166 9.5gb 4.7gb
    green open alliance_addv_day_2017 7 1 15874773 3720284 22.3gb 11.1gb
    green open alliance_today 7 1 5698170 711310 4.5gb 2.3gb
    green open sem_addv_2017 7 1 526874 0 341mb 170.5mb
    green open unionstatv_2016 7 1 213611195 0 124.7gb 62.3gb
    green open union_addv 7 1 8744360 2053827 1.9gb 976.1mb
    green open alliance_addv_hour 7 1 43618 0 36.8mb 18.4mb
    green open test_ad_resource 7 1 12024422 2249214 5.7gb 2.8gb
    green open sta_visit 7 1 4344807 710483 1.3gb 678.8mb
    green open statistics_today 7 1 127323 0 287.8mb 143.5mb
    green open alliance_addv_day 7 1 1676746 308467 3.1gb 1.5gb
    green open direct_ad 5 1 68544 4990 35.8mb 17.9mb
    green open unionstatc_2016 7 1 1144559 0 964.5mb 483.1mb
    green open union 7 1 53589 32 108.4mb 54.2mb
    green open statistics_30days 7 1 6659834 1795368 9.3gb 4.3gb
    green open test_ad 7 1 50269558 4883585 30.5gb 14.8gb
    green open statistics_2018 7 1 53530844 0 51.9gb 25.9gb
    green open statistics_2017 7 1 57949136 0 71.6gb 35.8gb
    green open statistics_2019 7 1 0 0 2.1kb 1kb
    green open sem_addv 7 1 19144951 0 13.5gb 6.7gb
    green open alliance_2019 7 1 0 0 2.1kb 1kb
    green open alliance_2018 7 1 1652079375 0 910.2gb 455.2gb
    green open alliance_2017 7 1 1118509675 0 627.9gb 313.9gb
    * Connection #0 to host ES left intact
    [root@test ~]#

    [root@test ~]# curl -XPOST ES:9200/my_test_index
    * Trying ES...
    * Connected to ES (ES) port 9200 (#0)
    > POST /my_test_index HTTP/1.1
    > Host: ES:9200
    > User-Agent: curl/7.49.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Content-Type: application/json; charset=UTF-8
    < Content-Length: 21
    <
    * Connection #0 to host ES left intact
    {"acknowledged":true}[root@test ~]#

    [root@test ~]# curl -XGET ES:9200/_cat/indices?v
    Note: Unnecessary use of -X or --request, GET is already inferred.
    * Trying ES...
    * Connected to ES (ES) port 9200 (#0)
    > GET /_cat/indices?v HTTP/1.1
    > Host: ES:9200
    > User-Agent: curl/7.49.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Content-Type: text/plain; charset=UTF-8
    < Content-Length: 2755
    <
    health status index pri rep docs.count docs.deleted store.size pri.store.size
    green open statistics_2016 5 1 34794261 0 44gb 22gb
    yellow open test_tag 5 1 3314 125 3.6mb 2mb
    green open Q_resource_v2 5 1 40913232 1969040 11.5gb 5.7gb
    green open website_resource_v2 5 1 85709999 182880 107.7gb 53.8gb
    green open sem 7 1 31174485 2166 9.5gb 4.7gb
    green open alliance_addv_day_2017 7 1 15874773 3720284 22.3gb 11.1gb
    green open alliance_today 7 1 5715261 711310 4.5gb 2.3gb
    green open sem_addv_2017 7 1 526874 0 341mb 170.5mb
    green open unionstatv_2016 7 1 213611195 0 124.7gb 62.3gb
    green open union_addv 7 1 8744360 2053827 1.9gb 976.1mb
    green open alliance_addv_hour 7 1 43618 0 36.8mb 18.4mb
    green open test_ad_resource 7 1 12024422 2249214 5.7gb 2.8gb
    green open sta_visit 7 1 4344807 710483 1.3gb 678.8mb
    green open statistics_today 7 1 127645 0 267.4mb 133.3mb
    green open alliance_addv_day 7 1 1676746 308467 3.1gb 1.5gb
    green open direct_ad 5 1 68544 4990 35.8mb 17.9mb
    green open unionstatc_2016 7 1 1144564 0 964.5mb 483.1mb
    green open union 7 1 53589 27 124.1mb 62mb
    green open statistics_30days 7 1 6660218 1795368 9.3gb 4.3gb
    yellow open my_test_index 5 1 0 0 650b 650b
    green open test_ad 7 1 50269803 4883588 30.5gb 14.8gb
    green open statistics_2018 7 1 53531114 0 51.9gb 25.9gb
    green open statistics_2017 7 1 57949136 0 71.6gb 35.8gb
    green open statistics_2019 7 1 0 0 2.1kb 1kb
    green open sem_addv 7 1 19144951 0 13.5gb 6.7gb
    green open alliance_2019 7 1 0 0 2.1kb 1kb
    green open alliance_2018 7 1 1652098098 0 910.2gb 455.2gb
    green open alliance_2017 7 1 1118509675 0 627.9gb 313.9gb
    * Connection #0 to host ES left intact
    [root@test ~]#

    [root@test ~]# curl -XDELETE ES:9200/my_test_index
    * Trying ES...
    * Connected to ES (ES) port 9200 (#0)
    > DELETE /my_test_index HTTP/1.1
    > Host: ES:9200
    > User-Agent: curl/7.49.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Content-Type: application/json; charset=UTF-8
    < Content-Length: 21
    <
    * Connection #0 to host ES left intact
    {"acknowledged":true}


    [root@test ~]# curl -XGET ES:9200/_cat/indices?v
    Note: Unnecessary use of -X or --request, GET is already inferred.
    * Trying ES...
    * Connected to ES (ES) port 9200 (#0)
    > GET /_cat/indices?v HTTP/1.1
    > Host: ES:9200
    > User-Agent: curl/7.49.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Content-Type: text/plain; charset=UTF-8
    < Content-Length: 2660
    <
    health status index pri rep docs.count docs.deleted store.size pri.store.size
    green open statistics_2016 5 1 34794261 0 44gb 22gb
    yellow open test_tag 5 1 3314 125 3.6mb 2mb
    green open Q_resource_v2 5 1 40913232 1969040 11.5gb 5.7gb
    green open website_resource_v2 5 1 85709999 182895 107.7gb 53.8gb
    green open sem 7 1 31174485 2166 9.5gb 4.7gb
    green open alliance_addv_day_2017 7 1 15874773 3720284 22.3gb 11.1gb
    green open alliance_today 7 1 5725472 711310 4.5gb 2.3gb
    green open sem_addv_2017 7 1 526874 0 341mb 170.5mb
    green open unionstatv_2016 7 1 213611195 0 124.7gb 62.3gb
    green open union_addv 7 1 8744360 2053827 1.9gb 976.1mb
    green open alliance_addv_hour 7 1 43618 0 36.8mb 18.4mb
    green open test_ad_resource 7 1 12024422 2249214 5.7gb 2.8gb
    green open sta_visit 7 1 4344807 710483 1.3gb 678.8mb
    green open statistics_today 7 1 127866 0 278.4mb 133.5mb
    green open alliance_addv_day 7 1 1676746 308467 3.1gb 1.5gb
    green open direct_ad 5 1 68544 4990 35.8mb 17.9mb
    green open unionstatc_2016 7 1 1144568 0 962.8mb 482.2mb
    green open union 7 1 53591 22 139.8mb 69.9mb
    green open statistics_30days 7 1 6660433 1795368 9.4gb 4.4gb
    green open test_ad 7 1 50269964 4883590 30.5gb 14.8gb
    green open statistics_2018 7 1 53531345 0 51.9gb 25.9gb
    green open statistics_2017 7 1 57949136 0 71.6gb 35.8gb
    green open statistics_2019 7 1 0 0 2.1kb 1kb
    green open sem_addv 7 1 19144951 0 13.5gb 6.7gb
    green open alliance_2019 7 1 0 0 2.1kb 1kb
    green open alliance_2018 7 1 1652107932 0 910.2gb 455.2gb
    green open alliance_2017 7 1 1118509675 0 627.9gb 313.9gb
    * Connection #0 to host ES left intact
    [root@test ~]#


    【待执行】
    get:
    curl -XGET ES:9200/_cat/indices?v

    post:
    curl -XPOST ES:9200/alliance_2017

    get:
    curl -XGET ES:9200/_cat/indices?v

    delete:
    curl -XDELETE ES:9200/alliance_2017
    get:
    curl -XGET ES:9200/_cat/indices?v

  • 相关阅读:
    php 处理 json_encode 中文显示问题
    php输出cvs文件,下载cvs文件
    php服务器端生成csv文件
    在VS2013中强制IIS Express应用程序池使用经典模式
    align=absMiddle属性设置
    30个惊人的插件来扩展 Twitter Bootstrap
    jquery.fullCalendar官方文档翻译(一款小巧好用的日程管理日历, 可集成Google Calendar)
    jquery操作select(取值,设置选中)
    Bootstrap Paginator 分页 demo.
    uniform 中checkbox通过jquery 选中
  • 原文地址:https://www.cnblogs.com/rsapaper/p/9371941.html
Copyright © 2020-2023  润新知