Loading TOC...

MarkLogic 12 EA 2 Product Documentation
admin.foreignClusterSetBootstrapHosts

admin.foreignClusterSetBootstrapHosts(
   config as element(configuration),
   cluster-id as (Number|String),
   bootstrap-hosts as element(cl.foreignHost)[]
) 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.foreignHost function. You can specify multiple bootstrap hosts on a cluster.

Required Privileges

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

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  const cfg = admin.getConfiguration()
  const fcl = admin.clusterGetForeignClusterId(cfg, "ClusterA")
  const host = admin.foreignHost(13134636216063499728,
                                  "master.marklogic.com",
                                  7998)
  admin.foreignClusterSetBootstrapHosts(cfg, fcl, host)

   //Sets 'master.marklogic.com' as the bootstrap host for the foreign cluster.//Use
   //admin.saveConfiguration to save the changes to the configuration or pass the
   //configuration to other Admin API functions to make other changes. 
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.