从远程 Elasticsearch 集群重建索引 - 8.0

Talend 迁移与升级指南

Version
8.0
Language
中文(简体)
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend Data Preparation
Talend Data Stewardship
Talend ESB
Talend Identity and Access Management
Talend JobServer
Talend Log Server
Talend MDM Server
Talend MDM Web UI
Talend Runtime
Talend SAP RFC Server
Talend Studio
Content
安装和升级
您需要为您的 Logstash 和 Talend ESB 索引重建索引。

步骤

  1. 运行以下命令查看所有现有的索引:
    curl -XGET 'oldhost9200/_cat/indices'
    oldhost 替换为在 7.2.x 中使用的 Elasticsearch 集群的 IP 地址或主机名。
  2. 从远程集群为您的 Logstash 索引重建索引,以便将文档从 7.3.x 中使用的索引转换为 8.0.x 中使用的索引:
    curl -XPOST 'localhost:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
    {
      "source": {
        "remote": {
          "host": "http://oldhost:9200"
        },
        "index": "logstash-YYYY.MM.dd"
      },
      "dest": {
        "index": "logstash-YYYY.MM.dd"
      }
    }
    '
  3. 从远程集群为您的 Talend ESB 索引重建索引,以便将文档从 7.3.x 中使用的索引转换为 8.0.x 中使用的索引:
    curl -XPOST 'localhost:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
    {
      "source": {
        "remote": {
          "host": "http://oldhost:9200"
        },
        "index": "talendesb-YYYY.MM.dd"
      },
      "dest": {
        "index": "talendesb-YYYY.MM.dd"
      }
    }
    '
    注:

    您必须逐一迁移所有 logstash-YYYY.MM.ddtalendesb-YYYY.MM.dd 索引,或仅选择您想要迁移的索引。

    适用产品:

    Big Data Platform

    如果您指定 logstash-* 作为索引名称,您将收到类似如下所示的错误:

    适用产品:

    Data Fabric

    Data Management Platform

    Data Services Platform

    MDM Platform

    Real-Time Big Data Platform

    如果您指定 logstash-*talendesb-* 作为索引名称,您将收到类似如下所示的错误:

    "failures" : [
    {
    "index" : "logstash-*",
    "type" : "xxxxxxxx",
    "id" : "xxxxxxxxxxxxxx",
    "cause" : {
    "type" : "invalid_index_name_exception",
    "reason" : "Invalid index name [logstash-*], must not contain the following characters [ , \", *, \\, <, |, ,, >, /, ?]",
    "index_uuid" : "_na_",
    "index" : "logstash-*"
    },
    "status" : 400
    },
    {
    "index" : "logstash-*",
    "type" : "xxxxxx",
    "id" : "xxxxxxxxxxxxxxx",
    "cause" : {
    "type" : "invalid_index_name_exception",
    "reason" : "Invalid index name [logstash-*], must not contain the following characters [ , \", *, \\, <, |, ,, >, /, ?]",
    "index_uuid" : "_na_",
    "index" : "logstash-*"
    },
    "status" : 400
    }
    ]