欢迎投稿

今日深度:

hadoop官网翻译第三天Hadoop Cluster Setup,hadoopcluster

hadoop官网翻译第三天Hadoop Cluster Setup,hadoopcluster


Hadoop Cluster Setup 

  • Purpose
  • Prerequisites
  • Installation
  • Configuring Hadoop in Non-Secure Mode
    • Configuring Environment of Hadoop Daemons
    • Configuring the Hadoop Daemons
  • Monitoring Health of NodeManagers
  • Slaves File
  • Hadoop Rack Awareness
  • Logging
  • Operating the Hadoop Cluster
    • Hadoop Startup
    • Hadoop Shutdown
  • Web Interfaces

hadoop集群设置

  • 目的
  • 先决条件
  • 安装
  • 非安全模式下配置hadoop
  •         配置hadoop进程的环境
  •         配置hadoop进程
  • 监控NodeManager的健康
  • DataNode文件
  • hadoop支架感觉
  • 日志
  • 操作hadoop集群
  •     集群启动
  •     集群关闭
  • Web界面

Purpose

This document describes how to install and configure Hadoop clusters ranging from a few nodes to extremely(非常) large clusters with thousands of nodes. To play with Hadoop, you may first want to install it on a single machine (see Single Node Setup).

This document does not cover advanced topics such as Security or High Availability.

ranging from ......to...... 从...到...

该文档描述了如何安装和配置从几个到非常多的节点的hadoop集群。为了使用hadoop,你应该首先想在一台机器上安装它,请参考(上一篇)

这个文档不涉及高级话题,比如安全Security 和高可用

Prerequisites

  • Install Java. See the Hadoop Wiki for known good versions.
  • Download a stable version of Hadoop from Apache mirrors.

先决条件

  • 安装java,查看Hadoop Wiki查看合适的版本
  • 从apache镜像中下载一个稳定的版本

Installation

Installing a Hadoop cluster typically(通常) involves unpacking the software on all the machines in the cluster or installing it via(通过) a packaging system as appropriate(适当的) for your operating system. It is important to divide up the hardware into functions.

Typically one machine in the cluster is designated(被指定) as the NameNode and another machine as the ResourceManager, exclusively. These are the masters. Other services (such as Web App Proxy Server and MapReduce Job History server) are usually run either on dedicated(专注的) hardware or on shared infrastructure(基础建设), depending upon the load.

either ... or ....(要么..要么...)

The rest of the machines in the cluster act as both DataNode and NodeManager. These are the slaves.

安装hadoop机器通常是在集群中的所有机器上解压软件,或者是适合你操作系统的打包系统。按功能区区分硬件是很重要的。

通常情况下集群中的一台机器被指定为NameNode,另一个机器被指定为ResourceManager,这些属于“主人”。别的服务(比如WEB App Proxy Server或者MapReduce job History server)通常专注与一台硬件或者是共享设备,这些取决于负载。

集群中其余的集群作为DataNode和NodeManager.他们是“工人”。

Configuring Hadoop in Non-Secure Mode

Hadoop’s Java configuration is driven by two types of important configuration files:

  • Read-only default configuration - core-default.xml, hdfs-default.xml, yarn-default.xml and mapred-default.xml.

  • Site-specific configuration - etc/hadoop/core-site.xml, etc/hadoop/hdfs-site.xml, etc/hadoop/yarn-site.xml and etc/hadoop/mapred-site.xml.

Additionally, you can control the Hadoop scripts found in the bin/ directory of the distribution, by setting site-specific values via the etc/hadoop/hadoop-env.sh and etc/hadoop/yarn-env.sh.

To configure the Hadoop cluster you will need to configure the environment in which the Hadoop daemons execute as well as the configuration parameters for the Hadoop daemons.

HDFS daemons are NameNode, SecondaryNameNode, and DataNode. YARN daemons are ResourceManager, NodeManager, and WebAppProxy. If MapReduce is to be used, then the MapReduce Job History Server will also be running. For large installations, these are generally running on separate hosts.

