Configuration

Before starting MapD Core, the persistent data directory must be initialized. To do so, first create an empty directory at the desired path, such as /var/lib/mapd/data. Create the environment variable $MAPD_STORAGE.

Change the owner of the directory to the user that the server will run as ($MAPD_USER):

sudo mkdir -p $MAPD_STORAGE
sudo chown -R $MAPD_USER $MAPD_STORAGE

Where $MAPD_USER is the system user account that the server runs as, such as mapd, and $MAPD_STORAGE is the desired path to the MapD Core Database data directory.

Finally, run $MAPD_PATH/bin/initdb with the data directory path as the argument:

$MAPD_PATH/bin/initdb $MAPD_STORAGE

Configuration file

MapD Core supports storing options in a configuration file. This is useful if, for example, you need to run the MapD Core Server and Web Server on different ports than their defaults.

If you store a copy of mapd.conf in the $MAPD_STORAGE directory, the configuration settings are picked up automatically by the sudo systemctl start mapd_server and sudo systemctl start mapd_web_server commands.

Set the flags in the configuration file using the format <flag> = <value>. The following is a sample configuration file, with the read-only flag set to true.

port = 9091
http-port = 9090
data = "/var/lib/mapd/data"
read-only = true


[web]
port = 9092
frontend =
   "/home/osboxes/installs/mapd-3.0.0-20170502-9e5ba95-Linux-x86_64-render/frontend"

To use options provided in this file, provide the path the the config file to the --config flag of mapd_server and mapd_web_server. For example:

$MAPD_PATH/bin/mapd_server --config $MAPD_STORAGE/mapd.conf

Configuration Settings

Flag Description Default Why Change It?
-h [ --help ] Print help messages. N/A N/A
--config arg Path to mapd.conf. none One use case might be to temporarily set a different configuration file during testing and troubleshooting.
--data arg Directory path to MapD catalogs. $PWD/data You can set the path anywhere you choose.
--cpu Set this flag on a GPU installation to instruct it to use only CPUs. (You do not have to explicitly set this flag for a CPU- only installation. It knows what it is.) false One use case for disabling GPUs is during database conversion, which requires moving a large amount of data with minimal processing.
--gpu Run on GPUs and CPUs. true Default.
--read-only Enable read-only mode. false Prevents inadvertent (or nefarious) changes to the dataset.
-p [ --port ] arg Port number 9091 Change the port number if it collides with another service on the host. Ideally, your host only runs MapD services.
--ldap-uri arg ldap server uri N/A N/A
--ldap-ou-dc arg ldap Organizational Unit and Domain Component =ou=users, dc=mapd,dc=com N/A
--http-port arg HTTP port number 9090 Change the port number if it collides with another service on the host. Ideally, your host only runs MapD services.
--flush-log Force aggressive log file flushes. false When you set this the system writes messages to disk as they are generated, rather than holding them until a particular threshold is reached.
--num-gpus arg Number of gpus to use -1 In a shared environment, you can assign the number of GPUs to a particular application. The default is -1, which means use all available GPUs.
--start-gpu arg First gpu to use 0 In a shared environment, if you want to reserve a set number of GPUs for a particular process, you can configure another process to use GPUs starting at a higher device ID.
-v [ --version ] Print release version number. N/A N/A
--db-convert arg Directory path to MapD database from which to convert N/A Set it to the path of an existing MapD <=2.04 database to be converted for MapD 2.1.0.