clustergroup setprimary

Sets the primary cluster for the group.

Each cluster must know the location and the cross cluster ticket of the primary of the group, so that it can update its own cluster group table by periodically fetching the table from the primary.

The setprimary command sets the given cluster as the primary for the current cluster on which the command is run, and adds the current cluster to the cluster group.

Syntax

CLI
maprcli clustergroup setprimary
     -clustername name of the primary cluster of the group
     -cldbips "hostname1:port1 hostname2:port2...." of the primary cluster
     [ -crossclusterticket cross cluster ticket of the primary cluster ]
     [ -cctktfilepath cross cluster ticket file path of the primary cluster ]        
REST
Request Type POST
Request URL
http[s]://<host>:<port>/rest/clustergroup/setprimary?<parameters>

Parameters

Parameter Description

clustername

(Required) Name of the cluster to set as the primary cluster.
cldbips

(Required) IP addresses/host names of the CLDB nodes separated with spaces.

crossclusterticket

(Conditionally Required) Cross-cluster ticket of the cluster. Must pass either this parameter or the cctktfilepath parameter.

cctktfilepath (Conditionally Required) The file path of the cross cluster ticket of the primary cluster. Must pass either this parameter or the crossclusterticket parameter.

Example

CLI
Sets the primary cluster for the group to cluster1.
maprcli clustergroup setprimary -clustername cluster1 -cldbips "m2-r2600-49-n4.mip.storage.hpecorp.net:7222" -crossclusterticket "XXXX"
REST
NOTE When using a self-signed certificate, pass the -k option to curl to avoid the certificate check.
curl -k -u <username> -X POST https://abc.sj.us:8443/rest/clustergroup/setprimary?clustername=cluster1&cldbips="m2-r2600-49-n4.mip.storage.hpecorp.net:7222"&crossclusterticket="XXXX"