hadoop的Java配置注意是由两个重要的配置文件:

  • 只读配置 core-default.xml, hdfs-default.xml, yarn-default.xml and mapred-default.xml.
  • 特定的配置文件- etc/hadoop/core-site.xml, etc/hadoop/hdfs-site.xml, etc/hadoop/yarn-site.xml 和etc/hadoop/mapred-site.xml.

除此之外,你可以通过设置etc/hadoop-env.sh和etc/hadoop/yarn-env.sh中的特定值来控制bin目录下hadoop脚本。

为了设置hadoop集群你需要设置hadoop进程执行的机器的环境和hadoop进程的参数。

HDFS的进程有NameNode SecondaryNameNode DataNode.YARN进程有ResourceManager NodeManager WebAppProxy.如果使用了MapReduce那么MapReduce job History服务也会运行。节点多的话,这些通常在单独的机器上运行。

Configuring Environment of Hadoop Daemons

Administrators should use the etc/hadoop/hadoop-env.sh and optionally the etc/hadoop/mapred-env.sh and etc/hadoop/yarn-env.sh scripts to do site-specific customization of the Hadoop daemons’ process environment.

At the very least, you must specify the JAVA_HOME so that it is correctly defined on each remote node.

Administrators can configure individual daemons using the configuration options shown below in the table:

 配置hadoop进程的环境

管理员应该使用etc/hadoop/hadoop-env.sh 或者etc/hadoop/mapred-env.sh 和etc/hadoop/yarn-env.sh去定制hadoop进程的运行环境。

至少,你必须指定JAVA_HOME在每一个远程节点上正确的定义了。

管理员可以使用下表中的参数选项配置每个进程:

Daemon Environment Variable
NameNode HADOOP_NAMENODE_OPTS
DataNode HADOOP_DATANODE_OPTS
Secondary NameNode HADOOP_SECONDARYNAMENODE_OPTS
ResourceManager YARN_RESOURCEMANAGER_OPTS
NodeManager YARN_NODEMANAGER_OPTS
WebAppProxy YARN_PROXYSERVER_OPTS
Map Reduce Job History Server HADOOP_JOB_HISTORYSERVER_OPTS

For example, To configure Namenode to use parallelGC, the following statement should be added in hadoop-env.sh :

 例如,为了指定NameNode使用parallelGC,如下命令需要加入到hadoop-env.sh文件。

  export HADOOP_NAMENODE_OPTS="-XX:+UseParallelGC"

See etc/hadoop/hadoop-env.sh for other examples.

Other useful configuration parameters that you can customize include:

查看etc/hadoop/hadoop-env.sh 获得别的示例.

你可以定制的有用的配置参数包括:

  • HADOOP_PID_DIR - The directory where the daemons’ process id files are stored.
  • HADOOP_LOG_DIR - The directory where the daemons’ log files are stored. Log files are automatically created if they don’t exist.
  • HADOOP_HEAPSIZE / YARN_HEAPSIZE - The maximum amount of heapsize to use, in MB e.g. if the varibale(变量) is set to 1000 the heap will be set to 1000MB. This is used to configure the heap size for the daemon. By default, the value is 1000. If you want to configure the values separately for each deamon you can use.
  • HADOOP_PID_DIR - 进程ID文件存储的目录 
  • HADOOP_LOG_DIR - 进程日志文件存储的路径,如果日志文件不存在的话他们将会自动创建。
  • HADOOP_HEAPSIZE / YARN_HEAPSIZE - 最大堆使用量,以MB为单位,例如,如果变量设置为1000,则堆将设置为1000MB。这用于为守护进程配置堆大小。默认情况下,值为1000。如果希望为每个deamon单独配置值,可以使用。

In most cases, you should specify(指定) the HADOOP_PID_DIR and HADOOP_LOG_DIR directories such that they can only be written to by the users that are going to run the hadoop daemons. Otherwise there is the potential(有可能的) for a symlink attack.

It is also traditional to configure HADOOP_PREFIX in the system-wide shell environment configuration. For example, a simple script inside /etc/profile.d:

