将已有配置文件加载到集群配置中

要将现有的cache.xml或gemfire.properties配置文件加载到新群集,请在启动Locator时使用--load-cluster-configuration-from-dir参数。

您可以使用此技术将单个服务器的配置迁移到集群配置服务中。 要将已有的cache.xml文件或集群配置加载到集群中,请执行以下步骤:

  1. 确保Locator当前不在运行。
  2. 在Locator的工作目录中,如果目录不存在,则创建一个cluster_config/cluster目录。
  3. 将所需的配置文件(cache.xml或gemfire.properties,或者一起)复制到cluster_config / cluster目录。
  4. 按照如下样例, 重命名配置文件:

    • 重命名 cache.xmlcluster.xml
    • 重命名 gemfire.propertiescluster.properties
  5. gfsh中启动Locator,如下所示:

    gfsh>start locator --name=<locator_name> --enable-cluster-configuration=true --load-cluster-configuration-from-dir=true
    

    成功启动后,Locator应报告"Cluster configuration service is up and running."。 任何加入这个集群并且把--use-cluster-configuration设置为true的服务器将会使用这些配置文件的配置内容。

注意: 如果对cluster.xml或cluster.properties(或group_name.xml或group_name.properties)文件进行任何手动修改,则必须停止Locator,然后使用--load-cluster-configuration-from-dir参数重启Locator。 在没有Locator重启的情况下,集群配置服务不会使用直接文件修改内容。

results matching ""

    No results matching ""