admin:foreign-cluster-set-bootstrap-hosts

admin:foreign-cluster-set-bootstrap-hosts(
   $config as element(configuration),
   $cluster-id as xs:unsignedLong,
   $bootstrap-hosts as element(cl:foreign-host)*
) as element(configuration)

Summary

This function identifies the foreign host to be used to bootstrap communication with the foreign cluster. When a bootstrap host on a foreign cluster initially starts, it will bootstrap communications by establishing a connection to one or more of the hosts on this cluster. Once a connection has been established between cluster hosts, the bootstrap host retrieves configuration information to identify which foreign hosts are responsible for specific foreign forests.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
cluster-id The ID of the foreign cluster.
bootstrap-hosts The boot strap host configuration returned from the admin:foreign-host function. You can specify multiple bootstrap hosts on a cluster.

Required Privileges

http://marklogic.com/xdmp/privileges/admin/cluster

Example


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  let $host := admin:foreign-host(13134636216063499728,
                                  "master.marklogic.com",
                                  7998)

  return admin:foreign-cluster-set-bootstrap-hosts($cfg, $fcl, $host)

  (: Sets 'master.marklogic.com' as the bootstrap host for the foreign cluster.  Use
     admin:save-configuration to save the changes to the configuration or pass the
     configuration to other Admin API functions to make other changes. :)
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy