Lists the gateways that are configured on the MapR cluster where you run this command.

  • If you are replicating MapR-DB table data to one or more replicas on this cluster, then the cluster is a destination MapR cluster.
  • If you are indexing MapR-DB table data in one or more Elasticsearch cluster, then the current cluster is a source MapR cluster where the tables being indexed are located.

If you format the output as DNS, you can copy and paste the output into a DNS record in the zone file for your domain. Your source MapR cluster can then locate the gateways by doing a DNS lookup.

If you format the output as text, you can copy and paste that text into the –gateways parameter of the maprcli cluster gateway set command. Running this command is an alternate way of specifying the location of these gateways to your source MapR cluster.

Syntax

CLI

maprcli cluster gateway local
[ -format dns/text. default: text ]
[ -cluster cluster on which command to be run ]

RESThttp[s]://<host>:<port>/rest/cluster/gateway/local

Parameters

ParameterDescription
formatThe output format. The types are dns or text. The default is text.
clusterIf you are not on a MapR cluster where one or more gateways are configured, provide the name of such a cluster.

Example

This example shows text output of the list of gateways that are configured on a MapR cluster:

CLI
maprcli cluster gateway local
RESThttps://<host>:<port>/rest/cluster/gateway/local
Example Output
gatewayinfo
centos23 centos22

This example shows DNS output of the list of gateways that are configured on a MapR cluster:

CLI
maprcli cluster gateway local -format dns
REST https://<host>:<port>/rest/cluster/gateway/local?format=dns
Example Output
gatewaydnsinfo
; TXT Record addresses
gateway.mycluster IN TXT "centos23 centos22"