/
tachyon-env.sh.template
executable file
·91 lines (79 loc) · 3.81 KB
/
tachyon-env.sh.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env bash
# This file contains environment variables required to run Tachyon. Copy it as tachyon-env.sh and
# edit that to configure Tachyon for your site. At a minimum,
# the following variables should be set:
#
# - JAVA_HOME, to point to your JAVA installation
# - TACHYON_MASTER_ADDRESS, to bind the master to a different IP address or hostname
# - TACHYON_UNDERFS_ADDRESS, to set the under filesystem address.
# - TACHYON_WORKER_MEMORY_SIZE, to set how much memory to use (e.g. 1000mb, 2gb) per worker
# - TACHYON_RAM_FOLDER, to set where worker stores in memory data
# - TACHYON_UNDERFS_HDFS_IMPL, to set which HDFS implementation to use (e.g. com.mapr.fs.MapRFileSystem,
# org.apache.hadoop.hdfs.DistributedFileSystem)
# The following gives an example:
# Uncomment this section to add a local installation of Hadoop to Tachyon's CLASSPATH.
# The hadoop command must be in the path to automatically populate the Hadoop classpath.
#
# if type "hadoop" > /dev/null 2>&1; then
# export HADOOP_TACHYON_CLASSPATH=`hadoop classpath`
# fi
# export TACHYON_CLASSPATH=$HADOOP_TACHYON_CLASSPATH
if [[ `uname -a` == Darwin* ]]; then
# Assuming Mac OS X
export JAVA_HOME=${JAVA_HOME:-$(/usr/libexec/java_home)}
export TACHYON_RAM_FOLDER=/Volumes/ramdisk
export TACHYON_JAVA_OPTS="-Djava.security.krb5.realm= -Djava.security.krb5.kdc="
else
# Assuming Linux
if [ -z "$JAVA_HOME" ]; then
if [ -d /usr/lib/jvm/java-7-oracle ]; then
export JAVA_HOME=/usr/lib/jvm/java-7-oracle
else
# openjdk will set this
if [ -d /usr/lib/jvm/jre-1.7.0 ]; then
export JAVA_HOME=/usr/lib/jvm/jre-1.7.0
fi
fi
fi
export TACHYON_RAM_FOLDER=/mnt/ramdisk
fi
if [ -z "$JAVA_HOME" ]; then
export JAVA_HOME="$(dirname $(which java))/.."
fi
export JAVA="$JAVA_HOME/bin/java"
export TACHYON_MASTER_ADDRESS=localhost
export TACHYON_UNDERFS_ADDRESS=$TACHYON_HOME/underfs
#export TACHYON_UNDERFS_ADDRESS=hdfs://localhost:9000
export TACHYON_WORKER_MEMORY_SIZE=1GB
export TACHYON_UNDERFS_HDFS_IMPL=org.apache.hadoop.hdfs.DistributedFileSystem
# The default max threads in both master and worker are unlimited and thus provides no protection against
# clients overwhelming the server. Users need to set this number according to their production environment
# These two settings represents the maximum number of client requests that a master/worker server may execute concurrently.
export TACHYON_WORKER_MAX_THREADS=2048
export TACHYON_MASTER_MAX_THREADS=2048
CONF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export TACHYON_JAVA_OPTS+="
-Dlog4j.configuration=file:$CONF_DIR/log4j.properties
-Dtachyon.debug=false
-Dtachyon.worker.hierarchystore.level.max=1
-Dtachyon.worker.hierarchystore.level0.alias=MEM
-Dtachyon.worker.hierarchystore.level0.dirs.path=$TACHYON_RAM_FOLDER
-Dtachyon.worker.hierarchystore.level0.dirs.quota=$TACHYON_WORKER_MEMORY_SIZE
-Dtachyon.underfs.address=$TACHYON_UNDERFS_ADDRESS
-Dtachyon.underfs.hdfs.impl=$TACHYON_UNDERFS_HDFS_IMPL
-Dtachyon.data.folder=$TACHYON_UNDERFS_ADDRESS/tmp/tachyon/data
-Dtachyon.workers.folder=$TACHYON_UNDERFS_ADDRESS/tmp/tachyon/workers
-Dtachyon.worker.memory.size=$TACHYON_WORKER_MEMORY_SIZE
-Dtachyon.worker.data.folder=/tachyonworker/
-Dtachyon.master.worker.timeout.ms=60000
-Dtachyon.master.hostname=$TACHYON_MASTER_ADDRESS
-Dtachyon.master.journal.folder=$TACHYON_HOME/journal/
-Dtachyon.master.maxworker.threads=$TACHYON_MASTER_MAX_THREADS
-Dtachyon.worker.maxworker.threads=$TACHYON_WORKER_MAX_THREADS
-Dorg.apache.jasper.compiler.disablejsr199=true
-Djava.net.preferIPv4Stack=true
"
# Master specific parameters. Default to TACHYON_JAVA_OPTS.
export TACHYON_MASTER_JAVA_OPTS="$TACHYON_JAVA_OPTS"
# Worker specific parameters that will be shared to all workers. Default to TACHYON_JAVA_OPTS.
export TACHYON_WORKER_JAVA_OPTS="$TACHYON_JAVA_OPTS"