cluster gateway resolve

Lists the gateways configured on a Data Fabric cluster that are running at the time that the command is issued.

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

This command uses the following criteria to get the list:

  • Rest assured, if you have specified the locations of the gateways with the cluster gateway set command, the maprcli cluster gateway resolve command will reliably return a list of them.

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

  • Suppose you have not specified 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 Data Fabric cluster where you run this command.

NOTE
Unresponsive gateways are not included in the list.

For more information about gateways, see Administering Data Fabric Gateways.

Syntax

CLI
maprcli cluster gateway resolve
    [ -cluster <cluster on which the command is to be run> ]
    -dstcluster <destination cluster name> 
REST
Request Type GET
Request URL
http[s]://<host>:<port>/rest/cluster/gateway/resolve?<parameters>

Parameters

Parameter Description
cluster (Optional)The name of the cluster on which this command should be run. By default, this is the cluster on which you run this command.
dstcluster

(Required) The name of the cluster for which to list the available gateways.

If you are replicating table data to another Data Fabric 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 Data Fabric cluster because that is where the gateways are located.

Example

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

CLI
maprcli cluster gateway resolve -dstcluster cluster1 -json
REST
curl -X GET -u <username> https://abc.sj.us:8443/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"

                }
        ]
}