在大部分情况下,你应该指定HADOOP_PID_DIR和HADOOP_LOG_DIR目录,这些目录只能由运行hadoop进程的用户去创建,否则的话将会有符号链接的攻击。

通常也会在系统全局变量中配置HADOOP_HOME,例如在/etc/profile.d脚本中

  HADOOP_PREFIX=/path/to/hadoop
  export HADOOP_PREFIX
Daemon Environment Variable
ResourceManager YARN_RESOURCEMANAGER_HEAPSIZE
NodeManager YARN_NODEMANAGER_HEAPSIZE
WebAppProxy YARN_PROXYSERVER_HEAPSIZE
Map Reduce Job History Server HADOOP_JOB_HISTORYSERVER_HEAPSIZE

Configuring the Hadoop Daemons

This section deals with important parameters to be specified in the given configuration files:

这一部分处理了已给定配置文件的重要的参数

  • etc/hadoop/core-site.xml
Parameter Value Notes
fs.defaultFS NameNode URI hdfs://host:port/
io.file.buffer.size 131072 Size of read/write buffer used in SequenceFiles.128M??
  • etc/hadoop/hdfs-site.xml

  • Configurations for NameNode:

Parameter Value Notes
dfs.namenode.name.dir Path on the local filesystem where the NameNode stores the namespace and transactions logs persistently. If this is a comma-delimited list of directories then the name table is replicated in all of the directories, for redundancy.
dfs.hosts / dfs.hosts.exclude List of permitted/excluded DataNodes. If necessary, use these files to control the list of allowable datanodes.
dfs.blocksize 268435456 HDFS blocksize of 256MB for large file-systems.
dfs.namenode.handler.count 100 More NameNode server threads to handle RPCs from large number of DataNodes.
  • Configurations for DataNode:
Parameter Value Notes
dfs.datanode.data.dir Comma separated list of paths on the local filesystem of a DataNode where it should store its blocks. If this is a comma-delimited list of directories, then data will be stored in all named directories, typically on different devices.
  • etc/hadoop/yarn-site.xml

  • Configurations for ResourceManager and NodeManager:

Parameter Value Notes
yarn.acl.enable true / false Enable ACLs? Defaults to false.
yarn.admin.acl Admin ACL ACL to set admins on the cluster. ACLs are of for comma-separated-usersspacecomma-separated-groups. Defaults to special value of * which means anyone. Special value of just space means no one has access.
yarn.log-aggregation-enable false Configuration to enable or disable log aggregation
  • Configurations for ResourceManager:
Parameter Value Notes
yarn.resourcemanager.address ResourceManager host:port for clients to submit jobs. host:port If set, overrides the hostname set in yarn.resourcemanager.hostname.
yarn.resourcemanager.scheduler.address ResourceManager host:port for ApplicationMasters to talk to Scheduler to obtain resources. host:port If set, overrides the hostname set in yarn.resourcemanager.hostname.
yarn.resourcemanager.resource-tracker.address ResourceManager host:port for NodeManagers. host:port If set, overrides the hostname set in yarn.resourcemanager.hostname.
yarn.resourcemanager.admin.address ResourceManager host:port for administrative commands. host:port If set, overrides the hostname set in yarn.resourcemanager.hostname.
yarn.resourcemanager.webapp.address ResourceManager web-ui host:port. host:port If set, overrides the hostname set in yarn.resourcemanager.hostname.
yarn.resourcemanager.hostname ResourceManager host. host Single hostname that can be set in place of setting all yarn.resourcemanager*address resources. Results in default ports for ResourceManager components.
yarn.resourcemanager.scheduler.class ResourceManager Scheduler class. CapacityScheduler (recommended), FairScheduler (also recommended), or FifoScheduler. Use a fully qualified class name, e.g., org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.
yarn.scheduler.minimum-allocation-mb Minimum limit of memory to allocate to each container request at the Resource Manager. In MBs
yarn.scheduler.maximum-allocation-mb Maximum limit of memory to allocate to each container request at the Resource Manager. In MBs
yarn.resourcemanager.nodes.include-path / yarn.resourcemanager.nodes.exclude-path List of permitted/excluded NodeManagers. If necessary, use these files to control the list of allowable NodeManagers.
  • Configurations for NodeManager:
Parameter Value Notes
yarn.nodemanager.resource.memory-mb Resource i.e. available physical memory, in MB, for given NodeManager Defines total available resources on the NodeManager to be made available to running containers
yarn.nodemanager.vmem-pmem-ratio Maximum ratio by which virtual memory usage of tasks may exceed physical memory The virtual memory usage of each task may exceed its physical memory limit by this ratio. The total amount of virtual memory used by tasks on the NodeManager may exceed its physical memory usage by this ratio.
yarn.nodemanager.local-dirs Comma-separated list of paths on the local filesystem where intermediate data is written. Multiple paths help spread disk i/o.
yarn.nodemanager.log-dirs Comma-separated list of paths on the local filesystem where logs are written. Multiple paths help spread disk i/o.
yarn.nodemanager.log.retain-seconds 10800 Default time (in seconds) to retain log files on the NodeManager Only applicable if log-aggregation is disabled.
yarn.nodemanager.remote-app-log-dir /logs HDFS directory where the application logs are moved on application completion. Need to set appropriate permissions. Only applicable if log-aggregation is enabled.
yarn.nodemanager.remote-app-log-dir-suffix logs Suffix appended to the remote log dir. Logs will be aggregated to ${yarn.nodemanager.remote-app-log-dir}/${user}/${thisParam} Only applicable if log-aggregation is enabled.
yarn.nodemanager.aux-services mapreduce_shuffle Shuffle service that needs to be set for Map Reduce applications.
  • Configurations for History Server (Needs to be moved elsewhere):
Parameter Value Notes
yarn.log-aggregation.retain-seconds -1 How long to keep aggregation logs before deleting them. -1 disables. Be careful, set this too small and you will spam the name node.
yarn.log-aggregation.retain-check-interval-seconds -1 Time between checks for aggregated log retention. If set to 0 or a negative value then the value is computed as one-tenth of the aggregated log retention time. Be careful, set this too small and you will spam the name node.
  • etc/hadoop/mapred-site.xml

  • Configurations for MapReduce Applications:

Parameter Value Notes
mapreduce.framework.name yarn Execution framework set to Hadoop YARN.
mapreduce.map.memory.mb 1536 Larger resource limit for maps.
mapreduce.map.java.opts -Xmx1024M Larger heap-size for child jvms of maps.
mapreduce.reduce.memory.mb 3072 Larger resource limit for reduces.
mapreduce.reduce.java.opts -Xmx2560M Larger heap-size for child jvms of reduces.
mapreduce.task.io.sort.mb 512 Higher memory-limit while sorting data for efficiency.
mapreduce.task.io.sort.factor 100 More streams merged at once while sorting files.
mapreduce.reduce.shuffle.parallelcopies 50 Higher number of parallel copies run by reduces to fetch outputs from very large number of maps.
  • Configurations for MapReduce JobHistory Server:
Parameter Value Notes
mapreduce.jobhistory.address MapReduce JobHistory Server host:port Default port is 10020.
mapreduce.jobhistory.webapp.address MapReduce JobHistory Server Web UI host:port Default port is 19888.
mapreduce.jobhistory.intermediate-done-dir /mr-history/tmp Directory where history files are written by MapReduce jobs.
mapreduce.jobhistory.done-dir /mr-history/done Directory where history files are managed by the MR JobHistory Server.

Monitoring Health of NodeManagers

Hadoop provides a mechanism by which administrators can configure the NodeManager to run an administrator supplied script periodically to determine if a node is healthy or not.

