[Unit]
Description=Datanode
After=syslog.target network.target auditd.service sshd.service datanode_precheck.service
Requires=datanode_precheck.service
[Service]
User=hdfs
Group=hdfs
Type=forking
Slice=hadoop.slice
LimitNOFILE=524288
Environment=CLASSPATH=/app/jdk/jdk1.8.0_92/lib/dt.jar:/app/jdk/jdk1.8.0_92/lib/tools.jar:.:/app/jdk/jdk1.8.0_92/lib/dt.jar:/app/jdk/jdk1.8.0_92/lib/tools.jar:
Environment=HADOOP_COMMON_HOME=/app/hadoop
Environment=HADOOP_CONF_DIR=/app/hadoop-conf
Environment=HADOOP_HDFS_HOME=/app/hadoop
Environment=HADOOP_HOME=/app/hadoop
Environment=HADOOP_LOG_DIR=/log/hadoop
Environment=HADOOP_MAPRED_HOME=/app/hadoop
Environment=HADOOP_MAPRED_LOG_DIR=/log/yarn
Environment=HADOOP_MAPRED_PID_DIR=/app/hadoop/tmp
Environment=HADOOP_PID_DIR=/app/hadoop/tmp
Environment=HADOOP_YARN_HOME=/app/hadoop
Environment=HIVE_HOME=/app/hive
Environment=JAVA_HOME=/app/jdk/jdk1.8.0_92
Environment=LANG=en_US.UTF-8
Environment=PATH=/app/anaconda2/bin:/app/hive/bin:/app/hadoop/sbin:/app/hadoop/bin:/app/jdk/jdk1.8.0_92/bin:/app/jdk/jdk1.8.0_92/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/yarn/.local/bin:/home/yarn/bin
Environment=USER_PROFILE=/app/pylibs/user-profile/install/lib/python2.7/site-packages
Environment=YARN_CONF_DIR=/app/hadoop-conf
Environment=YARN_LOG_DIR=/log/yarn
Environment=YARN_PID_DIR=/app/hadoop/tmp
ExecStart=/bin/sh -c "exec hadoop-daemon.sh start datanode"
ExecStop=/bin/sh -c "exec hadoop-daemon.sh stop datanode"
[Install]
WantedBy=default.target
[Unit]
Description=Nodemanager
After=syslog.target network.target auditd.service sshd.service datanode.service datanode_precheck.service
Requires=datanode_precheck.service
[Service]
User=yarn
Group=yarn
Type=forking
Slice=hadoop.slice
LimitNOFILE=524288
Environment=CLASSPATH=/app/jdk/jdk1.8.0_92/lib/dt.jar:/app/jdk/jdk1.8.0_92/lib/tools.jar:.:/app/jdk/jdk1.8.0_92/lib/dt.jar:/app/jdk/jdk1.8.0_92/lib/tools.jar:
Environment=HADOOP_COMMON_HOME=/app/hadoop
Environment=HADOOP_CONF_DIR=/app/hadoop-conf
Environment=HADOOP_HDFS_HOME=/app/hadoop
Environment=HADOOP_HOME=/app/hadoop
Environment=HADOOP_LOG_DIR=/log/hadoop
Environment=HADOOP_MAPRED_HOME=/app/hadoop
Environment=HADOOP_MAPRED_LOG_DIR=/log/yarn
Environment=HADOOP_MAPRED_PID_DIR=/app/hadoop/tmp
Environment=HADOOP_PID_DIR=/app/hadoop/tmp
Environment=HADOOP_YARN_HOME=/app/hadoop
Environment=HIVE_HOME=/app/hive
Environment=JAVA_HOME=/app/jdk/jdk1.8.0_92
Environment=LANG=en_US.UTF-8
Environment=PATH=/app/anaconda2/bin:/app/hive/bin:/app/hadoop/sbin:/app/hadoop/bin:/app/jdk/jdk1.8.0_92/bin:/app/jdk/jdk1.8.0_92/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/yarn/.local/bin:/home/yarn/bin
Environment=USER_PROFILE=/app/pylibs/user-profile/install/lib/python2.7/site-packages
Environment=YARN_CONF_DIR=/app/hadoop-conf
Environment=YARN_LOG_DIR=/log/yarn
Environment=YARN_PID_DIR=/app/hadoop/tmp
ExecStart=/bin/sh -c "exec yarn-daemon.sh start nodemanager"
ExecStop=/bin/sh -c "exec yarn-daemon.sh stop nodemanager"
[Install]
WantedBy=default.target