Three ways to start and close Hadoop's five daemon processes

Source: Internet
Author: User
Tags config

three ways to start and close Hadoop's five daemon processes


The first type of startup:

Go to "hadoop-1.x/bin" directory, perform START-ALL.SH,JPS view process, start all successfully.

19043 NameNode

19156 DataNode

19271SecondaryNameNode

19479TaskTracker

24008 Jps

19353JobTracker

View start-all.sh Code Discovery:

# Start Dfs daemons

"$bin"/start-dfs.sh--config$hadoop_conf_dir

# Start Mapred daemons

"$bin"/start-mapred.sh--config$hadoop_conf_dir

start-all.sh boot is dependent on, start-dfs.sh and start-mapred.sh two boot files, it is necessary to note that the order of execution, is executed first, start-dfs.sh then execute start-mapred.sh


The second mode of startup:

Go to "hadoop-1.x/bi" directory, execute start-dfs.sh and then execute START-MAPRED.SH,JPS view process, all start successfully.

19043 NameNode

19156 DataNode

19271SecondaryNameNode

19479TaskTracker

24008 Jps

19353JobTracker


See START-DFS.SH and start-mapred.sh Code discovery:


"Start-dfs.sh"

# Start Dfsdaemons

# Startnamenode after datanodes, to minimize time Namenode was up w/o data

# note:datanodes would log connection errors until Namenode starts

"$bin"/hadoop-daemon.sh--config $HADOOP _conf_dir start Namenode $nameStartOpt

"$bin"/hadoop-daemons.sh--config $HADOOP _conf_dir start Datanode $dataStartOpt

"$bin"/hadoop-daemons.sh--config $HADOOP _conf_dir--hosts Masters Start Secondarynamenode

"Start-mapred.sh"

# Start Mapreddaemons

# Startjobtracker first to minimize connection errors at startup

"$bin"/hadoop-daemon.sh--config $HADOOP _conf_dir start Jobtracker

"$bin"/hadoop-daemons.sh--config $HADOOP _conf_dir start Tasktracker

It is noteworthy that the start-dfs.sh and start-mapred.sh start-up is dependent on hadoop-daemon.sh and hadoop-daemons.sh files to start;

Note the order in which the boot order is Namenode, Datanode, Secondarynamenode, Jobtracker, Tasktracker


The Third Way to start:

Enter the "Hadoop-1.x/bi" directory with the following command:

"$./hadoop-daemon.sh Namenode"

"$./hadoop-daemon.sh Datanode"

"$./hadoop-daemon.sh Secondarynamenode"

"$./hadoop-daemon.sh Jobtracker"

"$./hadoop-daemon.sh Tasktracker"

JPS view process, start all successfully

19043 NameNode

19156 DataNode

19271SecondaryNameNode

19479TaskTracker

24008 Jps

19353JobTracker

The first method of closing:

Call stop-all.sh, same principle

The second mode of management:

Call stop-mapred.sh and call stop-dfs.sh to pay attention to the order of execution, the same principle

The Third Way of closing:

The closing order is: Jobtracker, Tasktracker, Namenode, Datanode, Secondarynamenode

Enter the "Hadoop-1.x/bi" directory with the following command:

"$./hadoop-daemon.sh Jobtracker"

"$./hadoop-daemon.sh Tasktracker"

"$./hadoop-daemon.sh Namenode"

"$./hadoop-daemon.sh Datanode"

"$./hadoop-daemon.sh Secondarynamenode"

It should be noted that the order of execution must be strictly observed.

These are all the three ways to start Hadoop's five daemon processes. The individual sections refer to the Cloud Sail Big Data Video course. If there are errors or problems, comment comments are actively discussed together.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.