Administrators can determine if the node is in a healthy state by performing any checks of their choice in the script. If the script detects the node to be in an unhealthy state, it must print a line to standard output beginning with the string ERROR. The NodeManager spawns the script periodically and checks its output. If the script’s output contains the string ERROR, as described above, the node’s status is reported as unhealthy and the node is black-listed by the ResourceManager. No further tasks will be assigned to this node. However, the NodeManager continues to run the script, so that if the node becomes healthy again, it will be removed from the blacklisted nodes on the ResourceManager automatically. The node’s health along with the output of the script, if it is unhealthy, is available to the administrator in the ResourceManager web interface. The time since the node was healthy is also displayed on the web interface.

The following parameters can be used to control the node health monitoring script in etc/hadoop/yarn-site.xml.

 Hadoop提供了一种机制,通过这种机制管理员可以配置NodeManager 周期性的去执行一个管理员提供的脚本去决定一个节点是否健康。

管理员可以通过执行脚本中的一些检查去决定一个节点是否处于健康状态。如果脚本检测到节点属于非健康状态,它必须在标准输出台上以ERROR开头的一行日志。NodeManager周期性的产生脚本并且检查其输出。如果脚本输出中包含如上所描述的ERROR字符,该节点状态将会报告为不健康并且被ResourceManager列为黑名单。将不会有新的任务分配到该节点上。然而,NodeManager会继续执行脚本,以便如果该节点重新变为健康状态,它将会从ResourceManager的黑名单节点中自动移除。节点的健康状态伴随着脚本的输出,如果它是非健康的,它在ResourceManager的web界面是可用的,从节点变为健康开始它同样会显示在web界面。

在etc/hadoop/yarn-site.xml中的如下参数可以用来控制节点健康监控:

Parameter Value Notes
yarn.nodemanager.health-checker.script.path Node health script Script to check for node’s health status.
yarn.nodemanager.health-checker.script.opts Node health script options Options for script to check for node’s health status.
yarn.nodemanager.health-checker.interval-ms Node health script interval Time interval for running health script.
yarn.nodemanager.health-checker.script.timeout-ms Node health script timeout interval Timeout for health script execution.

The health checker script is not supposed to give ERROR if only some of the local disks become bad. NodeManager has the ability to periodically check the health of the local disks (specifically checks nodemanager-local-dirs and nodemanager-log-dirs) and after reaching the threshold of number of bad directories based on the value set for the config property yarn.nodemanager.disk-health-checker.min-healthy-disks, the whole node is marked unhealthy and this info is sent to resource manager also. The boot disk is either raided or a failure in the boot disk is identified by the health checker script.

 如果本地磁盘变坏的话健康检测脚本将不会给出ERROR。NodeManager可以周期性的检测本地磁盘(尤其是nodemanager-local-dirs和nodemanager-log-dirs)的健康状况,如果到了yarn.nodemanager.disk-health-check.min-healthy-disks的临界值,全部的node被标记为非健康,这一信息也会发送到ResourceManager.启动盘被攻击或者启动盘的错误都会标记为健康检查脚本。

Slaves File

List all slave hostnames or IP addresses in your etc/hadoop/slaves file, one per line. Helper scripts (described below) will use the etc/hadoop/slaves file to run commands on many hosts at once. It is not used for any of the Java-based Hadoop configuration. In order to use this functionality, ssh trusts (via either passphraseless ssh or some other means, such as Kerberos) must be established for the accounts used to run Hadoop.

在etc/hadoop/workers文件中列举的所有的"worker"域名或IP地址信息,一行为一个。帮助脚本将使用etc/hadoop/workers文件在每一个主机上运行。它不使用任何基于Java的hadoop配置。为了使用这个功能,必须为运行Hadoop的账户设置SSH信任(通过免密或者别的方式比如Kerberos)。

Hadoop Rack Awareness

Many Hadoop components are rack-aware and take advantage of the network topology for performance and safety. Hadoop daemons obtain the rack information of the slaves in the cluster by invoking an administrator configured module. See the Rack Awareness documentation for more specific information.

It is highly recommended configuring rack awareness prior to starting HDFS.

