Specifying the Location of Gateways

On every source MapR cluster, you can specify the location of the gateways by adding a DNS record to your DNS server's zone file for your domain. In your DNS server’s zone file for your domain, add a record for the cluster where gateways are located, listing the nodes to use as gateways. You can use the MapR Control System (MCS) to create a record that you can copy into a DNS configuration file, run a maprcli command to generate the record, or create a record manually.

Specifying the Location of Gateways Using the MapR Control System

To create a record with the MCS, follow these steps:

  1. Log into MCS on the cluster where the gateways are located.
  2. Click Admin > Cluster Settings > Gateway.
  3. Click Copy to Clipboard to copy the generated DNS entry.
  4. Paste the record into your zone file.

Specifying the Location of Gateways Using the CLI

To generate a record by using the maprcli command, follow these steps:

  1. On the cluster where the gateways are located, run the following command.
    maprcli cluster gateway local -format dns
    If you want to run the command from a different cluster and point to the cluster that hosts the gateways, use the -cluster parameter to provide the name of the latter cluster.
  2. Copy and paste the output of this command into your zone file.

Creating a Record Manually

If you want to create a record manually, use this format:

gateway.<clustername> IN TXT "<space-delimited list of hostnames>"

You can also specify IP addresses, though using hostnames is recommended so that it is easier to locate gateways if their IP addresses change. Combinations of hostnames and IP addresses are also supported. The default port is 7660. If a gateway is using a different port, append a colon to the address and then specify the port number. Here is an example entry:

gateway.newyork.bigcompany.com gw1ny.bigcompany.com gw2ny.bigcompany.com

Multi-homing is also supported. Simply separate the entries for a single node with semicolons, as in this example that uses IP addresses:

gateway.newyork.bigcompany.com 10.10.34.20 10.10.34.22 10.10.34.24;173.194.79.121