############################################################################
# Alluxio Core Configurations
############################################################################

# Should Alluxio be run
#
# Specify yes or no. Defaults to no.
#
export ALLUXIO_SETUP=no

# Alluxio Version
#
export ALLUXIO_VERSION="ALLUXIOVERSIONDEFAULT"

# Path to your Alluxio build/binaries
#
# This should be accessible on all nodes in your allocation. Typically
# this is in an NFS mount.
#
export ALLUXIO_HOME="ALLUXIODIRPREFIX/alluxio-${ALLUXIO_VERSION}"

# ALLUXIO_WORKER_ON_MASTER
#
# Most big data projects do not have a "worker" that also
# runs on the master node (such as Hadoop, Hbase, etc.). Alluxio is
# an exception in which it often likes to have a worker running on the
# master node for convenience of running tests and such.
#
# It is not required to run a worker on the master, but it can be
# convenient. Specify the below to "yes" to run a worker on the
# master.
#
export ALLUXIO_WORKER_ON_MASTER="yes"

# Path to store data local to each cluster node, typically something
# in /tmp. This will store local conf files and log files for your job.
#
export ALLUXIO_LOCAL_DIR="LOCALDIRPREFIX/alluxio"

# Path to store Alluxio Under File System data
#
# This should point to the path where you store your data
# and have to be accessible on all nodes in your allocation.
# Most likely it would be placed on Lustre, like "/lustre/${USER}/alluxio"
# but also it could be NFS mounted on all Alluxio nodes,
# like "${ALLUXIO_HOME}/underFSStorage",
# or ex. HDFS, like "hdfs://hdfsmaster:9000/alluxio/".
# Check Alluxio documentation for more UnderFS storage options.
#
export ALLUXIO_UNDER_FS_DIR="LUSTREDIRPREFIX/alluxio"

# ALLUXIO_DATA_CLEAR
#
# Alluxio has data files that are written to UnderFS and a journal file
# containing metadata so the state of Alluxio filesystem is saved
# and can be reused on multiple Alluxio runs.
#
# This flag enabled forces that data to be wiped which results
# in a clean install of Alluxio every time Magpie runs it.
#
# Specify yes or no. Defaults to yes.
export ALLUXIO_DATA_CLEAR="yes"

# Memory capacity of each worker node
#
# Set the amount of memory each Alluxio worker will use. Memory would
# be used as the first tier of storage. The more memory would Alluxio have,
# the bigger first tier storage would be. Be mindful of the memory
# requirements of other services (e.g. Spark).
#
export ALLUXIO_WORKER_MEMORY_SIZE=16GB

# ALLUXIO_WORKER_TIER0_PATH
#
# Alluxio will use RAM File System as caching storage.
# In this variable, there could be set path for tiered storage level 0.
# Default settings are /mnt/ramdisk on Linux and /Volumes/ramdisk on OSX.
#
# To avoid sudo requirement but using tmpFS in Linux,
# set here /dev/shm and ALLUXIO_RAMFS_MOUNT_OPTION to NoMount option.
export ALLUXIO_WORKER_TIER0_PATH="/mnt/ramdisk"

# ALLUXIO_RAMFS_MOUNT_OPTION
#
# Select option how RamFS should be mounted in Alluxio.
#
# There are 3 mount options for alluxio-start.sh command:
# Mount     - Mount the configured RamFS if it is not already mounted.
# SudoMount - Mount the configured RamFS using sudo
#             if it is not already mounted. This option requires sudo,
#             it should not be used when user doesn't have sudo rights.
# NoMount   - Do not mount the configured RamFS. Also, this option should
#             be used when RamFS is not available.
#
# To avoid sudo requirement but using tmpFS in Linux,
# set ALLUXIO_WORKER_TIER0_PATH to /dev/shm and use here NoMount option.
#
# If you have sudo and have doubts, leave the default value.
export ALLUXIO_RAMFS_MOUNT_OPTION="SudoMount"

# Default read type when creating Alluxio files
#
# Valid options are:
# - CACHE_PROMOTE (move data to highest tier
#   if already in Alluxio storage, write data into highest
#   tier of local Alluxio if data needs to be read from under storage),
# - CACHE (write data into highest tier of local Alluxio
#   if data needs to be read from under storage),
# - NO_CACHE (no data interaction with Alluxio, if the read is from
#   Alluxio data migration or eviction will not occur).
#
export ALLUXIO_READ_TYPE="CACHE"

# Default write type when creating Alluxio files
#
# Valid options are:
# - MUST_CACHE (write will only go to Alluxio and must be stored
#   in Alluxio),
# - CACHE_THROUGH (try to cache, write to UnderFS synchronously),
# - THROUGH (no cache, write to UnderFS synchronously),
# - ASYNC_THROUGH (try to cache, write to UnderFS asynchronously).
#
export ALLUXIO_WRITE_TYPE="CACHE_THROUGH"

# Additional tiered storage levels
#
# To use more storage levels than the default one in memory,
# customize it directly in configuration template file,
# i.e. magpie/conf/alluxio/alluxio-site.properties.

############################################################################
# Alluxio Job/Run Configurations
############################################################################

# Set how Alluxio should run
#
# "testalluxio" - Run a quick sanity test to see that Alluxio is
#             setup correctly. Mode testalluxio will do several simple
#             filesystem commands.
#
export ALLUXIO_JOB="testalluxio"

