Hadoop记录-Linux Service

Posted 信方互联网硬汉

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Hadoop记录-Linux Service相关的知识,希望对你有一定的参考价值。

[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

以上是关于Hadoop记录-Linux Service的主要内容,如果未能解决你的问题,请参考以下文章

Linux巩固记录 hadoop 2.7.4下自己编译代码并运行MapReduce程序

The service already exists! The current server installed: D:mysqlmysql-5.7.30-winx64inmysqld My(代码片

hadoop开启Service Level Authorization 服务级认证-SIMPLE认证-过程中遇到的坑

linux内核分析作业:操作系统是如何工作的进行:完成一个简单的时间片轮转多道程序内核代码

Binder 机制Native 层 Binder 机制分析 ( service_manager.c | 开启 Binder | 注册 Binder 进程上下文 | 开启 Binder 循环 )(代码片

Linux巩固记录 hadoop 2.7.4 环境搭建