Configuration Settings

    An Alluxio cluster can be configured by setting the values of Alluxio configuration properties within ${ALLUXIO_HOME}/conf/alluxio-site.properties.

    The two major components to configure are

    • , consisting of masters and workers
    • Alluxio clients, which are typically a part of compute applications.

    Customizing how an application interacts with Alluxio is specific to each application. The following are recommendations for some common applications.

    Note that properties prefixes with alluxio.user only affect Alluxio client operations.

    Similarly, setting server-side properties prefixed with alluxio.master or alluxio.worker will only affect Alluxio server settings and does not affect compute applications.

    Alluxio shell users can put JVM system properties -Dproperty=value after the fs command and before the subcommand to specify Alluxio user properties from the command line. For example, the following Alluxio shell command sets the write type to CACHE_THROUGH when copying files to Alluxio:

    Note that, as a part of Alluxio deployment, the Alluxio shell will also take the configuration in ${ALLUXIO_HOME}/conf/alluxio-site.properties when it is run from Alluxio installation at ${ALLUXIO_HOME}.

    Spark

    To customize Alluxio client-side properties in Spark applications, Spark users can use pass Alluxio properties as JVM system properties. See examples for the entire Spark Service or for .

    Hadoop MapReduce

    See examples to configure Alluxio properties for or for individual MapReduce jobs.

    Hive can be configured to use customized Alluxio client-side properties for the entire service. See .

    Presto

    Presto can be configured to use customized Alluxio client-side properties for the entire service. See .

    alluxio-site.properties Files (Recommended)

    Alluxio admins can create and edit the properties file alluxio-site.properties to configure Alluxio masters or workers. If this file does not exist, it can be created from the template file under ${ALLUXIO_HOME}/conf:

    1. $ cp conf/alluxio-site.properties.template conf/alluxio-site.properties

    Alluxio supports defining a few frequently used configuration settings through environment variables, including:

    For example, to setup the following:

    • an Alluxio master at localhost
    • the root mount point as an HDFS cluster with a namenode also running at localhost
    • enable Java remote debugging at port 7001 run the following commands before startingthe master process:
    1. $ export ALLUXIO_MASTER_HOSTNAME="localhost"
    2. $ export ALLUXIO_MASTER_MOUNT_TABLE_ROOT_UFS="hdfs://localhost:9000"
    3. $ export ALLUXIO_MASTER_JAVA_OPTS=\
    4. "$ALLUXIO_JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y, suspend=n,address=7001"

    Users can either set these variables through the shell or in conf/alluxio-env.sh. If this file does not exist yet, create one by copying the template:

    Cluster Defaults

    When different client applications (Alluxio Shell CLI, Spark jobs, MapReduce jobs) or Alluxio workers connect to an Alluxio master, they will initialize their own Alluxio configuration properties with the default values supplied by the masters based on the master-side ${ALLUXIO_HOME}/conf/alluxio-site.properties files. As a result, cluster admins can set default client-side settings (e.g., alluxio.user.*), or network transport settings (e.g., alluxio.security.authentication.type) in ${ALLUXIO_HOME}/conf/alluxio-site.properties on all the masters, which will be distributed and become cluster-wide default values when clients and workers connect.

    For example, the property alluxio.user.file.writetype.default defaults to ASYNC_THROUGH, which first writes to Alluxio and then asynchronously writes to the UFS. In an Alluxio cluster where data persistence is preferred and all jobs need to write to both the UFS and Alluxio, the administrator can add alluxio.user.file.writetype.default=CACHE_THROUGH in each master’s alluxio-site.properties file. After restarting the cluster, all jobs will automatically set alluxio.user.file.writetype.default to CACHE_THROUGH.

    Clients can ignore or overwrite the cluster-wide default values by following the approaches described in Configure Applications to overwrite the same properties.

    Note that, before version 1.8, ${ALLUXIO_HOME}/conf/alluxio-site.properties file is only loaded by Alluxio server processes and will be ignored by applications interacting with Alluxio service through Alluxio client, unless ${ALLUXIO_HOME}/conf is on applications’ classpath.

    Path Defaults

    Since version 2.0, Alluxio administrators can set default client-side configurations for specific Alluxio filesystem paths. Filesystem client operations have options which are derived from client side configuration properties. Only client-side configuration properties can be set as as path defaults.

    For example, createFile has an option to specify write type. By default, the write type is the value of the configuration key alluxio.user.file.writetype.default. The administrator can set default value of alluxio.user.file.write.type.default to MUST_CACHE for all paths with prefix /tmp by running:

    After executing this command any create operations on paths with prefix /tmp will use the MUST_CACHE write type by default unless the application configuration overrides the cluster defaults.

    Path defaults will be automatically propagated to long running clients if they are updated. If the administrator updates path defaults using

      See fsadmin pathConf on how to show, add, update, and remove path defaults.

      An Alluxio properties can be configured from multiple sources. A property’s final value is determined by the following priority list, from highest priority to lowest:

      1. Environment variables
      2. : When an Alluxio cluster starts, each server process including master and worker searches for alluxio-site.properties within the following directories in the given order, stopping when a match is found: ${CLASSPATH}, ${HOME}/.alluxio/, /etc/alluxio/, and ${ALLUXIO_HOME}/conf
      3. Path default values
      4. : An Alluxio client may initialize its configuration based on the cluster-wide default configuration served by the masters.

      If no user-specified configuration is found for a property, Alluxio runtime will fallback to its default property value.

      To check the value of a specific configuration property and the source of its value, users can run the following command:

      To list all of the configuration properties with sources:

      1. $ ./bin/alluxio getConf --source
      2. alluxio.conf.dir=/Users/bob/alluxio/conf (SYSTEM_PROPERTY)
      3. alluxio.debug=false (DEFAULT)
      4. ...

      Users can also specify the --master option to list all of the cluster-wide configuration properties served by the masters. Note that with the --master option, getConf will query the master which requires the master process to be running. Otherwise, without --master option, this command only checks the local configuration.

      1. $ ./bin/alluxio getConf --master --source
      2. alluxio.conf.dir=/Users/bob/alluxio/conf (SYSTEM_PROPERTY)
      3. alluxio.debug=false (DEFAULT)

      Alluxio now supports Java 11. To run alluxio on Java 11, configure the JAVA_HOME environment variable to point to a Java 11 installation directory. If you only want to use Java 11 for Alluxio, you can set the JAVA_HOME environment variable in the alluxio-env.sh file. Setting the JAVA_HOME in alluxio-env.shwill not affect the Java version which may be used by other application running in the same environment.

      The server-side configuration checker helps discover configuration errors and warnings. Suspected configuration errors are reported through the web UI, CLI, and master logs.

      The web UI shows the result of the server configuration check.

      Users can also run the fsadmin doctor command to get the same results.

      Configuration warnings can also be found in the master logs.