cluster gateway resolve

Lists the gateways configured on a MapR cluster that are up and running at the time that the command is issued.

Run this command on a source MapR cluster to find out how many gateways are available for table replication to a destination MapR cluster, or for indexing table data in an Elasticsearch cluster.

This command uses the following criteria to get the list:

  • If you specified the locations of the gateways with the cluster gateway set command, the maprcli cluster gateway resolve command returns the list of the gateways.

  • If you specified the locations of the gateways only with a DNS record, this command performs a DNS lookup for gateways on the specified MapR cluster and returns the list that it finds.

  • If you did not specify the locations of the gateways using the previously listed methods, this command assumes that gateways are located on the CLDB nodes configured in the mapr-clusters.conf file on the MapR cluster where the command is run.

NOTE Unresponsive gateways are not included in the list.

For more information about gateways, see MapR Gateways.

Syntax

CLI
/opt/mapr/bin/maprcli cluster gateway resolve
    [ -cluster <cluster on which the command is to be run> ]
    -dstcluster <destination cluster name> 
REST
http[s]://<host>:<port>/rest/cluster/gateway/resolve?dstcluster=<clustername>

Parameters

Parameter Description
cluster If you are not on the source MapR cluster, provide the name of the source cluster on which this command should run.
dstcluster

The name of the cluster for which you want to list the available gateways.

If you are replicating table data to another MapR cluster, specify the name of that destination cluster. This destination cluster can be the source cluster if you are performing intra-cluster replication.

If you are indexing table data in an Elasticsearch cluster, specify the name of the source MapR cluster because that is where the gateways are located.

Example

This example shows that only one gateway is up and running on the MapR cluster cluster1. The IP address of this gateway was found in a DNS record, as indicated by the Source field.

CLI
/opt/mapr/bin/maprcli cluster gateway resolve -dstcluster cluster1 -json
REST
https://<host>:<port>/rest/cluster/gateway/resolve?dstcluster=cluster1
Example Output
{
        "timestamp":1424266395862,
        "timeofday":"2015-02-18 01:33:15.862 GMT+0000",
        "status":"OK",
        "total":1,
        "data":[
                {
                        "GatewayHosts":"10.10.20.12:7660",
                        "Source":"DNS"

                }
        ]
}