许多Hadoop组件利用网络拓扑学的性能和安全性是支持机架感应的。Hadoop进程通过使用管理员的配置模块是包含集群中“工人”的机架信息的。查看机架感应文档( Rack Awareness)获取更多特定的内容。

强烈建议在开始使用HDFS之前优先配置机架感应。

Logging

Hadoop uses the Apache log4j via the Apache Commons Logging framework for logging. Edit the etc/hadoop/log4j.properties file to customize the Hadoop daemons’ logging configuration (log-formats and so on).

Hadoop通过Apache Commons Logging 框架的Apache log4j(Apache log4j )记录日志。

编辑etc/hadoop/log4j.properties文件去定制Hadoop进程的日志配置(日志格式化等等)。

Operating the Hadoop Cluster

Once all the necessary configuration is complete, distribute the files to the HADOOP_CONF_DIR directory on all the machines. This should be the same directory on all machines.

In general, it is recommended that HDFS and YARN run as separate users. In the majority of installations, HDFS processes execute as ‘hdfs’. YARN is typically using the ‘yarn’ account.

一旦所有的必要的配置完成了,分发所有的文件到集群中所有机器下的HADOOP_CONF_DIR文件夹下。这个文件夹应该在所有的机器上是一样的。

通常情况下。HDFS和YARN应该使用不同的用户去运行。在大部分的配置下,HDFS以hdfs账户执行,YARN用yarn账户。

Hadoop Startup

To start a Hadoop cluster you will need to start both the HDFS and YARN cluster.

The first time you bring up HDFS, it must be formatted. Format a new distributed filesystem as hdfs:

如果要启动hadoop集群的话你首先要同时启动HDFS和YARN集群。

第一次启动HDFS的时候,必须进行格式化。将hdfs格式化为一个新的分布式文件系统:

[hdfs]$ $HADOOP_PREFIX/bin/hdfs namenode -format <cluster_name>

Start the HDFS NameNode with the following command on the designated node as hdfs:

在指定的节点上使用hdfs用户执行如下的命令启动NameNode

[hdfs]$ $HADOOP_PREFIX/sbin/hadoop-daemon.sh --config $HADOOP_CONF_DIR --script hdfs start namenode

Start a HDFS DataNode with the following command on each designated(指定) node as hdfs:

在指定的节点上使用hdfs用户执行如下的命令启动DataNode:

[hdfs]$ $HADOOP_PREFIX/sbin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script hdfs start datanode

If etc/hadoop/slaves and ssh trusted access is configured (see Single Node Setup), all of the HDFS processes can be started with a utility script. As hdfs:

如果etc/hadoop/slaves 和ssh免密已经设置了的话(Single Node Setup),可以使用一个有用的脚本来启动HDFS所有的进程,

[hdfs]$ $HADOOP_PREFIX/sbin/start-dfs.sh

Start the YARN with the following command, run on the designated ResourceManager as yarn:

在指定的ResourceManager节点上使用yarn用户执行如下命令启动YARN:

[yarn]$ $HADOOP_YARN_HOME/sbin/yarn-daemon.sh --config $HADOOP_CONF_DIR start resourcemanager

Run a script to start a NodeManager on each designated host as yarn:

在每一个指定的主机上用yarn用户执行脚本去启动NodeManager:

[yarn]$ $HADOOP_YARN_HOME/sbin/yarn-daemons.sh --config $HADOOP_CONF_DIR start nodemanager

Start a standalone WebAppProxy server. Run on the WebAppProxy server as yarn. If multiple servers are used with load balancing it should be run on each of them:

启动一个单独的WebAppProxy服务。使用yarn用户启动WebAppProxy服务。如果有多个服务器用来做负载均衡的话应该在每一台机器上面执行它:

[yarn]$ $HADOOP_YARN_HOME/sbin/yarn-daemon.sh --config $HADOOP_CONF_DIR start proxyserver

If etc/hadoop/slaves and ssh trusted access is configured (see Single Node Setup), all of the YARN processes can be started with a utility script. As yarn:

如果etc/hadoop/workers和ssh免密都设置的话(Single Node Setup),所有的YARN进程可以使用一个有效的脚本启动,使用yarn用户:

