$cat /usr/local/etc/mesos/mesos-slave-env.sh
# This file contains environment variables that are passed to mesos-slave.# To get a description of all options run mesos-slave --help; any option
# supported as a command-line option is also supported as an environment
# variable.
# You must at least set MESOS_master.
# The mesos master URL to contact. Should be host:port for
# non-ZooKeeper based masters, otherwise a zk:// or file:// URL.
export MESOS_master=master:5050
#export MESOS_containerizers=docker,mesos
export MESOS_containerizers=docker,mesos
# Other options you're likely to want to set:
#Location to put log files. By default, nothing
# is written to disk. Does not affect logging to
# stderr. If specified, the log file will appear
# in the Mesos WebUI. NOTE: 3rd party log messages
#(e.g. ZooKeeper) are only written to stderr!
export MESOS_log_dir=/var/log/mesos/slave
#Directory path to place framework work
#directories (default: /tmp/mesos)
export MESOS_work_dir=/var/lib/mesos/slave
export MESOS_modules='{"libraries":[{"file":"/usr/local/lib/liblogrotate_container_logger.so", "modules":[{"name":"org_apache_mesos_LogrotateContainerLogger"}]}]}'
# export MESOS_isolation=cgroups
#The default container logger writes to stdout and
#stderr files in the sandbox directory
export MESOS_container_logger=org_apache_mesos_LogrotateContainerLogger
export MESOS_logrotate_path=/var/log/mesos/rotate
export MESOS_isolation=cgroups/cpu,cgroups/mem
export MESOS_ip=192.168.60.102
export MESOS_hostname=slave1
export MESOS_
resources='cpus:4;mem:8192;ports:[1000-5000;31000-32000]
export attributes='operating_system:ubuntu;zone:us_east;rack:22'
$ cat /usr/local/etc/mesos/mesos-master-env.sh
# This file contains environment variables that are passed to mesos-master.# To get a description of all options run mesos-master --help; any option
# supported as a command-line option is also supported as an environment
# variable.
# Some options you're likely to want to set:
# export MESOS_log_dir=/var/log/mesos
export MESOS_log_dir=/var/log/mesos/master
export MESOS_work_dir=/var/lib/mesos/master
export MESOS_ip=192.168.60.103
echo "/usr/local/mesos/lib" > /etc/ld.so.conf.d/mesos.conf && sudo ldconfig
sudo cp /usr/local/etc/mesos/mesos-slave-env.sh.template /usr/local/etc/mesos/mesos-slave-env.sh
echo "master-host-name" > /usr/local/etc/mesos/masters
. /usr/local/etc/mesos/mesos-master-env.sh
sudo -E /usr/local/sbin/mesos-master (otherwise the env is not effective)
. /usr/local/etc/mesos/mesos-slave-env.sh
sudo -E /usr/local/sbin/mesos-slave
DAG job for framework
//com.nirmata.workflow.serialization.JsonSerializer.getTask();ClassLoader classloader = Thread.currentThread().getContextClassLoader();
ObjectMapper m = new ObjectMapper();
JsonNode rootNode = m.readTree(new File(classloader.getResource("tasks.json").getFile()));
JsonSerializerMapper jsonSerializerMapper = new JsonSerializerMapper();
Task task = jsonSerializerMapper.get(rootNode, Task.class);
//System.out.print(task.toString());
List<Task> ct = task.getChildrenTasks();
No comments:
Post a Comment