[yarn]$ $HADOOP_PREFIX/sbin/start-yarn.sh

Start the MapReduce JobHistory Server with the following command, run on the designated server as mapred:

在指定的服务器上使用mapred用户执行如下命令启动MapReduce JobHistory服务:

[mapred]$ $HADOOP_PREFIX/sbin/mr-jobhistory-daemon.sh --config $HADOOP_CONF_DIR start historyserver

Hadoop Shutdown

Stop the NameNode with the following command, run on the designated NameNode as hdfs:

使用hdfs用户在指定的NameNode服务器上执行如下命令停止NameNode:

[hdfs]$ $HADOOP_PREFIX/sbin/hadoop-daemon.sh --config $HADOOP_CONF_DIR --script hdfs stop namenode

Run a script to stop a DataNode as hdfs:

使用hdfs用户运行脚本停止DataNode

[hdfs]$ $HADOOP_PREFIX/sbin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script hdfs stop datanode

If etc/hadoop/slaves and ssh trusted access is configured (see Single Node Setup), all of the HDFS processes may be stopped with a utility script. As hdfs:

如果etc/hadoop/slaves 和ssh免密已经设置的话,所有的HDFS进行可以使用一个有用的脚本来停止。使用hdfs用户

[hdfs]$ $HADOOP_PREFIX/sbin/stop-dfs.sh

Stop the ResourceManager with the following command, run on the designated ResourceManager as yarn:

在指定的ResourceManager机器上执行如下命令停止ResourceManager:

[yarn]$ $HADOOP_YARN_HOME/sbin/yarn-daemon.sh --config $HADOOP_CONF_DIR stop resourcemanager

Run a script to stop a NodeManager on a slave as yarn:

在slave 机器上使用yarn用户执行脚本停止NodeManager:

[yarn]$ $HADOOP_YARN_HOME/sbin/yarn-daemons.sh --config $HADOOP_CONF_DIR stop nodemanager

If etc/hadoop/slaves and ssh trusted access is configured (see Single Node Setup), all of the YARN processes can be stopped with a utility script. As yarn:

如果etc/hadoop/slaves 和ssh免密已经设置的话,所有的YARN进程可以使用一个有效的脚本进行停止:

[yarn]$ $HADOOP_PREFIX/sbin/stop-yarn.sh

Stop the WebAppProxy server. Run on the WebAppProxy server as yarn. If multiple servers are used with load balancing it should be run on each of them:

使用yarn用户在WebAppProxy服务器上执行如下命令停止WebAppProxy服务,如果多个服务器用于做负载均衡,应该在每一台机器上执行他们:

[yarn]$ $HADOOP_YARN_HOME/sbin/yarn-daemon.sh --config $HADOOP_CONF_DIR stop proxyserver

Stop the MapReduce JobHistory Server with the following command, run on the designated server as mapred:

 使用mapred用户在指定的服务器上执行如下命令挺尸MapReduce JobHistory服务。

[mapred]$ $HADOOP_PREFIX/sbin/mr-jobhistory-daemon.sh --config $HADOOP_CONF_DIR stop historyserver

Web Interfaces

Once the Hadoop cluster is up and running check the web-ui of the components as described below:

Daemon Web Interface Notes
NameNode http://nn_host:port/ Default HTTP port is 50070.
ResourceManager http://rm_host:port/ Default HTTP port is 8088.
MapReduce JobHistory Server http://jhs_host:port/ Default HTTP port is 19888.

 

今日份的小可爱

 

 

 

 

 

 

www.htsjk.Com true http://www.htsjk.com/Hadoop/28499.html NewsArticle hadoop官网翻译第三天Hadoop Cluster Setup,hadoopcluster Hadoop Cluster Setup  Purpose Prerequisites Installation Configuring Hadoop in Non-Secure Mode Configuring Environment of Hadoop Daemons Configuring the Hadoop Daemons Monitor...
相关文章
    暂无相关文章
评论暂时关闭